Link to home
Start Free TrialLog in
Avatar of Trish Benningfield
Trish BenningfieldFlag for United States of America

asked on

SQL 2008 enable xp_cmdshell (READ IT PLS)

Hi Folks,

I need help please. I am receiving this message when I try and run this under SQL 2008
EXEC util_ObjOut 'util_objout', 'p', 'C:\temp'

Before you well meaning experts tell me its as simple as this--
   EXEC sp_configure 'show advanced options', 1
   GO
   RECONFIGURE
   GO
   EXEC sp_configure 'xp_cmdshell', 1
   GO
   RECONFIGURE
   GO

Please know I have already run it with the following results:  
   Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
   Configuration option 'xp_cmdshell' changed from 1 to 1. Run the RECONFIGURE statement to install.

Opening SQL Server Management Studio, right clicking on the server and selecting facets, then selecting "Server Configuration" in the Facet dropdown reveals XPCmdShellEnabled is set to TRUE, yet I receive the same error.

THANK YOU SO MUCH, I have to get this fixed.
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Trish Benningfield

ASKER

Thanks, will try that.

FYI, I was trying to post the actual error (I forgot to include) , and it was MSG 50000, LEVEL 16, STATE 1, procedure util_ObjOut, LIne 267
SQL server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell" because this component is turned off as part of the security configuration for this server. A system administrator can enable....
THANKS, doesn't work.....

RECONFIGURE WITH OVERRIDE
GO
EXEC sp_configure 'xp_cmdshell', 1
GO

Shows it change from 1 to 1....

Same error when I run the EXEC util_ObjOut 'util_objout', 'p', 'C:\temp' command.
does the file you're trying to execute have permissions?  Can you check by adding "everyone" for read and execute?  Does it work with any batch file or not at all?

What permissions does the user who you're trying to execute this as have?

Also just as another check if you grant them SA for now will it work?
I am the administrator, I have confirmed the sysadmin privilege.

OK, so here is what I did-- I ran each line separately one at a time, and voila.  

Thanks!