xp_cmdshell not working for users

  • We have a SQL cluster set up and when the users/programs access the server there is a public login set up...pvtreader.

    When I log onto the primary or the secondary it shows the user pvtreader was granted access to use xp_cmdshell.

    but when I log into the cluster as pvtreader, I cannot execute xp_cmdshell. I get the below error message.

    "The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'."

    the xp_cmdshell proxy has been setup and when I look at security for the master database it show that pvtreader has the securable set for xp_cmdshell

  • carol can you simpyl test your users xp_cmdshell permissions? does this still give permissions errors?

    EXECUTE AS USER='pvtreader' --test as our specific users permissions.

    exec xp_cmdshell 'whoami'

    REVERT; --change back into myself

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Yes it gives the error that I show in my original message.

    This used to work, but something happened and now it doesn't.

  • I got this to work be deleting the login under the MASTER database and re-adding making sure to add his schema

  • Carol Adams (5/6/2016)


    I got this to work be deleting the login under the MASTER database and re-adding making sure to add his schema

    I have a question.

    Was this cluster setup and then the databases migrated from another server?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply