Wednesday, September 8, 2010

Linked servers in SQL Server









It is a different field, I want to focus more. What is this?? linked server ..................


 Access to the resource in another server can be done using linked server. Since I am buying a server named "ServerA" and I would take some data on the remote server named ServerB". In this case, we need to create a linked server. We have a situation associated with the server is "ServerB"

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


Goto SSMS-> Your DB Server-> Server Objects-> Linked Server->Create new Linked Server
                                                                                                                   
You will get a message box to type your Linked server. You need to provide the servername.

Specify whether the SQL Server or not. If SQL Server, to provide the information necessary for connection.



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






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


                                              Now, your Linked Server is created.





Now you see listed in the catalogs of the linked server.


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

SELECT * FROM LinkedServer.SANDEEPDB.dbo.SANDEEP_TABLE


Awesome, am able to see my data.















































SPONSORS:

No comments:

Post a Comment