xp_cmdshell error

xp_cmdshell error

 

  

I'm trying to use xp_cmdshell inside a sql script which is being called by
OSQL.exe. If I run the script alone through Query Analyzer it works fine.
If I try to run the script with OSQL my xp_cmdshell phrase fails with the
following error:

"Server MyServer, Procedure xp_cmdshell, line 2 EXECUTE permission denied on
object 'xp_cmdshell', database 'master', owner 'dbo'."

How do I tell SQL Server that the database credentials I'm using to fire
OSQL has "permission" to use xp_cmdshell??

Thanks,

Daryl

MS Sql Server LazyDBA home page