Am trying to create a file through a SQL procedure using below SQL function. Am able to create a file if I provide a file path in the same machine. If I change the path to another remote server, then I get a permission error; however manually using the same credentials (windows user, logged in with windows authentication to SQL server) am able to create the file in that path. What could be wrong in creating file thru' SQL?
SQL query: EXEC MASTER..xp_cmdshell @cmdstring