sp_xp_cmdshell_proxy_account – The provided account was invalid or the ##xp_cmdshell_proxy_account## credential could not be created Access is denied

Posted on : 29-06-2018 | By : Devi Prasad | In : Error Messages

0

When we try to create a xp_cmdshell proxy using SQL Server Management studio, we get error 15137.

EXEC sp_xp_cmdshell_proxy_account 'domain\account' ,'[password]'

Error:

Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1 [Batch Start Line 1]
An error occurred during the execution of sp_xp_cmdshell_proxy_account. Possible reasons: the provided account was invalid or the ‘##xp_cmdshell_proxy_account##’ credential could not be created. Error code: 5(Access is denied.), Error Status: 0.

Fix:

  • Run SQL Server Management Studio as Administrator
  • Validate and make sure password is correct

Alternatives:
Create a credential

USE [master]
GO
ALTER CREDENTIAL [##xp_cmdshell_proxy_account##] WITH IDENTITY = domain\account', SECRET = N'password'
GO