How to link 2 SQL DB servers

If someone wants to get data from 2 tables from 2 different SQL DB server. Then execute below stored procedures before running your query.

Step1: exec sp_addlinkedserver    @server=db-server-name

Step2: EXEC sp_addlinkedsrvlogin db-server-name, false, NULL, id, password

Once you executed above SPs successfully, you can check linked server list by executing below SP.


exec sp_linkedservers

Popular posts from this blog

Calling REST APi from server side code - C#

All about SharePoint 2010 Content Type Hub

Calling ASP.Net WebMethod using jQuery AJAX