xp_cmdshell 的开启和关闭

  由于存在安全隐患,所以在SQL Server中, xp_cmdshell 默认是关闭的。

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

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

原文地址:https://www.cnblogs.com/liu-shiliu/p/5558703.html