Linked Server Concept in SQL Server


Linked Server

It's quite a different area, which I would like to concentrate more. What's this???? linked server......

Accessing the resource in the other server can be achieved using Linked server. Considering am having a server named "ServerA" and I would like to grab some data from the remote server named "ServerB". In that case, we need to create a linked server. In our scenario, the linked server is "ServerB".

Let's see, How to link it? How to access the data?

Goto SSMS -> Your DB Server -> ServerObjects -> Linked Server - > Create new Linked Server.

1.gif
 
You will get a message box to type your Linked server. You need to provide the servername.

Specify whether it's SQL Server or not. If it's not SQL Server, provide necessary details to connect it.

2.gif
 
The second window is authentication, you need to specify the credentials used to access the Linked Server.

3.gif
 
The third window specifies the options to be provided for the Linked server. If everything is good. Click "Ok" button. 

4.gif
 
Now, your Linked Server is created. 

5.gif
 
Now, you can see your catalogs listed under the Linked Server. 

6.gif 

Now, am trying to access the Linked Server's table,

SELECT * FROM LinkedServer.VENKATDB.dbo.VENKAT_TABLE

Awesome,

Am able to see my data.

7.gif


Similar Articles