启动/关闭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

猜你喜欢

转载自www.cnblogs.com/zhencool/p/10845837.html