Saturday, January 8, 2011

SQL SERVER 2008 – Enable xp_cmdshell


---- To allow advanced options to be changed.
EXEC sp_configure ‘show advanced options’, 1
GO
—- To update the currently configured value for advanced options.
RECONFIGURE
GO
—- To enable the feature.
EXEC sp_configure ‘xp_cmdshell’, 1
GO
—- To update the currently configured value for this feature.
RECONFIGURE
GO

 
Alternative way

1. Click the Start button.
2. Select All Programs.
3. Navigate to the Microsoft SQL Server 2008 folder.
4. Right Click on Server name then click facets options
5. In the Facets Option choose Surface Area Configuration in dropdown
6. At the bottom of the window, mark True for xp_cmdshell.
7. Click OK.

6 comments:

  1. i have tried the alternative way and it worked for me.

    thanks
    Ajay

    ReplyDelete
  2. Thanks for the Alternative way
    SRK

    ReplyDelete
  3. I must just sa, I was struggling with this for a while and nothing worked. Your alternative way did the job, thank you very much.

    ReplyDelete
  4. For SQL Server 2008 R2 you can go into SSMS, right click on the server, select Facets. In the new window that comes up change the Facet to Surface Area Configuration and you'll find XPCmdShellEnabled in the Facet properties below.

    ReplyDelete