Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Unanswered: execute xp_cmdshell and other SA storedproc

    Hi all,

    I have to execute stored procedures containing
    xp_cmdshell and certain system storedprocedures in msdb and master
    with a user who is not SA.
    (i.e iam able to execute stored procedures when i log as sa,
    but any other user cannot run them)

    Pls tell how to do this, it is quite urgent.

  2. #2
    Join Date
    Aug 2002
    Books online reviews:
    When xp_cmdshell is invoked by a user who is a member of the sysadmin fixed server role, xp_cmdshell will be executed under the security context in which the SQL Server service is running. When the user is not a member of the sysadmin group, xp_cmdshell will impersonate the SQL Server Agent proxy account, which is specified using xp_sqlagent_proxy_account. If the proxy account is not available, xp_cmdshell will fail. This is true only for Microsoft® Windows NT® 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and xp_cmdshell is always executed under the security context of the Windows 9.x user who started SQL Server.

    Follow the corresponding links on BOOKS ONLINE about this topic.
    --Satya SKJ
    Microsoft SQL Server MVP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts