Error Messages – SQLSERVERLEARNER https://sqlserverlearner.com LEARN SQL SERVER ONLINE Fri, 29 Jun 2018 06:39:07 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 sp_xp_cmdshell_proxy_account – The provided account was invalid or the ##xp_cmdshell_proxy_account## credential could not be created Access is denied https://sqlserverlearner.com/2018/06/29/access_is_denied_sp_xp_cmdshell_proxy_account/ https://sqlserverlearner.com/2018/06/29/access_is_denied_sp_xp_cmdshell_proxy_account/#respond Fri, 29 Jun 2018 06:39:07 +0000 https://sqlserverlearner.azurewebsites.net/2018/06/29/access_is_denied_sp_xp_cmdshell_proxy_account/ 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]'

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 = domainaccount', SECRET = N'password'
GO

]]>
https://sqlserverlearner.com/2018/06/29/access_is_denied_sp_xp_cmdshell_proxy_account/feed/ 0