执行下面的语句时出错
select * from openrowset('sqloledb','server=10.10.10.2;uid=sa;pwd=sa','EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;') 原因是openrowset只能执行1句SQL语句, 不知道有没有其他办法恢复xp_cmdshell? 如果利用opendatasource也不行 RECONFIGURE是在本地执行
EXEC opendatasource('sqloledb','server=10.10.10.2;uid=sa;pwd=sa').master.dbo.sp_configure 'show advanced options', 1;RECONFIGURE;
EXEC opendatasource('sqloledb','server=10.10.10.2;uid=sa;pwd=sa').master.dbo.sp_configure 'xp_cmdshell', 1;RECONFIGURE;
select * from openrowset('sqloledb','server=10.10.10.2;uid=sa;pwd=sa','EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;') 原因是openrowset只能执行1句SQL语句, 不知道有没有其他办法恢复xp_cmdshell? 如果利用opendatasource也不行 RECONFIGURE是在本地执行
EXEC opendatasource('sqloledb','server=10.10.10.2;uid=sa;pwd=sa').master.dbo.sp_configure 'show advanced options', 1;RECONFIGURE;
EXEC opendatasource('sqloledb','server=10.10.10.2;uid=sa;pwd=sa').master.dbo.sp_configure 'xp_cmdshell', 1;RECONFIGURE;
[ @dllname = ] 'dll'
--启用xp_cmdshellUSE master
go
EXEC sp_configure 'show advanced options', 1
go
RECONFIGURE WITH OVERRIDE
go
EXEC sp_configure 'xp_cmdshell', 1
go
RECONFIGURE WITH OVERRIDE
go
EXEC sp_configure 'show advanced options', 0
go
RECONFIGURE WITH OVERRIDE
go
我说错了 不是恢复 是开启MSSQL2005的XP_CMDSHELL MSSQL2005默认是没开启XP_CMDSHELL的 TO 2楼兄弟: 我现在不能直接连上远程机器的MSSQ2005 只能通过1台SQL服务器做中转 通过openrowset等远程执行SQL语句. 本地开启XP_CMDSHELL的不能执行
请问这个能不能连成一句SQL使用?