XP_CMDSHELL and SSIS Package

  • If I use the 'sa' account and run the script below it executes beautifully. However, when I use a non sysadmin account I get the message:

    Msg 15153, Level 16, State 1, Procedure xp_cmdshell, Line 1

    The xp_cmdshell proxy account information cannot be retrieved or is invalid. Verify that the '##xp_cmdshell_proxy_account##' credential exists and contains valid information.

    Script which calls data import package:

    exec xp_cmdshell 'dtexec /De packagepassword /f "D:\NSAR\DMXCOMPANYIMPORT.dtsx"'

    go

    Client has indicated they have created a proxy account. How would I add the proxy account info to the script above?

    Thank you.

    Rog

  • You might want to look into sp_xp_cmdshell_proxy_account it is what sets it up. And I am a trust but verify sort of fellow with what I am told by customers.

    IF it exists the proxy will be used automatically, you don't have to tell it to use it.

    Per BOL:

    xp_cmdshell Proxy Account

    When it is called by a user that is not a member of the sysadmin fixed server role, xp_cmdshell connects to Windows by using the account name and password stored in the credential named ##xp_cmdshell_proxy_account##. If this proxy credential does not exist, xp_cmdshell will fail.

    CEWII

  • Thanks for your response. We just now got it to work.

    Roger

Viewing 3 posts - 1 through 2 (of 2 total)

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