SSIS Development Best Practices
After searching for many Best practices and finally we found some which we fallow regularly
Development Best Practices
Development Best Practices
1. Rename all Name and Description properties from the default. This will help when debugging particularly if the person doing the debugging is not the person that built the package
- Only select columns that you need in the pipeline to reduce buffer size and reduce On Warning events at execution time
- Use Sequence containers to organise package structure into logical units of work. This makes it easier to identify what the package does and also helps to control transactions if they are being implemented.
- Use caching in your LOOKUP components where possible. It makes them quicker. Watch that you are not grabbing too many resources when you do this though.
5. Use naming conventions for your tasks and components
The acronyms below should be used at the beginning of the names of tasks to identify what type of task it is.
Task
|
Prefix
|
For Loop Container
|
FLC
|
Foreach Loop Container
|
FELC
|
Sequence Container
|
SEQC
|
ActiveX Script
|
AXS
|
Analysis Services Execute DDL
|
ASE
|
Analysis Services Processing
|
ASP
|
Bulk Insert
|
BLK
|
Data Flow
|
DFT
|
Data Mining Query
|
DMQ
|
Execute DTS 2000 Package
|
EDPT
|
Execute Package
|
EPT
|
Execute Process
|
EPR
|
Execute SQL
|
SQL
|
File System
|
FSYS
|
FTP
|
FTP
|
Message Queue
|
MSMQ
|
Script
|
SCR
|
Send Mail
|
SMT
|
Transfer Database
|
TDB
|
Transfer Error Messages
|
TEM
|
Transfer Jobs
|
TJT
|
Transfer Logins
|
TLT
|
Transfer Master Stored Procedures
|
TSP
|
Transfer SQL Server Objects
|
TSO
|
Web Service
|
WST
|
WMI Data Reader
|
WMID
|
WMI Event Watcher
|
WMIE
|
XML
|
XML
|
These acronyms should be used at the beginning of the names of components to identify what type of component it is.
Component
|
Prefix
|
DataReader Source
|
DR_SRC
|
Excel Source
|
EX_SRC
|
Flat File Source
|
FF_SRC
|
OLE DB Source
|
OLE_SRC
|
Raw File Source
|
RF_SRC
|
XML Source
|
XML_SRC
|
Aggregate
|
AGG
|
Audit
|
AUD
|
Character Map
|
CHM
|
Conditional Split
|
CSPL
|
Copy Column
|
CPYC
|
Data Conversion
|
DCNV
|
Data Mining Query
|
DMQ
|
Derived Column
|
DER
|
Export Column
|
EXPC
|
Fuzzy Grouping
|
FZG
|
Fuzzy Lookup
|
FZL
|
Import Column
|
IMPC
|
Lookup
|
LKP
|
Merge
|
MRG
|
Merge Join
|
MRGJ
|
Multicast
|
MLT
|
OLE DB Command
|
CMD
|
Percentage Sampling
|
PSMP
|
Pivot
|
PVT
|
Row Count
|
CNT
|
Row Sampling
|
RSMP
|
Script Component
|
SCR
|
Slowly Changing Dimension
|
SCD
|
Sort
|
SRT
|
Term Extraction
|
TEX
|
Term Lookup
|
TEL
|
Union All
|
ALL
|
Unpivot
|
UPVT
|
Data Mining Model Training
|
DMMT_DST
|
DataReader Destination
|
DR_DST
|
Dimension Processing
|
DP_DST
|
Excel Destination
|
EX_DST
|
Flat File Destination
|
FF_DST
|
OLE DB Destination
|
OLE_DST
|
Partition Processing
|
PP_DST
|
Raw File Destination
|
RF_DST
|
Recordset Destination
|
RS_DST
|
SQL Server Destination
|
SS_DST
|
SQL Server Mobile Destination
|
SSM_DST
|
6. If you need a dynamic SQL statement in an OLE DB Source component, set AccessMode="SQL Command from variable" and build the SQL statement in a variable that has EvaluateAsExpression=TRUE
7. If you want to conditionally execute a task at runtime use expressions on your precedence constraints. Do not use an expression on the "Disable" property of the task.
8. When storing information about an OLE DB Connection Manager in a configuration, don't store the individual properties such as Initial Catalog, Username, Password etc... just store the ConnectionString property
9. Your variables should only be scoped to the containers in which they are used. Do not scope all your variables to the package container if they don't need to be
- Use ProtectionLevel=DontSaveSensitive. Other developers will not be restricted from opening your packages and you will be forced to use configurations (which is another recommended best practice)
11. Use annotations wherever possible. At the very least each data-flow should contain an annotation
- Don't include connection-specific info (such as server names, database names or file locations) in the names of your connection managers. For example, "OrderHistory" is a better name than "Svr123ABC\OrderHist.dbo".
13. Change the network packet size in the connection manager , Higher value typically yield faster through put Max value : 32767
Comments
Post a Comment