Presentation is loading. Please wait.

Presentation is loading. Please wait.

SSIS Templates, Configurations & Variables

Similar presentations


Presentation on theme: "SSIS Templates, Configurations & Variables"— Presentation transcript:

1 SSIS Templates, Configurations & Variables
Daniel Bowlin MCITP SSIS Templates, Configurations & Variables

2 A little about me SQL data warehouse developer with Time Warner Cable
Founder of the Capital Area SQL Server User Group in Albany NY Certified in the MS SQL Server BI stack About 15 years working with SQL Server and 4 years specialized in the BI Stack I blog on

3 Opening Credits I first learned about management frameworks and templates from two sources: SQL Server 2008 Integration Services, Problem-Design-Solution Most code presented is from this book Andy Leonard

4 What is a Management Framework?
Standardized development methods Metadata (configuration) change management VERY useful for moving through environments Package management and auditing Reusability Package template Helps reduce development time

5 Management Framework Components
Logging mechanism Package start & finish Individual task start & finish Package/task errors Variable value changes Optional ETL components Source vs. Target row count comparisons Standard deviation comparisons over time Additional ETL logging components

6 Logging Mechanisms A task that will log the start of a package using Execute SQL Task, a stored procedure, and some package values A task to log the completion of the package, same as start. Event handlers to log events in your packages execution

7 Logging Mechanisms Event handlers OnError logging for the package
OnPreExecute for tasks OnPostExecute for tasks OnVariableValueChanged

8 Management Framework Components
Common connections Database Mail Configuration management of Connectors Configurable variables Package template to pull it all together

9 Package Template A Package Template is the component that puts all the other components in one spot. Stored in (2008) Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems Accessed from an SSIS Project Right click Project>>Add>>New Item

10 Template Demo Review the components of template.

11 Package Configurations
Package configurations are like any config file. They help define the parameters used to run a program/package. Typically Name – Value pairs Can be different in different environments Can be manipulated during package execution Parent Package configurations

12 Package Configurations
Framework configurations contain 3 components An environment variable An XML File A SQL Server database table.

13 Package Configurations
The environment variable is pretty simple it is just a name value pair pointing to your XML file. System Applet in Control Panel Advanced Settings >> Environment Variables >> System Variables >> New Name: SSIS_Config_File Value: Path to XML File

14 Package Configurations
XML File contains the connection information to the database

15 Package Configurations
Database contains a table with all the configuration values the package will need. Dbo. SSIS Configurations

16 Package Configurations
The configuration table can contain property settings for: Variables Event Handlers Connection Managers Package properties Executable components

17 Package Configurations

18 Package Configurations
A few notes The configuration entry pointing to the Environment variable should be at the top of your configurations. The environment is read from the computer that calls the task. Tests using a local copy of SSMS may produce misleading results

19 Package Configurations
Parent Package Configurations Allow a parent package to control the any configuration value of a child package. Can direct the child package to behave differently depending on the value of the configuration variables passed from the parent.

20 Configurations Demo Demo configurations Add a new connection
Make the new connection a configuration Run a sample package Change configuration Rerun sample package

21 Development Standards
Every shop should have development standards and stick to them Naming conventions ProjectName_PackageName ProjectName_PackageName_VariableName Parent_VariableName Conn_DatabaseName (no server name) Deployment standards Promote to production standards Templates and configurations help keep things consistent. Annotate

22 Variable development & use
Along with configurations, variables can build a lot of flexibility into your packages Any value that you think might change at any time in the future should be put in a variable and given a configuration. Date ranges (in days ago) Distribution lists

23 Variable development & use
Variables are useful for Full queries Open query development Storing values retrieved from a db for use elsewhere in your package. In ETL processes I consider variables for row counts a necessity. Error handling management Error counters Max error count.

24 Variable development & use
Variables can be used to manage program flow in precedence constraints. Variables are limited in their use only by your imagination, time for development, and flexibility needs. A cool thing about variables is that they can have configurations as well

25 Variable development & use
Show a few samples of variable use

26 Review Management Framework & framework components
Logging and Auditing Template packages Package Configurations Development standards Variable use

27 Questions ????


Download ppt "SSIS Templates, Configurations & Variables"

Similar presentations


Ads by Google