-- 允许配置高级选项
EXEC sp_configure 'show advanced options',1
GO
-- 重新配置RECONFIGURE
-- 禁用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
--重新配置RECONFIGURE