{"id":285,"date":"2018-06-29T06:39:07","date_gmt":"2018-06-29T06:39:07","guid":{"rendered":"https:\/\/sqlserverlearner.azurewebsites.net\/2018\/06\/29\/access_is_denied_sp_xp_cmdshell_proxy_account\/"},"modified":"2018-06-29T06:39:07","modified_gmt":"2018-06-29T06:39:07","slug":"access_is_denied_sp_xp_cmdshell_proxy_account","status":"publish","type":"post","link":"https:\/\/sqlserverlearner.com\/2018\/06\/29\/access_is_denied_sp_xp_cmdshell_proxy_account\/","title":{"rendered":"sp_xp_cmdshell_proxy_account – The provided account was invalid or the ##xp_cmdshell_proxy_account## credential could not be created Access is denied"},"content":{"rendered":"

When we try to create a xp_cmdshell proxy using SQL Server Management studio, we get error 15137.
\n
\nEXEC sp_xp_cmdshell_proxy_account 'domainaccount' ,'[password]'
\n<\/code><\/p>\n

Error:<\/strong><\/p>\n

\nMsg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1 [Batch Start Line 1]
\nAn 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.\n<\/p><\/blockquote>\n

Fix:<\/strong><\/p>\n