您的位置:首页 > 其它

远程查询

2016-04-20 18:08 197 查看
/*

--开启远程访问

exec sp_configure 'show advanced options',1

reconfigure

exec sp_configure 'Ad Hoc Distributed Queries',1

reconfigure*/

select * from openrowset('SQLOLEDB','IP';'用户名';'密码',库名.dbo.表名)

/*

--关闭远程访问

exec sp_configure 'Ad Hoc Distributed Queries',0

reconfigure

exec sp_configure 'show advanced options',0

reconfigure */
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: