When am trying to execute the following through AppUser
SET @sql='bcp test.dbo.output out E:test\file1 -c Smegha -Usa -Pabc123'
EXEC master..xp_cmdshell @sql
am getting the following error mesg.
Server: Msg 229, Level 14, State 5, Procedure xp_cmdshell, Line 25
EXECUTE permission denied on object 'xp_cmdshell', database 'master', owner 'dbo'.
when I use the same AppUser in a diff SP to run the following, I have no problem.
EXEC master..xp_cmdshell 'ren "E:\Nasid\Archive\'+abc+'.txt" '
What might be the reason?