Blog

Enable xp_cmdshell in SQL Server 2008

Free copy of SQL Best Practices?

Get your copy of SQL Best Practices and be the database developer that has rocket fuel in his veins.
Even better? These Best Practices are written in an easy to understand format so your whole team will quickly want to adopt them.
Get SQL Best Practices

Want to enable xp_cmdshell in SQL Server 2008? This fast and easy T-SQL script will do the trick without trying to find the setting using the MS SQL Management Studio Object Explorer. (If you insist on using Object Explorer you can find the switch for xp_cmdshell by right clicking on the server name, selecting "Facets", selecting "Server Configuration" in the Facet dropdown. "XPCmdShellEnabled" is at the bottom of the Facet Properties window).

EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO

No comments yet.

Leave a Reply