xp_sqlagent_proxy_account gives "Access is denied"

  • Hi all,

    We are currently locking down our SQL Servers. On the test server I have just removed the SQL service account from the local admins group and setup the permissions as specified in BOL (it is still in sysadmins though). Everything seems to be working fine apart from one thing.

    We have a script which checks various things - one of which to ensure that a proxy account has not been set for SQL Agent. This uses xp_sqlagent_proxy_account and used to work fine - now is gives "Access is denied". I have tried using regmon and filemon (from sysinternals) to find out what is actually being denied but I can't spot the offending area.

    Anyone have any ideas on how to take this forward?

    thanks in advance.....

    Mark Davison

  • This was removed by the editor as SPAM

  • The sql agent must be using the startup account which might be the local account. Try to change the stahtup credetials for sql agent and that should do the trick.

  • Hi there,

    Thanks for responding. The SQL Agent is using the same service account as the SQL Server service. This is a domain account as recommended in BOL.

    It was this account that I have removed from local admins on the server and this action that stopped xp_sqlagent_proxy_account working

    Mark

  • Make sure that the login you are using to execute xp_sqlagent_proxy_account have exec permissions on the procedure in the master!


    * Noel

  • Thanks for responding. The account that both the SQL Server service and the SQL Agent service are running under is a sysadmin. I have tried granting EXEC permissions explicitly on xp_sqlagent_proxy_account (although this shouldn't be necessary with a sysadmin) and I still get the same error. I'm sure the problem lies in some wiered OS permissions thing rather than the database.

    Any other ideas anyone?

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

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