A Microsoft platform for building enterprise-level data integration and data transformations solutions.
Hi @Mohammad Qasim ,
What you're describing is possible, but it's generally recommended to separate configuration management from ETL execution.
In SSIS, a common approach is:
- Store the connection details (server, database/service name, user name, password, etc.) in a SQL Server configuration table.
- Read those values at package startup (for example using an Execute SQL Task and SSIS variables).
- Build the connection strings dynamically using expressions or within a Script Task.
- Use the appropriate .NET providers:
- PostgreSQL: Npgsql
- Oracle: Oracle Managed Data Access
- MySQL: MySQL Connector/NET
- Oracle: Oracle Managed Data Access
- PostgreSQL: Npgsql
Inside a Script Task, you can retrieve the configuration values from SQL Server, construct the provider-specific connection strings, and create the corresponding DbConnection objects (NpgsqlConnection, OracleConnection, MySqlConnection).
However, if the goal is to perform the actual ETL (extract, transform, and load), consider whether SSIS Connection Managers and Data Flow Tasks can be used instead of implementing the entire data movement logic in C#. This typically provides better maintainability, logging, error handling, and performance than performing all ETL operations inside a Script Task.
Could you clarify whether you only need the Script Task to retrieve the connection information dynamically, or whether you intend to perform all source extraction and destination loading inside C# code? The recommended design may differ depending on that requirement.
Thanks,
Akhil.