Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 exec master.dbo.xp_cmdshell
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

295 Posts

Posted - 12/13/2012 :  15:50:45  Show Profile  Reply with Quote
Its been working all this while but for some reason it has stopped working for only 1 of our environment.

Even executing exec master.dbo.xp_cmdshell 'dir c:\*.txt' brings following error mssg
Msg 15121, Level 16, State 10, Procedure xp_cmdshell, Line 1
An error occurred during the execution of xp_cmdshell. A call to 'CreateProcessAsUser' failed with error code: '1314'.

Here is what I have confirmed so far
1) select * from sys.configurations = xp_cmdshell value is 1 (in column value, value_in_use, maximum)
2) The ##xp_cmdshell_proxy_account## uses a Domain Service Account . This Service Account is part of the Local Administrator group and has the following user rights permissions
•Act as part of the operating system.
•replace process level token.
•Log on as a batch job.
3) I have restarted the instance and still no luck
4) I am a sysadmin but was executing the above as a non admin user, the same user that runs this command through a job every night.
5) Executing the above as a sysadmin works perfectly fine

I think this is for sure a permission problem but not sure what else to check for ?

Flowing Fount of Yak Knowledge

7174 Posts

Posted - 12/13/2012 :  19:59:38  Show Profile  Reply with Quote
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000