Professional Documents
Culture Documents
1. Keep it simple.
Avoid using components unnecessarily.
eg:
Step 2. Use ExecuteSQLTask in the control flow to execute an SQL query to get the server datetime and
store it in the variable
Step 3. Use the dataflow task and insert/update database with the server date time from the variable
varServerDate.
This sequence is advisable only in case where the time difference from step 2 to step 3 really matters. If
that doesn't really matter, then just use the getdate() command at step 3 as shown below.
2. Calling a child package multiple times from a parent with different parameter values.
When a child package is executed from a master package, the parameters that are passed from master
need to be configured in the child package. For this, you can use the ‘Parent Package Configuration’ option
in the child package. But, for using the ‘Parent Package Configuration’, you need to specify the name of
‘Parent Package Variable’ that is passed to the child package. If you want to call the same child package
multiple times (each time with a different parameter value), declare the parent package variables (with
same name as given in the child package) with a scope limited to the ‘Execute Package Tasks’.
SSIS allows declaring variables with same name but scope limited different tasks – all inside the same
package!
5. Transactions
Usually the ETL processes handle large volumes of data. In such a scenario, do not attempt a transaction
on the whole package logic. However, SSIS supports transaction and it is advisable to use transactions
where the atomicity of the transaction is taken care of.
For example, consider a scenario where 1 source record is to be spitted into 25 records at the target -
where either all the 25 records reach the destination or zero. I this scenario, using a transaction we can
ensure either all the 25 records reach the destination or zero.
8. Select * from…
Make sure that, you are not passing any unnecessary columns from the source to the downstream. With
the OLEDB connection manager source, using the ‘Table or view’ data access mode is equivalent to
‘SELECT * FROM <TABLE_NAME>’ which will fetch all the columns. Use the ‘SQL command’ to fetch only
the required columns and pas that to the downstream. At each down-stream component, filter out the
unnecessary columns.
9. Sorting
Sorting in SSIS is a time consuming operation. At the places where we know that data is coming from
database tables, it’s better to perform the sorting operation at the database query itself.
12.Protection
To avoid most of the package deployment error from one system to another system, set package
protection level to ‘DontSaveSenstive’.