Hi Hammad,
You could have a try with SSIS to dynamically set up the connection string.
Please refer below links and check whether they are helpful to you. Thanks.
SSIS Dynamic String Connection
How to create dynamic Connection String in SSIS Package???
Wishes
Melissa
""SQL Server related"" forum will be migrated to a new home on
Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on
Microsoft Q&A SQL Server
!
For more information, please refer to the
sticky post.