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

SQL Server2008 xp_cmdshell啟用-LMLPHP

修改系统数据库参数:

  语法格式:
    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

04-25 18:27
查看更多