When we try to create a xp_cmdshell proxy using SQL Server Management studio, we get error 15137.
EXEC sp_xp_cmdshell_proxy_account 'domainaccount' ,'[password]'
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.
- Run SQL Server Management Studio as Administrator
- Validate and make sure password is correct
Create a credential
ALTER CREDENTIAL [##xp_cmdshell_proxy_account##] WITH IDENTITY = domainaccount', SECRET = N'password'