SQL 2008 启用和禁用xp_cmdshell

AddTime 2020/8/14 Hits 1902

xp_,cmd,cmdshell

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

 

允许开启

sp_configure 'show advanced options',1
reconfigure
go
sp_configure 'xp_cmdshell',1
reconfigure
go

关闭
sp_configure 'show advanced options',1
reconfigure
go
sp_configure 'xp_cmdshell',0
reconfigure
go

小珂爱学习(XkWeb)
© 2020 Xkweb.cn. 小珂爱学习 让知识变得有趣 冀ICP备13014724号-2
Designed by:Xkweb3.6