SQL Server中的cmd_shell組件功能強(qiáng)大,幾乎可通過該組建實(shí)現(xiàn)Windows系統(tǒng)的所有功能,正因此,這個(gè)組件也是SQL Server的最大安全隱患。SQL Server 2000中這個(gè)組件是默認(rèn)開啟的,而SQL Server 2005中這個(gè)組件默認(rèn)作為此服務(wù)器安全配置的一部分而被關(guān)閉。有時(shí)我們需要用到該組件,開啟此組件的相關(guān)語句如下:
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
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', 0
GO
--To update the currently configured value for this feature.
RECONFIGURE
GO
標(biāo)簽:咸寧 臺(tái)灣 寶雞 商洛 公主嶺 日喀則 西藏
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《SQL Server 2005的cmd_shell組件的開啟方法》,本文關(guān)鍵詞 SQL,Server,2005,的,cmd,shell,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。