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 :-
o Design Default value is assigned and used in BIDS.
o Server Default value
is assigned when project comes in the catalog and overwrites the Design Default
value.
o 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.
o Open SSMS and Go to Integration Services Catalog. Right click on that
and choose Create catalog.
o Once you click on Create catalog option,
below window will pop up. After filling the desired values, Click OK button.
o Once you click on OK button, One “ssisdb” database is created.
o 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.
o To create a folder,
Just click on ssisdb. Right click on ssisdb and choose create folder option.
o Once we click on Create folder, the
below window will appear.fsf
STEP
2. Create Integration services
project in BIDS.
o Once we create a folder named “Test”, it’s time to go and create 1
Integration Services project inBIDS.
o Open BIDS and Create Integration Services project,
name it as say “PHPRING”.
o 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.
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.
o Go to Project name, in our case it is “PHPRING”.
o Right click on the project name and click on deploy. If you have any doubt follow the below screenshot.
o Once you click on “Deploy” option, it will bring up the below window.
o Once we click on Next, it will bring up next window i.e. “Select source”.
o Once we click on Next, it will jump
to 3 option i.e. “Select destination”.
o 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.
o 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.
o Go to SSMS and expand Integration Services catalogs.
o Now, Expand ssisdb. Expand folder Test and then
Expand Projects.
o Expand PHPRING (our project name) and then expand Packages.
By
observing the above screen shot, we can conclude that our project “PHPRING” with two packageswere 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.
o Simply right click on first package “DataFlow.dtsx”. Click on “Execute”.
o Once we click on Execute, it will
bring up one window. Here simply click on “OK”.
o After that it will pop up below window. Just read
the information and then click on “Yes”.
o 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. Pretty 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.
Summary :-
1. Created one Integration
services catalog in SSMS.
2. Created a folder named “Test“ inside
this catalogue.
3. Created Integration Services Project named as “PHPRING” with
two Packages (DataFlow, Exec sql).
4. Once we created all these things, we then Deployed “PHPRING” project to SSISDB.
5. Finally, executed First package and
saw the result in our output Flat
file destination.
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
feedback will be well appreciated as it helps us to improve better and better
every time.
Hallo Suman Its nice blog
ReplyDeleteI am Recentaly Compalated my MCA I want to do Carrier in MSBI Please suggest Me
and its good to go for training Classes or Self study make me Perfect
Nice Article ...... Tq..Nice Effort
Delete