SQL Server2008 xp_cmdshell啟用

1. 查看系统数据库参数配置: select * from sys.configurations where name='xp_cmdshell'

修改系统数据库参数:   

  语法格式:
     sp_configure [ @configname= ] 'hadoop connectivity',  
             [ @configvalue = ] { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 }  [;]  
    RECONFIGURE  [;] 

2.通过命令方式,启动xp_cmdshell:

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

注:sp_configure具体使用参考:https://msdn.microsoft.com/zh-cn/library/ms188787.aspx

原文地址:https://www.cnblogs.com/popo1/p/10681728.html