An Error Occurred During The Execution Of Sp_xp_cmdshell_proxy_account
Contents |
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove
Sp_xp_cmdshell_proxy_account Not Working
From My Forums Answered by: sp_xp_cmdshell_proxy_account returns error code 5 sp_xp_cmdshell_proxy_account example SQL Server > Transact-SQL Question 0 Sign in to vote As part of configuring
A Call To 'logonuserw' Failed With Error Code: '1385'
my SQL Server 2005 box to be able to use the xp_cmdshell function, I ran sp_xp_cmdshell_proxy_account to set up the credentials:sp_xp_cmdshell_proxy_account 'Domain\DomainUser', 'password'Unfortunately, msg 15153, level 16, state 1, procedure xp_cmdshell, line 1 it just returns:Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, Line 1An 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'.I am assuming that this is an "Access Denied" error create credential ##xp_cmdshell_proxy_account## message. Has anyone got any ideas on why this is happening or what I can do to narrow down what the problem is. I can't find any logs with further information.I have used a similar setup on another SQL Server 2005 box before and have never had a problem running the sp_xp_cmdshell_proxy_account function. I can't see what I have done differently this time.Further information:The SQL Server and SQL Server Agent services are running under the Domain\DomainUser account.I have given the Domain\DomainUser the following privileges:Act as part of the operating systemLog on as a batch jobLog on as a serviceReplace a process level tokenLet me know if you need any further information.Thanks in advance for any help.Ben Monday, August 06, 2007 12:50 PM Reply | Quote Answers 6 Sign in to vote It's not an answer to the origina
here for a quick overview of the site Help Center Detailed answers to any questions you might have
An Error Occurred During The Execution Of Xp_cmdshell
Meta Discuss the workings and policies of this site About Us error code: '1326' Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with
Enable Xp_cmdshell
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, https://social.msdn.microsoft.com/Forums/sqlserver/en-US/40d67d22-28ac-44ab-b7d2-0eec25f873a6/spxpcmdshellproxyaccount-returns-error-code-5?forum=transactsql just like you, helping each other. Join them; it only takes a minute: Sign up sql sp_xp_cmdshell_proxy_account error up vote 0 down vote favorite when I run the following command in sql on ly local PC: EXEC sp_xp_cmdshell_proxy_account 'pc-name\my_username', 'password' I'm getting the error: An error occurred during the execution of sp_xp_cmdshell_proxy_account. Possible reasons: the provided http://stackoverflow.com/questions/26795999/sql-sp-xp-cmdshell-proxy-account-error account was invalid or the '##xp_cmdshell_proxy_account##' credential could not be created. Error code: '5'. This user I'm using when I login into windows and I'm logging to sql server(on my local pc) using windows authentication. Should I create another user? PS: from services, on SQL Service Agent Log On, I've set this user. sql xp-cmdshell share|improve this question asked Nov 7 '14 at 7:14 Buda Gavril 7,8132273121 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote http://www.msbicoe.com/post/2011/12/27/The-Problem-of-xp_cmdshell_proxy_account-credential-could-not-be-created.aspx Right click, run As Administrator - to open your SQL Query Management studio. share|improve this answer answered Feb 25 '15 at 9:14 Alocyte 866 add a comment| up vote 0 down vote Have you tried starting Enterprise manager in elevated mode and running the command there? As suggested in http://blogs.msdn.com/b/psssql/archive/2009/04/07/troubleshooting-sp-xp-cmdshell-proxy-account-errors.aspx share|improve this answer answered Nov 7 '14 at 9:37 oob2 111 I have licence only for Microsoft SQL Server 2008 R2, I don't have installed Enterprise manager –Buda Gavril Nov 7
be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from http://www.dbforums.com/showthread.php?1662149-xp_cmdshell-proxy-account the selection below. Results 1 to 6 of 6 Thread: xp_cmdshell proxy account Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode http://blog.dj-djl.com/2012/08/fixing-msg-15137-level-16-state-1.html 11-16-10,11:44 #1 pootle flump View Profile View Forum Posts King of Understatement Join Date Feb 2004 Location One Flump in One Place Posts 14,912 Unanswered: xp_cmdshell proxy account Hi I am unable to set this on two of an error our servers, yet I can for all others. Code: EXEC master.dbo.sp_xp_cmdshell_proxy_account 'Domain\Loggy', 'PassyWordles'; result: Code: Msg 15137, Level 16, State 1, Procedure sp_xp_cmdshell_proxy_account, 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'. I can execute this fine, but I think SQL Server does not validate the account on creation: Code: CREATE CREDENTIAL ##xp_cmdshell_proxy_account## WITH IDENTITY = 'Domain\Loggy', SECRET = an error occurred 'PassyWordles' If I attempt to execute xp_cmdshell with the above I get the message: Code: Msg 15121, Level 16, State 200, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to 'LogonUserW' failed with error code: '1385'. OS Error 1385 means: "Logon failure: the user has not been granted the requested logon type at this computer." This is not a problem with the account: copied and pasted the above works fine on a number of other servers. I suspect it is to do with the OS, but I am not certain. All security is managed by group policy. Succeeds on: SQL Server 2008 R1 on Windows 2008 R2 SQL Server 2008 R1 on Windows 2003 SSQL Server 2005 on Windows 2003 Fails on: SQL Server 2008 R1 on Windows 2008 R1 Does anyone have any thoughts please? Testimonial: pootle flump ur codings are working excelent. Reply With Quote 11-16-10,11:50 #2 MCrowley View Profile View Forum Posts Registered User Join Date Jan 2003 Location Massachusetts Posts 5,794 Provided Answers: 11 So, upgrade to Windows 2008 R2. ;-) You may have checked, but I don't see it specifically put in your post, are there any local policies? Or is this machine excluded from the policies you think should be applied to it? Oh, and is the login in question a member of any local groups on
reasons: the provided account was invalid or the '##xp_cmdshell_proxy_account##' credential could not be created. Error code: '0'. This one has been driving my crazy for ages. There are plenty of blog posts out there explaining how to fix this one by running SSMS as an administrator but in my case this did not help. The problem I was having was actually a really subtle one - getting the username right. In all other contexts I am able to use 'ip.add.re.ss\username' Not here so to fix the error in my case I had to use 'servername\username' Hopefully this post will save someone else a major headache! Posted by Lee Smith at 11:15 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: sp_xp_cmdshell_proxy_account, SQL, SQL Server, xp_cmdshell, xp_cmdshell_proxy_account Reactions: No comments: Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) Development website DJ website Housefreaks Blog Archive ► 2014 (2) ► December (2) ► 2013 (4) ► November (1) ► July (1) ► May (1) ► January (1) ▼ 2012 (15) ► October (2) ► September (1) ▼ August (4) Changing the OS on a remote server with no physica... Solving "Could not load file or assembly" problems... Installing MONO on CENTOS Fixing: Msg 15137, Level 16, State 1, Procedure sp... ► May (1) ► April (1) ► February (1) ► January (5) Followers About Me Lee Smith London, United Kingdom Software Developer and DJ I develop software both professionally and personally. My preference is C# and XHTML/CSS3 For my personal projects I tend to use Makefiles and basic text editors as I don't get on with the free development environments that I have so far discovered. At work I have a very much love/hate relationship with Visual Studio. Certainly it makes some things a lot easier, but it also makes some simple