Presentation is loading. Please wait.

Presentation is loading. Please wait.

Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create.

Similar presentations


Presentation on theme: "Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create."— Presentation transcript:

1 Template Package  Presented by G.Nagaraju

2  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create Template Package?  How we add Template Package to normal Package? Agenda

3  One of the most desired feature in SSIS packages development is re-usability. Being a developer, you may need standard packages that can be re-used during different ETL development.  In SSIS, this can be easily achieved using template features. SSIS template packages are the re-usable packages that one can use in any SSIS project any number of times. What is Template Package?

4 Why we use Template Package?

5  You can reuse these items when you use a package template to create a new package. You may want to reuse the following items in a package template: Connection Managers and Log Providers: Log Provider is common thing in almost all the packages. You can create a package that includes a connection manager and a log provider. You can also use that package as a template for other packages.  Common Variables and Configurations: In most of the packages you may use common variables and same configurations.  Event Handlers: You may need to use same event handlers or error handling across ETL packages in a project.  Send Mail tasks: You can create a package that contains an SMTP connection manager, a Send Mail task, and a property expression to build the Subject line. Use this package as a template to create other packages that notify you by e-mail when the package runs successfully or generates an error.  Common Task: I have seen many projects where many tasks are common across 70% packages e.g. Execute SQL Task, Data Flow elements, and Control Flow elements. It may differ project to project but its always good idea to encapsulate the common task in a tamplate and use it wherever required. Where we use Template Package?

6  Below are the steps to create a new package template in SQL Server Business Intelligence Development Studio: 1. Start SQL Server Business Intelligence Development Studio. Click File, point to New, and then click Project. 2. In the New Project window, click Business Intelligence Projects, and then clickIntegration Services Project under Visual Studio installed templates, type a name for the project, and then click OK. 3. Add the items that you want from the Toolbox to the Package.dtsx file. Once you are done with pachake template development, Click File, and then click Save Selected Items. Note: Give a package name that describes the functionality of the package. 4. Click File, and then click Save Copy of PackageName As. Here filename is the name of package. In the Save Copy of Package dialog box, click File System in the Package location box, type the following path in the Package path box, and then click OK. In this path, drive is the hard disk where Microsoft Visual Studio is installed: How we create Template Package?

7  For SQL Server 2005 >:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems OR >:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems For SQL Server 2008 >:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems OR >:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems For SQL Server 2012 >:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems OR >:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\DataTransformationProject\DataTransformationItems

8  1. Start SQL Server Business Intelligence Development Studio. Click File, point to New, and then click Project. 2. In the New Project window, click Business Intelligence Projects, and then clickIntegration Services Project under Visual Studio installed templates, type a name for the project, and then click OK. 3. In Soultion Explorer, right click on Project name, click on Add and then New Item... Under Visual Studio installed templates, click the template that you want, type a name for the template, and then click Add. In the below screen-shot, MyPkgTemplate is a template I saved in my system.  Note: The default name for the template in the Name box is the name of the template plus an incremented counter. For example, if the template name is MyPkgTemplate.dtsx, the default name is MyPkgTemplate1.dtsx. How we add Template Package to normal Package?

9 Advantages

10  3) Using template In your project go to the Solution Explorer and right click on the project and choose Add, New Item... Solution Explorer: Add new item... Now choose your template and give the package a suitable name (*). Select your new template 4) Change ID Your newly created package gets the same package GUID as the original template file. You have to generate a new GUID for you package. If you don't do that, things like logging could be a problem because you can't distinguish the packages by ID. Also see/vote for this feedback at Microsoft Connect Generate new ID / GUID (*) An other bug is that when you enter a new name in the wizard, it only changes the filename and not the internal object name. It's better to just use the given default name and then rename it in the Solution Explorer. Renaming in the Solution Explorer will also give you the option to rename the internal object name. Note: Changes made in a template file doesn't effect existing packages based on that template.generate a new GUIDsee/vote for Conclusion

11 Queries? ies?

12 Thank You…


Download ppt "Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create."

Similar presentations


Ads by Google