Proxy Account

  • Hi,

    While execution BCP job, I am getting this following error.

    [p]Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.[/p]

    I enabled xp_cmdshell in Surface Area Confuration features.

    Then i went to Security -> Credentials -> created new proxy account with the name ##xp_cmdshell_proxy_account## and identity as india\xg536, surprisingly i could not find the identity. I have logged in as xg536 and india is domain for this login. Even though i gave same identity and password.

    And SQL server Agent -> Proxies -> Added the same credential here.

    When I am trying to run this following query, got error saying that [p]Incorrect Syntax near '\'. [/p] GRANT EXECUTE on xp_cmdshell to india\xg536

    The following query executed fine.

    USE master;

    exec sp_xp_cmdshell_proxy_account 'india\xg536', 'Ong4ig9'

    Finally I am getting same error. Can anybody give me suggestions to run BCP job successfully.

    Thanks.

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • Try using GRANT EXECUTE on xp_cmdshell to [india\xg536]

  • Thanks for reply.

    Try using GRANT EXECUTE on xp_cmdshell to [india\xg536]

    Executed fine but same results. Getting the following error [p]Error string: [Microsoft][ODBC SQL Server Driver][SQL Server]The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.[/p]

    KSB

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • This link might assist you: http://www.dbnewsgroups.net/group/microsoft.public.sqlserver.programming/topic16744.aspx

    ----------------------------------------------------------------------------------------------
    Struggling to find the question?
    http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

  • This link might assist you: http://www.dbnewsgroups.net/group/microsoft.public.sqlserver.programming/topic16744.aspx%5B/quote%5D

    I have tried this too..

    EXEC sp_configure 'show advanced options', 1

    GO

    RECONFIGURE

    GO

    EXEC sp_configure 'xp_cmdshell', 1

    GO

    RECONFIGURE

    GO

    exec sp_xp_cmdshell_proxy_account 'domain\user', 'password'

    Still getting same error.

    Thanks,

    KSB

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • KSB, are you able to execute any commands using xp_cmdshell? Are you getting this message everytime you execute a command or only on the BCP Job?

    ----------------------------------------------------------------------------------------------
    Struggling to find the question?
    http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

  • If I executeEXEC xp_cmdshell 'dir *.exe';

    GO it is working fine.

    And if I execute BCP job I'm getting error.

    Thanks for reply

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

Viewing 7 posts - 1 through 6 (of 6 total)

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