xp_sqlagent_proxy_account Access Denied Error

  • SQL server 2000 SP4.  I have tried to add a proxy account to SQL Server to facilitate some execution of the xp_cmdshell by non sysadmins and when I try to add the proxy account on one particular server I recieve an error of Access Denied when executing xp_sqlagent_proxy_account.  The Service and agent are being run by a domain account which is a local admin on the server and a sysadmin in the database.  I have tried changing the account to other admin accounts both local and domain as well as Local system.  The next step I am planning is to reinstall SQL Server on this particular instance since nothing seems to correct the problem.  Anyone else ever had this issue?

  • Hello Ram,

    Are you accessing any shared folder with the xp_cmdshell command?

    If so, please check up whether the proxy account which you are using has the necessary permissions to read/write to the shared folder.

    Hope this might solve your problem.

    Thanks and have a nice day!!!


    Lucky

  • It's not the xp_cmdshell that I am getting the error returned on.  It's when I try to add the proxy account using xp_sqlagent_proxy_account.

  • Did you try to set it in Enterprise Manager? SQL Server Agent -> Properties -> Job System -> Non-SysAdmin job step: remove check mark and reset the proxy account

  • I had the same problem (with SQL Server 2000.)

    Symptom:

    When logged in as 'sa'

    EXEC master.dbo.xp_sqlagent_proxy_account N'GET'

    Access is denied

    Cause was that the account that SQL Server service was running under (SA_SQL) did not have sufficient permissions. It was in Administrators but that was not enough.

    Solution as per http://msdn.microsoft.com/library/en-us/instsql/in_overview_6k1f.asp)

    Added to Group Policy (Security Settings/Local Policies/User Rights Assignment) settings for the account granting permission to

    -Increase Quotas

    -Replace a process level token

    -Log on as a batch Job

    (Log on as a Service was already granted)

    Then restarted SQL Server.

    For all I know, it was not really necessary to add all three, perhaps only one or two were needed. But this worked.

    Credit for this solution should go to

    Vikrant V Dalwale [MSFT] who posted it in microsoft.public.sqlserver.server on Wed, Dec 17 2003 9:16 pm

    -JRD

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

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