{"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. Error:<\/strong><\/p>\n \nMsg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1 [Batch Start Line 1] Fix:<\/strong><\/p>\n Alternatives:<\/strong> 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…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2174],"tags":[],"class_list":["post-285","post","type-post","status-publish","format-standard","hentry","category-error-messages"],"_links":{"self":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":0,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\n
\nEXEC sp_xp_cmdshell_proxy_account 'domainaccount' ,'[password]'
\n<\/code><\/p>\n
\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\n
\nCreate a credential
\n
\nUSE [master]
\nGO
\nALTER CREDENTIAL [##xp_cmdshell_proxy_account##] WITH IDENTITY = domainaccount', SECRET = N'password'
\nGO
\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"