Create a database connection based on a list of servers.

José Abelardo Vicente Filho 21 Reputation points
2022-09-26T17:37:43.19+00:00

I'm creating an ETL process in visual studio using SSDT, I'm having trouble creating a database connection at runtime.

I have a list with more than 400 servers: ip, port and bank, with this information I have to create a connection with the bank to run several extraction scripts, the scripts are the same for all, but I can't create this procedure to have only a Data Flow. instead of one for each server in the list.

Can anyone help me create this routine?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,857 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,462 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dave Patrick 426.2K Reputation points MVP
    2022-09-26T17:38:39.333+00:00

    Q&A forums are currently English only. I'd try asking for help over here in dedicated forums.
    https://social.msdn.microsoft.com/Forums/pt-br/home
    https://social.technet.microsoft.com/Forums/pt-br/home
    https://answers.microsoft.com/pt-br

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.
    0 comments No comments

  2. ZoeHui-MSFT 33,386 Reputation points
    2022-09-27T07:21:48.79+00:00

    Hi @JosAbelardoVicenteFilho-8356,

    You may try to use Foreach Loop Container and variables to dynamically build connection to multiple SQL Servers.

    A same thread you may take a reference to here.

    Or you may try with script task as shown here.

    If I misunderstand your issue, please incorrect me.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.