xp_cmdshell 命令的开启与关闭,和状态查询

/*
EXEC sp_configure ‘allow updates’, 0
RECONFIGURE

*/

-- 启用:
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'xp_cmdshell',1
reconfigure

    --关闭:
exec sp_configure 'xp_cmdshell',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure 


select *  from sysconfigures where comment like '%show advanced options%' or  comment like '%shell%'

 

posted @ 2014-07-03 14:38  mywordpress  阅读(2544)  评论(0编辑  收藏  举报