0

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

Rajesh Bhat
  • 791
  • 3
  • 8
  • 20
  • Could you post the command? (The content of @cmdstring) – Ezin82 Feb 05 '18 at 17:10
  • 1
    You will probably find that SQL server is using the SQL Server Windows service to create the file, not your user permissions. It will have rights to the local machine, but not to a remote one unless you get it set up. – DancingFool Feb 06 '18 at 08:13

0 Answers0