20 octubre, 2009

Cómo habilitar xp_cmdshell en SQL Server 2008

Antes de SQL Server 2008 podíamos habilitar al xp_cmdshell usando la herramienta Surface Area Configuration (SAC), pero dicha herramienta fué sustituida en SQL Server 2008 por SQL Server Configuration Manager. El siguiente scriptlet puede hacer la tarea:



USE master
GO
EXECUTE sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO
EXECUTE sp_configure 'xp_cmdshell', '1'
RECONFIGURE WITH OVERRIDE
GO
EXECUTE sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO





4 comentarios:

  1. excelente..........felicitaciones

    ResponderEliminar
  2. QUIERO PARTICIPAR EN LOS FOROS...

    COMO HAGO.......

    ResponderEliminar
    Respuestas
    1. Hola Raulin! Para participar en los foros MSDN de SQL server en Español simplemente debes ir al sitio http://social.msdn.microsoft.com/Forums/es-ES/sqlserveres/threads

      Para acceder debes usar una cuenta MSN Live (Messenger).

      Saludos, nos vemos alí.

      Eliminar
  3. me aparece el siguiente error
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
    Mens 15123, Nivel 16, Estado 1, Procedimiento sp_configure, Línea 78
    The configuration option 'xp_cmdshell' does not exist, or it may be an advanced option.

    Valid configuration options are:
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.

    ResponderEliminar

Nota: solo los miembros de este blog pueden publicar comentarios.