数据库
首页 > 数据库> > SQL Server启动/关闭xp_cmdshell

SQL Server启动/关闭xp_cmdshell

作者:互联网

 1 ==》启用xp_cmdshell
 2 USE master 
 3 EXEC sp_configure 'show advanced options', 1 
 4 RECONFIGURE WITH OVERRIDE 
 5 EXEC sp_configure 'xp_cmdshell', 1 
 6 RECONFIGURE WITH OVERRIDE 
 7 EXEC sp_configure   'show advanced options', 0
 8 RECONFIGURE WITH OVERRIDE 
 9  
10  
11 ==》关闭xp_cmdshell
12 USE master 
13 EXEC sp_configure 'show advanced options', 1 
14 RECONFIGURE WITH OVERRIDE 
15 EXEC sp_configure 'xp_cmdshell', 0 
16 RECONFIGURE WITH OVERRIDE 
17 EXEC sp_configure   'show advanced options', 0
18 RECONFIGURE WITH OVERRIDE 

原文链接:https://blog.csdn.net/l1028386804/article/details/85649049

标签:configure,cmdshell,EXEC,sp,Server,RECONFIGURE,SQL,OVERRIDE,xp
来源: https://www.cnblogs.com/panisme/p/11727795.html