TuriTip #16: Abilitare xp_cmdshell in Sql Server

Il comando xp_cmdshell consente di integrare stored procedure con shell-command da passare direttamente al sistema operativo. Di default, in SQL Server 2005/2008, รจ disabilitata. Per abilitarla si possono eseguire in una finestra di query i seguenti comandi:

   1: -- To allow advanced options to be changed.
   2: EXEC sp_configure 'show advanced options', 1
   3: GO
   4: -- To update the currently configured value for advanced options.
   5: RECONFIGURE
   6: GO
   7: -- To enable the feature.
   8: EXEC sp_configure 'xp_cmdshell', 1
   9: GO
  10: -- To update the currently configured value for this feature.
  11: RECONFIGURE
  12: GO
Published 28 lug 2010 23:49 da Liccardi Antonio
Inserito sotto: , ,
Powered by Community Server (Commercial Edition), by Telligent Systems