启动/关闭xp_cmdshell

--启用xp_cmdshell
USE master
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure   'show advanced options', 0
RECONFIGURE WITH OVERRIDE
 
 
--关闭xp_cmdshell
USE master
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'xp_cmdshell', 0
RECONFIGURE WITH OVERRIDE
EXEC sp_configure   'show advanced options', 0
RECONFIGURE WITH OVERRIDE
posted @ 2019-05-10 17:55  zhencool  阅读(489)  评论(0编辑  收藏  举报