Enable xp_cmdshell in SQL Server 2008

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

Published
Categorized as Scripts

By Phil Steffek

Phil Steffek is a professional sumo wrestler who is hoping to represent the U.S. in the next Olympics. During the off season Phil is a Data Architect working on transactional databases, data warehouse implementations, and all aspects of business intelligence. Also, Phil is not really a sumo wrestler. You can get to know a bit more about my non-sumo doings by checking out my LinkedIn Page

Leave a comment

Your email address will not be published. Required fields are marked *