SSIS Packages primary objective is to move data from a source to a destination database. The Sources can be a flat file, a SQL Server Database, an Oracle Based DB, FTP Server, Excel File, Access DB, etc. [1]
Choosing the right Data source control will be the first step in improving performance of your SSIS package. The naming standards require Data Flow Sources to be named as in the example “SRC Get Customer Orders”.
The most commonly used Data flow sources by MS BI Developers are
OLE DB
Most commonly used, Reads Data from Views, SQL Queries, Tables and Variables. Simple to configure and use
Uses MS Default OLE DB Providers and generates the metadata based on the column data type.
Works best for SQL Server Databases that do not have huge volume of records.
ADO.NET
Uses ADO.NET Providers to connect to Data sources.
Use ADO.NET when you want to avoid oracle SQL data type mismatches, 64 bit runtime engines and when you have a provider that is not supported by OLEDB.
ADO.NET Source is a little bit more efficient in managing its buffer memory usage so preferred when the source data set volume is very high.
ADO Sources can have the SQL Command assigned from variables by assigning the SQL Command Property of the ADO Source from the Parent Data Flow Control. The variable can be built by expressions.[2]
The Flat file and the Excel File Data flow sources are other commonly used data flow Sources.
Use the SQL Command to select data from the Source rather than the View or Table. Do not use Select (*) Statements as the Control will take up more memory to determine the column Metadata.
The SQL Query should contain code to do data type conversions that might be required. For e.g. Convert and Cast Statements can be embedded in the SQL, rather than adding a separate transformation to convert data types. Add an order by to the SQL Statement rather than adding a Sort Transformation.
[1] Supported Data Sources – Technet Article
[2] MSDN Forum Configuring ADO NET Source Query using Variables
