SQL Server Performance

xp_cmdshell execute right

Discussion in 'General DBA Questions' started by CanadaDBA, Feb 11, 2005.

  1. CanadaDBA New Member

    I have users which are not members of the sysadmin fixed server role. How can I grant them execute right to be able to execute xp_cmdshell?

    CanadaDBA
  2. satya Moderator

    grant exec on xp_cmdshell to LimitedUser

    BOL specifies:
    If you choose to use a Windows NT account that is not a member of the local administrator's group for the MSSQLServer service, users who are not members of the sysadmin fixed server role cannot execute xp_cmdshell.




    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  3. CanadaDBA New Member

    And how can I find out what is granted to a user?

    quote:Originally posted by satya


    grant exec on xp_cmdshell to LimitedUser

    BOL specifies:
    If you choose to use a Windows NT account that is not a member of the local administrator's group for the MSSQLServer service, users who are not members of the sysadmin fixed server role cannot execute xp_cmdshell.




    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

    CanadaDBA
  4. satya Moderator

    sp_helprotect null, null, 'loginname'
    BOL is your best pal.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  5. CanadaDBA New Member

  6. hoo-t New Member

    FarhadR,
    These forums are absolutely fantastic for getting answers to those difficult questions that you just can't figure out. But, you WILL LEARN much, much more if you will attempt to do the research yourself before asking for the answer. PLUS, you'll have the added benefit of knowing that you figured it out on your own!

    Steve
  7. satya Moderator

    Farhad<br /><br />Thanks for your appreciation[<img src='/community/emoticons/emotion-1.gif' alt=':)' />], even I do follow BOL incidentally to answer few questions. SO always refers to the master.<br /><blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by FarhadR</i><br /><br />Thanks Satya. But belive me sometimes<a target="_blank" href=http://www.SQL-Server-Performance.Com/forum>http://www.SQL-Server-Performance.Com/forum</a> works as primary pal for me and BOL is secondary [8D]<br /><br /><br /><br />CanadaDBA<br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><br /><hr noshade size="1"><b>Satya SKJ</b><br />Moderator<br /<a target="_blank" href=http://www.SQL-Server-Performance.Com/forum>http://www.SQL-Server-Performance.Com/forum</a><br /><center><font color="teal"><font size="1">This posting is provided “AS IS” with no rights for the sake of <i>knowledge sharing.</i></font id="size1"></font id="teal"></center>

Share This Page