Hi @Mike ,
You could also have a try with Linked Servers.
Linked servers offer the following advantages:
- The ability to access data from outside of SQL Server.
- The ability to issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise.
- The ability to address diverse data sources similarly.
You could get to them in SSMS from the following location in the tree of the Object Explorer:
Server Objects-->Linked Servers
or you can use sp_addlinkedserver.
Then you could query as follows:
select * from LinkedServerName.DatabaseName.OwnerName.TableName
After you created two linked servers in C_Server1, then you could use below query:
Use C_Server1
go
select * from [Per_A].[dbo].[YTR] where surname like '%Test%'
go
select * from [C_Server2].[Cer_A].[dbo].[YTR] where surname like '%Test%'
go
select * from [C_Server3].[Uer_F].[dbo].[YTR] where surname like '%Test%'
go
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.