0

I'm using the below code to call an executable file whenever a new row is inserted into the table. exec master..xp_cmdshell @CMD

The executable file is not getting called. How should i give access for the default sa user the rights to execute the file

user3400453
  • 21
  • 1
  • 6

2 Answers2

0

The command will be run as the user that your database is running as, not necessarily the user you are connecting to the database with. In many cases the username is sybase, so make sure that the OS user has permissions on the file system to the command.

Mike Gardner
  • 6,611
  • 5
  • 24
  • 34
0

Please ensure that sp_configure "xp_cmdshell context", 0 Default is 1 , this restrict the client execution privileges of the OS command specified with xp_cmdshell. Consult documentation for further details.