5/06/2015

SQL SERVER – Enable xp_cmdshell using sp_configure

MS SQL Server 因為安全考量, Default Disable 掉了 xp_cmdshell stored procedure.

參考網址: http://blog.sqlauthority.com/2007/04/26/sql-server-enable-xp_cmdshell-using-sp_configure/

底下是 Enable 的方法

---- To allow advanced options to be changed.
EXEC sp_configure ‘show advanced options’, 1
GO
—- To update the currently configured value for advanced options.
RECONFIGURE
GO
—- To enable the feature.
EXEC sp_configure ‘xp_cmdshell’, 1
GO
—- To update the currently configured value for this feature.
RECONFIGURE
GO