Вы находитесь на странице: 1из 30

The Worlds Largest Community

of SQL Server Professionals

Top 10 SSIS Best Practices


Tim Mitchell
Artis Consulting

Session Objectives
Review and discuss common best
practices
Q&A

The Worlds Largest Community of SQL Server Professionals

Tim Mitchell
Business Intelligence Consultant
Artis Consulting, Dallas TX
Contributing author, MVP Deep Dives
2
Coauthor, SSIS Design Patterns
North Texas SQL Server User Group
SQL Server MVP
TimMitchell.net |
Twitter.com/Tim_Mitchell
The Worlds Largest Community of SQL Server Professionals

Housekeeping
Questions
Surveys

The Worlds Largest Community of SQL Server Professionals

Disclaimer
My best practices != the only way

The Worlds Largest Community of SQL Server Professionals

Best Practice #1:


Configurations
Externalize logic for packages
Easier administration, maintenance
Change once globally

The Worlds Largest Community of SQL Server Professionals

Best Practice #1:


Configurations

The Worlds Largest Community of SQL Server Professionals

Best Practice #1:


Configurations

The Worlds Largest Community of SQL Server Professionals

Best Practice #2:


Package Protection Level
Never use
EncryptSensitiveWithUserKey
When possible, use
DontSaveSensitive
Previous tip

If you must encrypt, use


EncryptSensitiveWithPassword or
EncryptAllWithPassword
The Worlds Largest Community of SQL Server Professionals

Best Practice #2:


Package Protection Level

The Worlds Largest Community of SQL Server Professionals

Best Practice #3: Row Count


Audit
In/out rowcount for proper package
audit
Insure precise control over data
pipeline
May help satisfy regulatory
requirements

The Worlds Largest Community of SQL Server Professionals

Best Practice #3: Row Count


Audit

The Worlds Largest Community of SQL Server Professionals

Best Practice #3: Row Count


Audit

The Worlds Largest Community of SQL Server Professionals

Best Practice #4: Lookup Cache


Modes
Default = Full Cache
Full Cache is case sensitive, other
modes depend on database collation
UPPER() and LOWER()

Partial cache
No cache avoid if possible

The Worlds Largest Community of SQL Server Professionals

Best Practice #4: Lookup Cache


Modes

The Worlds Largest Community of SQL Server Professionals

Best Practice #5: Event


Handlers
Handle various events, errors and
otherwise
Address errors inline
Respond to other events

The Worlds Largest Community of SQL Server Professionals

Best Practice #5: Event


Handlers

The Worlds Largest Community of SQL Server Professionals

Best Practice #6: Small SSIS


Packages
One package = one logical unit of
work
Load a fact table
Load a single dimension

Easier to debug
Faster validation
Reusability

The Worlds Largest Community of SQL Server Professionals

Best Practice #6: Small SSIS


Packages

The Worlds Largest Community of SQL Server Professionals

Best Practice #7: Logging


Log errors, warnings
Capture other standard events
Custom logging (supplement)

The Worlds Largest Community of SQL Server Professionals

Best Practice #7: Logging

The Worlds Largest Community of SQL Server Professionals

Best Practice #8: Script instead of


complex expression
Replace complex expressions with
script task or script component
Easier to develop
Inline comments
Intellisense
Error handling

The Worlds Largest Community of SQL Server Professionals

Best Practice #8: Script instead of


complex expression

The Worlds Largest Community of SQL Server Professionals

Best Practice #9: Naming


Convention
Use descriptive names for
containers, tasks, components
Use a standard naming convention
for SSIS objects
No functional difference, but helps to
quickly identify type
SSIS API

The Worlds Largest Community of SQL Server Professionals

Best Practice #10: MERGE


T-SQL MERGE statement usually
outperforms SSIS SCD components
(native or 3rd party)
Some limits on use
Staging

The Worlds Largest Community of SQL Server Professionals

Best Practice #11:


Annotations
Document, document, document
Easy value add

The Worlds Largest Community of SQL Server Professionals

Best Practice #12: Variables


Naming convention
Package scope
Expressions

The Worlds Largest Community of SQL Server Professionals

Best Practice #13: ETL


Frameworks
Managed execution of packages
Group packages according to
function, dependency, and
precedence
Unified logging and error handling
Free and commercial tools

The Worlds Largest Community of SQL Server Professionals

Best Practice #14:


Custom Components
Repetitive use of the same logic in
multiple packages
Custom component allows easy
deployment

The Worlds Largest Community of SQL Server Professionals

The Worlds Largest Community


of SQL Server Professionals

Thanks for Attending


Visit www.sqlservercentral.com for free SQL Server
eBooks, articles, videos, blogs, news, and more.
Please Dont Forget to Turn in Your Evaluations

Вам также может понравиться