As we all know, Microsoft SQL Server Integration Services packages transfer data from different sources to different destinations, such as files, Excel Worksheets, SQL Database, and Oracle Database. Therefore, to extract the data or insert data, we need an appropriate SSIS Connection Manager.
The SSIS Connection Manager includes Connection Strings, the combination of Server instance Name, Database Name, provider Name, and credentials.
Built-in SSIS Connection Manager
SQL Server Integration Services provides different types of built-in Connection Managers. The SSIS package will connect to different types of Data Sources such as Oracle, Access, Excel, Text File, SQL Server, and SQL Server Analysis Services using Connection Manager. The below table shows the list of SSIS Connection Managers.
Please refer to the SSIS Cache Connection Manager article to understand the configuration settings.
|ADO||It connects with ActiveX Data Objects. Or it can be called an ADO object. Please refer ADO article to understand the configuration settings.|
|ADO.NET||It connects to a data source by using a .NET provider. Please refer ADO.NET article.|
|CACHE||Reads data from the data flow or a cache file (.caw) and can save data to the cache file.|
|DQS||It connects to a Data Quality Services server and a Data Quality Services database on the server.|
|EXCEL||It connects to an Excel workbook file. Please refer to Excel to understand the configuration settings.|
|FILE||It connects to a file or a folder. Please see the File article to know the configuration settings.|
|FLATFILE||Connect to data in a single flat file.|
|FTP||It will connect to an FTP server. Please refer to the FTP article.|
|HTTP||It connects to a web server.|
|MSMQ||It connects to a message queue.|
|MSOLAP100||It connects to an instance of SQL Server Analysis Services or an Analysis Services project.|
|MULTIFILE||It connects to multiple files and folders.|
|MULTIFLATFILE||It connects to multiple data files and folders.|
|OLE DB||It connects to a data source by using an OLE DB provider. Please refer OLE DB article to understand the configuration settings.|
|ODBC||It connects to a data source by using ODBC.|
|SMOSERVER||It connects to a SQL Server Management Objects (SMO) server. Please refer SMO article to understand the configuration settings.|
|SMTP||It connects to an SMTP mail server.|
|SQL MOBILE||It connects to a SQL Server Compact database.|
|WMI||It connects to a server and specifies the scope of Windows Management Instrumentation (WMI) management on the server.|
Flat File Connection Manager
Configuring SSIS Connection Manager
In SQL Server Integration Services or SSIS, there are two types of Connection managers: Package Level and Project Level Connection Managers.
Configuring Project Level Connection Manager in SSIS
If you configure the Project Level SSIS Connection Manager, the connection is available to all the packages we created under that project. If you need that connection in multiple packages, creating Project Level Connection Managers in SSIS is good practice.
TIP: In real-time, we mostly use Project Level Connection Managers. But there are some situations where we use package-level connection managers.
This SSIS example shows how to create or configure Project Level Connection Managers in SQL Server Integration Services.
Once you have created a new Project, if you look at the Solution Explorer, we have a few folders. For now, let us concentrate on the Connection Managers Folder.
Right-click on the Connection Managers folder in the solution explorer and select the New option from the menu.
When you click on this option, an Add Connection Manager window opens to select the type from the list.
For the time being, We selected the OLE DB connection manager from the list. Once we set the OLE DB, then another window form of Configure OLE DB opened to configure the data connections.
If you observe the above, the Data Connections pane is empty because we have not created any connection managers. If we had created them before, we could select them here instead of creating them repeatedly.
Click on the new button from the above screenshot will open another window of Connection Manager. Use this to select the Provider, Server Name, and Database Name.
From the above screenshot, you can observe that we are using our local host windows account as the server name and [AdventureWorks2014] as the database name.
NOTE: You must select the Use Server Authentication option in real time. Next, provide the valid credentials given by your Admin person.
Click on the Test Connection button provided below to check whether the connection is successful or not.
Once we finish configuring it, the OLE DB connection manager’s name will display in the Data connection pane. So select the created connection manager and click ok.
We successfully created the Project level SSIS Connection Manager.
You can observe the Project Level Connection Manager from the screenshot above.
Configuring Package Level Connection Managers in SSIS
If you configure Package Level Connection Managers, the connection will be available to that particular package. You can’t access it outside the package.
TIP: If you need that connection in one package and don’t use it in another package, then there is no point in creating Project Level Connection Managers. So, go for Package Level Connection Manager.
Right-click on the Connection Managers pane at the bottom of the package designer. It will pop up in the context menu to select the connection manager.
This Context Menu will show some frequently used connection managers (OLE DB, Flat File, ADO.NET, Analysis Services, and File Connection). If you don’t find the required one, select the New Connection option.
In this example, we are creating the OLE DB Connection Manager. We can select the New OLE DB Connection option from the Context Menu. But if you observe from the above screenshot, We chose the New option. It helps you to understand the similarities while creating SSIS Connection Managers.
When you click on the New option, an Add Connection Manager window form will open to select the one from the provided list.
Here we selected the OLEDB Connection Manager. Again we have to follow the step mentioned earlier to configure it.
The above screenshot shows that there is one Project Level Connection Manager and one Package Level SSIS Connection Manager.