For selecting the data from two databases of two different servers, first we have to link the two servers.
sp_addlinkedserver('servername')
Then you can run the query like,
select * from Table1
unionall
select * from [server2].[database].[dbo].[Table1]
sp_addlinkedserver('servername')
Then you can run the query like,
select * from Table1
unionall
select * from [server2].[database].[dbo].[Table1]