现有A、B两台服务器,A的IP:172.16.168.6;B的IP:172.16.168.9
在A台上打开SQL查询分析器界面,执行以下语句,想远程开启B的xpcmdshell功能
exec OPENDATASOURCE('SQLOLEDB', 'Data Source=172.16.168.9;User ID=sa;Password=sa').master.dbo.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE;
exec OPENDATASOURCE('SQLOLEDB', 'Data Source=172.16.168.9;User ID=sa;Password=sa').master.dbo.sp_configure N'xp_cmdshell', N'1' RECONFIGURE WITH OVERRIDE;
exec OPENDATASOURCE('SQLOLEDB', 'Data Source=172.16.168.9;User ID=sa;Password=sa').master.dbo.sp_configure N'show advanced options', N'0' RECONFIGURE WITH OVERRIDE;
提示错误:
配置选项 'show advanced options' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。
消息 15123,级别 16,状态 1,过程 sp_configure,第 62 行
配置选项 'xp_cmdshell' 不存在,也可能是高级选项。
配置选项 'show advanced options' 已从 1 更改为 0。请运行 RECONFIGURE 语句进行安装。
但是在B台服务器本机上又能正常运行以上语句,请问:这个xp_cmdshell选项不能远程开启或关闭么?还是有哪里需要设置?