How can I select data in the same query from two different databases that are on two different servers in SQL Server?
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