I have two SQL Server 2008 located in different cities.

I have physical access to one of them and I can exec SQL Server Management Studio there.

For second server I have following parameters:

  • remote domain name
  • remote port
  • login
  • password

With these parameters I can connect to second server with SQL Server Management Studio.

But now, I have to create cross server queries. It is possible? How? :)

Do I have to add Linked Server? How?

I see only this window, but where do I writer domain/port/login/password info?

enter image description here

3 Answers 3


Change the server type to SQL server, put the servername,port number in the Linked Server name; on the Security section, change to "Be made using this security context" and enter the user name/password, assuming they are SQL Authentication credentials.


Instead of adding the linked server in the GUI (as alread described in SqlACID's answer), you can also add it by executing the system procedure sp_addlinkedserver instead.

To actually query tables from the linked server, your queries need to look like this:

SELECT * FROM Server.Database.Schema.Table

Create a linked server is quite simple. Follow the below steps- Step 1 – Connect SQL server, using 'Database Engine' as server type along with proper Server name and authentication.

Step 2 – Into object explorer, navigate to linked server under 'Server Objects'.

Step 3 – Right click on 'Linked Servers' - select 'New Linked Server'. Fill all the required detail in respective dialog.

Step 4 – After filling the entire details click on Ok button, Linked server is configured and it should work. In case if it doesn't respond, once restart the SQL server.

For more detail click here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.