Labels

EXECUTE permission was denied on the object ‘xp_cmdshell’, database ‘mssqlsystemresource’, schema ‘sys’





We were getting below error message when trying to execute xp_cmdshell within a stored procedure. Even though its dangerous I know but that’s how it was designed from application.

Error: "The EXECUTE permission was denied on the object ‘xp_cmdshell’, database ‘mssqlsystemresource’, schema ‘sys’"

To fix this In SSMS go to security ‡ Credentials ‡right click on “##xp_cmdshell_proxy##” ‡ You will get user name



We have to give this user execute permission

Syntax : GRANT EXECUTE ON xp_cmdshell TO [Domain\User]

Note : Make sure you must be using login on which you give execute permission. I found  many  times user do use diff id and complain.

1 comment:
Write comments
  1. I feel satisfied to read your blog, you have been delivering a useful & unique information to our vision even you have explained the concept as deep clean without having any uncertainty, keep blogging. SQL server dba Online Training

    ReplyDelete

Please do not enter spam links

Services

More Services