SQLServer2005里設(shè)置使用xp_cmdshell

字號(hào):

SQL Server 2005 中引入的 xp_cmdshell 選項(xiàng)是服務(wù)器配置選項(xiàng),使系統(tǒng)管理員能夠控制是否可以在系統(tǒng)上執(zhí)行 xp_cmdshell 擴(kuò)展存儲(chǔ)過程。
    默認(rèn)情況下,xp_cmdshell 選項(xiàng)在新安裝的軟件上處于禁用狀態(tài),但是可以通過使用外圍應(yīng)用配置器工具或運(yùn)行 sp_configure 系統(tǒng)存儲(chǔ)過程來啟用它,如下面的代碼示例所示:
    -- 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