April 6, 2009 at 1:37 pm
Help...
Recently I converted a database from SQL 2K to 2K5 and now I'm trying to get through the hell of debugging issues. I am having issues with xp_cmdshell. I have a sproc in place that performs several cmdshell tasks throughout the process and now they don't work. I can run the commands from the actual command shell on the server and they work fine.
I enabled xp_cmdshell in the surface area config and my procedure runs as a local admin on the server.
I know that Microsoft suggests that you use a proxy account but i'd like to avoid that if possible. Is this possible and have I missed anything?
Thanks,
Kevin
April 6, 2009 at 1:46 pm
Hi Kevin
Could you explain more detailed which error(s) you get. This works just fine:
CREATE PROCEDURE usp_TestCmdShell
AS
EXECUTE xp_cmdshell 'dir C:\'
GO
EXECUTE usp_TestCmdShell
Greets
Flo
April 7, 2009 at 6:12 am
Yes very simply the error I get is access denied. If I use the dir command it works for me too. I receive errors using ftp, bcp, copy, xcopy etc...If I run the commands directly from the command prompt it works but from inside of SQL Server it fails.
Any thoughts???
Kevin
April 7, 2009 at 6:50 am
Hi
So it's a problem with the rights. I'm not sure if your user account or the SQL Server Service account needs the rights for the server.
Hope somebody else has more detailed information.
Good luck
Flo
April 7, 2009 at 7:10 am
Florian Reischl (4/7/2009) I'm not sure if your user account or the SQL Server Service account
Hi can anybody tell the difference SQL Service Account and User account pls
April 7, 2009 at 7:21 am
Both the Service Account and my account are in the local administrators group on the server so what else might I be missing.....
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply