by Joe Hunter
6. July 2010 12:02
ALTER PROCEDURE USP_TURN_ON_XP_CMDSHELL
AS
BEGIN
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
-- To update the currently configured value for advanced options.
RECONFIGURE
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
-- To update the currently configured value for this feature.
RECONFIGURE
END