Selecting data from two different servers in SQL Server

后端 未结 15 1690

How can I select data in the same query from two different databases that are on two different servers in SQL Server?

15条回答
  •  隐瞒了意图╮
    2020-11-22 08:01

    Server Objects---> linked server ---> new linked server

    In linked server write server name or IP address for other server and choose SQL Server In Security select (be made using this security context ) Write login and password for other server

    Now connected then use

    Select * from [server name or ip addresses ].databasename.dbo.tblname
    

提交回复
热议问题