--Step 1
EXEC sp_addlinkedserver @server='DBServer', @srvproduct='',@provider='SQLOLEDB', @datasrc='servername'
---Step 2
EXEC sp_addlinkedsrvlogin 'DBServer', 'false','localusername','serverusername','serveruserpassword'
--Step 3
select * from DBServer.[databasename].dbo.[tablename]
EXEC sp_addlinkedserver @server='DBServer', @srvproduct='',@provider='SQLOLEDB', @datasrc='servername'
---Step 2
EXEC sp_addlinkedsrvlogin 'DBServer', 'false','localusername','serverusername','serveruserpassword'
--Step 3
select * from DBServer.[databasename].dbo.[tablename]
No comments :
Post a Comment