Post

SQL Linked Server

A Microsoft SQL Server linked server allows one SQL Server to access data from another SQL Server instance or different data sources like Oracle, Access, or Excel. This setup enables querying and integrating data from multiple sources, facilitating data management and consolidation tasks.


Here on WIN1, we have a dummy database with 1 table named “Conversations”, we will try to link this server on WIN2 and access the data in this table.

x


On WIN2, create a new Linked Server

x


Point it to WIN1 and select the Server Type

x


Setup the local login credentials and set it to impersonate, because we have the same credentials on both server

x

  • Not be made: Connections will not be allowed for logins not defined in the list above.
  • Be made without using a security context: Connections will be made without any security context, meaning no user authentication will be provided.
  • Be made using the login’s current security context: Connections will use the security context of the currently logged-in user. The remote server will authenticate the user based on the credentials of the local login.
  • Be made using this security context: Connections will use a specified remote login and password. This option requires entering the remote login and its password, and the remote server will authenticate based on these credentials.


Now the WIN1 has been linked to WIN2, and we can query to WIN1 on WIN2

x

x

x


This post is licensed under CC BY 4.0 by the author.