SQL Server中的cmd_shell組件功能強大幾乎可通過該組建實現Windows系統的所有功能正因此這個組件也是SQL Server的最大安全隱患SQL Server 中這個組件是默認開啟的而SQL Server 中這個組件默認作為此服務器安全配置的一部分而被關閉有時我們需要用到該組件開啟此組件的相關語句如下
復制代碼 代碼如下:
To allow advanced options to be changed
EXEC sp_configure show advanced options
GO
To update the currently configured value for advanced options
RECONFIGURE
GO To enable the feature
EXEC sp_configure xp_cmdshell
GO
To update the currently configured value for this feature
RECONFIGURE
GO
為了保證數據庫服務器的安全
建議在使用完畢後關閉該組件
關閉該組件的相關語句如下
復制代碼 代碼如下:
To allow advanced options to be changed
EXEC sp_configure show advanced options
GO
To update the currently configured value for advanced options
RECONFIGURE
GO To enable the feature
EXEC sp_configure xp_cmdshell
GO
To update the currently configured value for this feature
RECONFIGURE
GO
From:http://tw.wingwit.com/Article/program/SQLServer/201404/30573.html