Code
方法一:
--临时连接
select
top 100 *
from
OPENDATASOURCE(
'SQLOLEDB',
'Data Source=192.168.1.254;User ID=owner;Password=123456'
).fuliaonetcncn.dbo.t_member_user
方法二:
--创建链接服务器
exec sp_addlinkedserver 'srv_lnk','','SQLOLEDB','192.168.1.254'
--登入
exec sp_addlinkedsrvlogin 'srv_lnk','false',null,'owner','123456'
--添加存储过程控制权限
exec sp_serveroption 'srv_lnk','rpc out','true'
--select update detele
select top 10 * from srv_lnk.fuliaonetcncn.dbo.t_member_user
select top 10 * from srv_lnk.fuliaonetcncn.dbo.t_member_user
--删除连接服务
exec sp_dropserver 'srv_lnk','droplogins'
posted @
2009-01-17 11:23
挟风凌月
阅读(
221)
评论()
编辑
收藏
举报