Sql Server - Creating New Linked Server

In the management studio connect to the server.  Then expand the "Server Objects" and linked Servers should be underneath that.  Right click Linked Servers -> New Linked Server.  In the pop up fill in the name of the remote server (ex servername.domain.lan or something similar, same as the network name of the server).  Also select "Sql Server" for Server Type since I am connecting to another Sql server instance. local login for this server, the Remote user, and the remote password.  On the bottom select "Be made using this security context", and input the same remote credentials as above.

After created it will be possible to use the linked server in selects like below.  use the Remote Server name same as the linked server name.Schema name is usually dbo.

FROM dbo.FirstTable as F
LEFT JOIN [RemoteServer].RemoteDB.dbo.RemoteTable as R on F.id=R. id

Comments

Popular posts from this blog

Asp.net Publishing Broke Site - "App_WebReferences is not allowed because the application is precompiled"

Telerik - Custom Group Footers In RadGrid

Bootstrap Modal Popup is Grayed Out