June 1, 2009 at 6:39 am
I have an SP which is being used by xp_cmdshell. i have given EXEC previlege on this extended stored procedure to the non sysdba account.
when i tried to execute xp_cmdshell (exec xp_cmdshell 'copy c:\vb c:\vbs') with non sysdba account, i am getting the following error message
xpsql.cpp: Error 1314 from CreateProcessAsUser on line 636
Msg 50001, Level 1, State 0
can somebody plz help me?
is there a method to copy files from one location to another location for non sysdba accounts with out using xp_cmdshell?
June 2, 2009 at 3:42 am
There are a few things to consider.
1) What Windows rights does your SQL Server service account have. Check with BOL for what is needed. I cannot remember for SQL 2000, but for SQL 2005 the service account will need 'Impersonate a client after authentication', 'Replace a process level token', 'Log on as a batch job' to operate a proxy account.
To me, your problem looks more like a Windows rights issue than anything else.
2) Have you set up the xp_cmdshell proxy account. BOL can tell you how to do this. In SQL Server 2000, this password for this account must not be longer than 15 characters. You can type in a longer password but it gets truncated and then the proxy will not work.
3) The proxy account needs 'Read and Execute' rights to the folder containing the SQL Server program files, and also to CMD.EXE that normally lives in C:\Windows\System32.
After you have done this, you should be good to get xp_cmdshell working for non-sysadmin users.
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply