Contact Form

Name

Email *

Message *

3 steps to Link server to SQL server

No comments
--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]

No comments :

Post a Comment