I am planning to design an application which would fetch data from a common database located in different servers.
Ex:
- Database A in Server SQLSRV001
- Database A in Server SQLSRV002
- etc
I have a sql select query which is to be executed in Database A located in different servers.
select * from Database A where column1='' and column2=''
I wanted to know if it is possible to create a dynamic connection object such that it uses the same select query and takes the several server number as user (or a hard-coded) input. It executes the select query in the database and brings back the result. Then takes the next server number in line as input, fetches the data, etc.. This goes on until all the server numbers are done with.
Any insight on this would be gladly accepted.