Aim :- To Learn a New way of deployment model in MS SQL Server Integration Services i.e. SSIS 2012.
Description :- In this article we are going to learn a New way of deployment model in SSIS 2012. It’s always been a challenge & a difficult thing for SSIS developers at the time of package deployment. It’s a brand new feature in SSIS coming with MS SQL Server 2012. Prior to this version, it was a tedious process to deploy SSIS packages in Legacy model. We can call this new deployment model in SSIS 2012 as “Project Deployment Model in SSIS”.
Why we call this as Project deployment model in SSIS and what is the reason behind this?
In the new deployment model in SSIS, we don’t have any option & we are unable to deploy the packages individually. Just we have deployment option at Project level only, that’s why we can call this as “Project Deployment Model”. The new Project Deployment Model in SSIS includes Project/Package Parameters, Environments, Environment variables and Environment references.
Project/package parameters :- In this new deployment model, we can declare project parameters/package parameters. The major difference between these two parameters is “scope”. You can create project parameters at project level and package parameters at package level.
We can use project parameters to any package in the project, package parameters can only use to that package only. These parameters allow us to assign values to the properties within at the time of package execution. Project parameters are used to supply any external input the project receives to one or more packages in the project.
In the above screen shot you can clearly observe project parameters option. Once you click and open it appears like left side image. The best part of these parameters is that you can mark any of them as sensitive and it will be stored in an encrypted form in the catalog.
There can be three default values for these parameters :-
- Design Default value is assigned and used in BIDS.
- Server Default value is assigned when project comes in the catalog and overwrites the Design Default value.
- Execution value is assigned in reference to a specific environment variable during execution.
Environments and Environment variables :-
We have different type of environments like Development, Test and Production. It is a place for environment variables which are used to apply different groups of values to the properties of package components by means of environment reference during runtime. An environment reference is the mapping between an environment variable to pass a value to a property of a package component. A project can have multiple environment references.
To know more about project/package parameters, environments and environment variables you can visit – www.msdn.com.
Integration services catalog :-
In the below theoretical part we will frequently use “catalog” term. Now we are going to discuss what is integration services catalog, where it exists?
This is the brand new feature in MS SQL Server 2012. It comes with SQL Server Management Studio (SSMS). It stores the data about deployed projects including packages, variables and environments. We must know one mandatory thing i.e. “we can create only one catalog per instance”. When you create a catalog you need to provide a password which will be used to create a database master key for encryption and therefore it’s recommended that you back up this database master key after creating the catalog.
The catalog uses SQLCLR (the .NET Common Language Runtime (CLR) hosted within SQL Server), so you need to enable CLR on the SQL Server instance before creating a catalog.
Finally let’s jump into practical session with example – My best part of any article.
STEP 1. Create integration services catalog.
- Open SSMS and Go to Integration Services Catalog. Right click on that and choose Create catalog.
- Once you click on Create catalog option, below window will pop up. After filling the desired values, Click OK button.
- Once you click on OK button, One “ssisdb” database is created.
- It’s time to create one folder inside ssisdb database. When we are going to deploy our project than that total content is deployed in this folder only.
- To create a folder, Just click on ssisdb. Right click on ssisdb and choose create folder option.
- Once we click on Create folder, the below window will appear.fsf
STEP 2. Create Integration services project in BIDS.
- Once we create a folder named “Test”, it’s time to go and create 1 Integration Services project in BIDS.
- Open BIDS and Create Integration Services project, name it as say “PHPRING”.
- Create Couple of packages inside this project “PHPRING”.
I hope you all are aware of how to create integration project in BIDS and how to create few sample packages inside that project. Now I don’t want to go and create all those things now. Already I have few packages existed in PHPRING.
My First package name is “DataFlow Task”. The internal operation of this task is to extract the data from Flat file. After exteracting data it applies sorting on those columns by using soft transformation. Finally, we can load that sorted output into Flat file destination.
My second package name is “Execsql”. It contains 1 Execute SQL Task. I issued one Select statement in this package.
STEP 3. Package Deployment time.
- Go to Project name, in our case it is “PHPRING”.
- Right click on the project name and click on deploy. If you have any doubt follow the below screenshot.
- Once you click on “Deploy” option, it will bring up the below window.
- Once we click on Next, it will bring up next window i.e. “Select source”.
- Once we click on Next, it will jump to 3 option i.e. “Select destination”.
- Once we click on Next, we will get a “Review window”. In this window, we can know all the information in – Select source, Select destination tabs.
- Once we click on Deploy option, immediately “Results window” will pop up.
Once our Deployment is over, simply click on Close button.
STEP 4. Checking whether Project deployment is Succesful or not?
Once we complete the above process, we can jump into SSMS (SQL Server Management Studio) and see whether our project “PHPRING” is deployed in “Test” folder or not.
- Go to SSMS and expand Integration Services catalogs.
- Now, Expand ssisdb. Expand folder Test and then Expand Projects.
- Expand PHPRING (our project name) and then expand Packages.
By observing the above screen shot, we can conclude that our project “PHPRING” with two packages were deployed successfully into SSISDB.
STEP 5. Executing our Package.
In this step we are going to run our first Package i.e. “DataFlow.dtsx” from “Integration Services Catalog“. It is very simple to run packages from here.
- Simply right click on first package “DataFlow.dtsx”. Click on “Execute”.
- Once we click on Execute, it will bring up one window. Here simply click on “OK”.
- After that it will pop up below window. Just read the information and then click on “Yes”.
- Once we click on “YES” it will bring up a window with the following information.
STEP 6. Output in Flat file Destination.
In this step we are going to see our package “DataFlow” is executed successfully or not. To do this, simply go to flat file destination path and see the data. Preety simple right?
By observing above screen shot we can concluded that first package i.e. “DataFlow” is executed successfully and we can also observe the data is in Flat file destination.
References :- www.mssqltips.com
- Created one Integration services catalog in SSMS.
- Created a folder named “Test “ inside this catalog.
- Created Integration Services Project named as “PHPRING” with two Packages (DataFlow, Exec sql).
- Once we created all these things, we then Deployed “PHPRING” project to SSISDB.
- Finally, executed First package and saw the result in our output Flat file destination.
Free e-books and Pdf’s :-
Please Subscribe or Like PhpRinG Tutorials for free e-books and pdf’s.
- Launching Very Soon free e-books and pdf’s on SSIS – MS SQL Server Integration Services.
I hope my effort of making you aware on new way of Deployment model in SSIS 2012 helped you in your journey of SSIS. If you feel any queries, please post them as comments below. Also, your bfeedback will be well appreiated as it helps us to improve better and better everytime.