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


Leave a Reply

Your email address will not be published.