IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[CP_ConfigurarMSSQL]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[CP_ConfigurarMSSQL] 
END
GO


CREATE PROCEDURE dbo.CP_ConfigurarMSSQL
AS
SET NOCOUNT ON

--Ejeuctar las siguientes Lineas


EXEC sp_configure 'show advanced options', 1;
RECONFIGURE

EXEC sp_configure 'xp_cmdshell', 1;  
RECONFIGURE  

EXEC sp_configure 'Ole Automation Procedures', 1;
RECONFIGURE
