Configuring Linked Servers

Next Post
By Admin at 4 Nov 2014, 11:32 AM
  • You can use the instructions below to set up a linked server in SQL Server 2005.

    NOTE: Make sure that the SQL Server that you want to link to be configured so that you can access the SQL Server.

    Step 1: In the "Object Explorer" of Management Studio, go to Server objects->Linked Servers->New Linked Server

    undefined

    Step 2: Enter the SQL Server name for the database that you wish to link to in the "Linked Server" field. Also, select "SQL Server" in the Server Type field.

    undefined

    Step 3: Select the "Security" option in the menu on the left side of the screen.

    Step 4: In the bottom of the screen, select the option, "Be Made using this security context". Then, enter the username and password that should be used to connect to the sql server that you want to link to. After that, you can complete the configuration by clicking on the "Ok" button.

    Now, you should be able to run your query:

    undefined

    SELECT * FROM [server1].[Database Name].[Dbo].[Table Name] as table INNER JOIN [Linked Database Server].[Database Name]. [Linked Server Table Name] as linkedtable ON table.ID=linkedtable.ID SELECT * FROM [server1].[Database Name].[Dbo].[Table Name] as table INNER JOIN [Linked Database Server].[Database Name]. [Linked Server Table Name] as linkedtable ON table.ID=linkedtable.ID 

    Comments

     

    Post a comment

    Please correct the following: