Search code examples
sql-serverdatabaseconnection

How to connect two databases at the same time in SQL Server?


How to connect to two databases at the same time in SQL Server? i want to create a query from a local database db1 on some tables exist in an outside database db2. Im working with SQL Server.


Solution

  • The servers will need to be connected as a Linked Server in Server Objects, Linked Servers with a user that has access to both servers.