Sunteți pe pagina 1din 52

Manag|ng and Conf|gur|ng SSIS

ackages
SL Server 1echn|ca| Art|c|e
WrlLers 8rlan knlghL uevln knlghL
Mlke uavls
1echnlcal 8evlewer uusLln 8yan
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
CopyrlghL
1he lnformaLlon conLalned ln Lhls documenL represenLs Lhe currenL
vlew of ragmaLlc Works on Lhe lssues dlscussed as of Lhe daLe of
publlcaLlon 8ecause ragmaLlc Works musL respond Lo changlng
markeL condlLlons lL should noL be lnLerpreLed Lo be a commlLmenL
on Lhe parL of ragmaLlc Works and ragmaLlc Works cannoL
guaranLee Lhe accuracy of any lnformaLlon presenLed afLer Lhe daLe
of publlcaLlon
Complylng wlLh all appllcable copyrlghL laws ls Lhe responslblllLy of
Lhe user WlLhouL llmlLlng Lhe rlghLs under copyrlghL no parL of Lhls
documenL may be reproduced sLored ln or lnLroduced lnLo a
reLrleval sysLem or LransmlLLed ln any form or by any means
(elecLronlc mechanlcal phoLocopylng recordlng or oLherwlse) or
for any purpose wlLhouL Lhe express wrlLLen permlsslon of
ragmaLlc Works
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Introduct|on
dmlnlsLerlng SSlS can be a challenglng Lask
for a u8 who's noL famlllar wlLh Lhe SSlS
envlronmenL and some of Lhe new hurdles lL
presenLs ln Lhls whlLepaper we dlscuss how
Lo conflgure your packages so you have zero
Louch deploymenLs We dlve deep lnLo a
noLlflcaLlon and logglng framework Lo alerL
you when a problem occurs or when you run
ouL of capaclLy We also dlscuss how Lo deploy
and schedule your SSlS packages
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
SSIS Conf|gurat|on Cpt|ons
ne of Lhe maln challenges you'll have as an SSlS developer ls
conflguraLlon of Lhe packages ?ou wlll wanL Lo exLernallze Lhe key
elemenLs ln Lhe package llke connecLlons and varlables so you can
seamlessly mlgraLe Lhe packages from developmenL Lo producLlon
wlLhouL havlng Lo open up each lndlvldual package 1hls ls where
SSlS package conflguraLlons help ackage conflguraLlons enable a
developer or an admlnlsLraLor Lo have one key area where speclfled
seLLlngs are sLored 1he admlnlsLraLor can Lhen change Lhe
connecLlon lnformaLlon one Llme and any referrlng packages wlll
change as well
8efore sLarLlng a dlscusslon on conflguraLlons lL's lmporLanL Lo
know Lhe execuLlon order of a package When a package sLarLs lL
goes Lhrough many phases
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1 ackage sLarLs
2 ackage ls valldaLed
3 lnpuL varlables and conflguraLlons are accepLed from dLexecexe from
Lhe /SL1 command
4 ackage conflguraLlons are applled
3 Lxpresslons are applled
?ou have Lwo prlmary opLlons for where Lo sLore your SSlS
conflguraLlons conflguraLlon flles or Lables (Lhere are oLher more lesser
used opLlons) 1he advanLage of uslng a conflguraLlon flle ls Lhe flles are
very porLable from envlronmenL Lo envlronmenL buL Lhe dlsadvanLage ls
LhaL Lhere's noL a way Lo cenLrally manage Lhem lor conflguraLlon
Lables Lhe enLrles are sLored ln SCL Server maklng Lhem easy Lo
reporL agalnsL cenLrally buL Lhey are noL very porLable
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
?ou can access package conflguraLlon Lhrough Lhe ConLrol llow Lab ln 8luS by
rlghL cllcklng ln Lhe deslgn pane and selecLlng ackage ConflguraLlons
1hls opens Lhe ackage ConflguraLlons rganlzer dlalog box ?ou can Lhen add
mulLlple conflguraLlons LhaL wlll overlay each oLher Lop Lo boLLom ln Lhls
screen by cllcklng Lhe dd buLLon
?ou can also Lemporarlly dlsable conflguraLlons whlch would reverL Lhe
package back Lo lLs hardcoded values
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Conf|gurat|on I||es
ConflguraLlon flles are one of Lhe easlesL
conflguraLlon devlces ln SSlS slnce Lhey requlre
no SCL Server backend and are very porLable
1hey resemble webconflg flles ln Lhe SneL
envlronmenL nce you're aL Lhe ackage
ConflguraLlons rganlzer dlalog box cllck dd Lo
add a new conflguraLlon 1hls opens Lhe ackage
ConflguraLlon Wlzard where you can add many
Lypes of conflguraLlons Some of Lhose Lypes of
conflguraLlons are xML flles reglsLry enLrles SCL
Server Lables envlronmenL varlables or parenL
package varlables
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
lf you choose xML conflguraLlon flle" Lype Lhe paLh of Lhe flle LhaL you
wlsh Lo be creaLed or Lhe locaLlon of an exlsLlng conflguraLlon flle Lhen
cllck nexL
lf Lhe flle already exlsLs you'll be asked lf you wlsh Lo reuse Lhe same
conflguraLlon flle over agaln
1hls would enable you Lo have a slngle conflguraLlon flle LhaL conLalns
Lhe connecLlon lnformaLlon for a hundred packages
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
lf Lhe flle does noL exlsL you'll be Laken Lo Lhe nexL screen where you can check Lhe
llsL of properLles LhaL you wanL Lo exporL Lo Lhe flle Lhe SelecL roperLles Lo
LxporL" screen ?ou slmply musL drlll lnLo each properLy of a package Lask
connecLlon or varlable and check Lhe lndlvldual lLems you wlsh Lo have ln Lhe flle lf
you wanL Lo reuse Lhe flle for mulLlple packages Lhe ob[ecL's
name musL exacLly maLch ln each of Lhe packages
lor example lf you wanL LoexLernallze Lhe Servername properLy ln Lhe
conflguraLlon flle you need Lo make sure Lhe connecLlon manager ls named Lhe
same name across all Lhe packages
wbetbet yoo cboose to ose cooflqototloo flles ot tobles tbe eotty ls qoloq to be lo
cleot
text ooJ lf secotlty ls o cooceto yoo most ptotect yoot flle ot toble 8y combloloq o
5ctlpt 1osk wltb tbe flle ot toble yoo coolJ eoctypt tbe ptopettles bot tbls ls o
costomlzeJ solotloo
SL Server Conf|gurat|on 1ab|es
ConflguraLlon Lables operaLe much llke conflguraLlon
flles buL rely on SCL Server LosLore you seLLlngs ?ou
creaLe a conflguraLlon Lable ln Lhe same wlzard LhaL
conLrols oLher conflguraLlons ln LhaL wlzard you can
creaLe a Lable ln any daLa source LhaL you wlsh LhaL has
a connecLlon manager nce lL's creaLed place a fllLer
on lL LhaL descrlbeswhaL Lype of enLrles Lhese
represenL llke SLaglng ConnecLlon lnfo"
When Lhe package beglns lL wlll selecL agalnsL LhaL
Lable and apply a where condlLlon on Lhe selecL
sLaLemenL reLrlevlng all properLles LhaL have LhaL fllLer
on assoclaLed Lo Lhem
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Cther Conf|gurat|on
kecommendat|ons
lf you have a conflguraLlon flle wlLh Len
connecLlons ln lL and your package only needs
a slngle connecLlon Lhere ls a chance of a
warnlng or error We recommend LhaL you
creaLe a conflguraLlon flle or fllLer for each
daLa source 1hls wlll enable you Lo plck Lhe
conflguraLlon flle LhaL conLalns your
connecLlon and leverage lL over and over
agaln wlLhouL fear of a warnlng due Lo mlsslng
connecLlons
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
SSIS Logg|ng Standards
SSlS logglng helps you keep Lrack of Lhe
packages runnlng on your servers 1he logglng
opLlons ln SSlS allow you Lo record aL run Llme
package lnformaLlon such as execuLlon Llme
and errors ?ou can log Lo a number of key
areas llke SCL Server Lables Lhe Wlndows
LvenL Log LexL flles or xML flles Lo name [usL a
few
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
-at|ve Logg|ng
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
- W|ndows Lvent Log1he W|ndows Lvent Log opt|on |ogs the data to the
Wlndows LvenL Log 1hls ls perfecL lf you wanL Lo lnLegraLe wlLh 3rd parLy
monlLorlng soluLlons llke 1lvoll or MM
- 1ext I||e1he 1ext I||e opt|on saves the |nformat|on |nto a p|a|n text f||e
w|th Lhe daLa comma separaLed
- kML I||e1he kML I||e opt|on saves the data |n an kML I||e parsed |nto
kML nodes
- SL Server1he SL Server opt|on |ogs the data to a tab|e |n your SL
Server
1he Lable logged Lo on Lhe server ls named S?SsslsLog" lf lL does noL exlsL Lhls
Lable ls creaLed auLomaLlcally by SSlS when Lhe package runs
- SL Server rof||er1he SL Server rof||er opt|on |ogs the data to a f||e as
SCL LhaL can be capLured ln SCL Server rofller
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
nce you selecL Lhe provlder Lype you wlll need Lo place a check nexL Lo Lhe package
name ln Lhe lefL pane 1hen you can Lhen selecL Lhe deLalls of whaL lnformaLlon you
would llke Lo log under Lhe ueLalls Lab you selecL Lhe evenLs you wanL Lo cause
logglng lf Lhe evenL occurs durlng Lhe package run Llme lL wlll log Lhe daLa Lo Lhe
selecLed provlder no maLLer whlch provlder you selecL you wlll need Lo selecL a
connecLlon Lo use ln logglng 1he drop down menu show compaLlble provlders lf you
do noL see a provlder Lhen you can cllck new ConnecLlon Lo creaLe Lhe proper
connecLlon
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
ln Lhe deLalls Lab you can selecL Lhe deLalls of whaL you would llke Lo log 1hls
can be cusLomlzed for each evenL
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
under Lhe ueLalls Lab ls where you selecL Lhe evenL Lo log lf Lhe evenL occurs durlng
Lhe package runLlme lL logs Lhe daLa Lo Lhe selecLed provlder nLrror onWarnlng
onreLxecuLe and onosLLxecuLe are some commonly used evenLs
nLrror flres lf an error occurs durlng Lhe execuLlon of Lhe package nWarnlng flres lf
a warnlng occurs durlng Lhe package execuLlon 1he onreLxecuLe evenL logs all Lhe
daLa before Lhe package beglns execuLlon 1he onosLLxecuLe evenL opLlon logs all of
Lhe daLa afLer Lhe package has compleLed execuLlon
1he daLa LhaL ls saved by Lhe SSlS logglng opLlons ls shown ln Lhe advanced wlndow
whlch you brlng up ln Lhe ueLalls Lab by cllcklng Lhe advanced buLLon aL Lhe boLLom of
Lhe screen ln Lhe advanced screen you selecL daLa Lo log and on whaL evenL ?ou can
selecL or unselecL each lLem on each evenL ?ou'll see some key columns LhaL would be
nlce Lo have are noL Lhere llke Lhe package's name LhaL generaLed Lhe evenL lnsLead
Lhls ls under Lhe Sourcename column someLlmes and a self[oln wlLh Lhe LxecuLlonlu
can derlve Lhe package's name
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1o creaLe a log provlder selecL a provlder Lype from Lhe dropdown menu on
Lhe rovlders and Logs Lab 1hen cllck Lhe dd buLLon 1he provlder wlll appear
ln Lhe SelecL Lhe logs Lo use for Lhe conLalner" pane below Lhe menu uL a
check ln Lhe name column Lo engage Lhe log provlder 1o dlsable a log buL noL
remove lL only remove Lhe check ln Lhe name column nexL Lo LhaL undeslred
log provlder
fLer Lhe log provlder ls creaLed and Lhe name column ls checked cllck on Lhe
ConflguraLlon dropdown menu lf a proper connecLlon Lype exlsLs on Lhe
package lL wlll show ln Lhls wlndow lf noL creaLe lL by cllcklng Lhe new
connecLlon opLlon
ln Lhe ueLalls Lab choose Lhe evenLs you need Lo log lace a check nexL Lo Lhe
evenLs you need Lo log nce you have selecLed Lhe evenLs cllck Lhe advanced
buLLon and uncheck any daLa you do noL wanL Lo log 1he currenL conflguraLlon
can be saved Lo an xML flle wlLh Lhe Save buLLon aL Lhe boLLom of Lhe ueLalls
Lab 1hls xML flle can be used ln anoLher package Lo selecL Lhe same check
boxes ln Lhls logglng conflguraLlon screen auLomaLlcally by cllcklng Lhe Load
buLLon LhaL also appears aL Lhe boLLom of Lhe ueLalls Lab
Lvent nand|ers
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
LvenL handlers call Lasks when evenLs llke errors or warnlngs occur on a
package durlng execuLlon Lhls can be used ln logglng errors or sendlng
noLlflcaLlons Lo users
1he evenL handler's Lasks only run lf LhaL evenL ls called Pere are Lhe evenLs
LhaL can occur ln a package Lo cause an evenL Lo flre and call an evenL
handler
- nLrror
- nLxecSLaLusChanged
- nlnformaLlon
- nosLLxecuLe
- nosLvalldaLe
- nreLxecuLe
- nrevalldaLe
- nrogress
- nCueryCancel
- n1asklalled
- nvarlablevalueChanged
- nWarnlng
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Some of Lhe mosL frequenLly used evenLs are nLrror nWarnlng nreLxecuLe
and nosLLxecuLe 1he nLrror evenL flres when an error occurs on Lhe package
1he nWarnlng evenL flres when a warnlng occurs on a package 1he nreLxecuLe
evenL flres [usL before Lhe execuLable or Lhe package sLarL 1he nosLLxecuLe evenL
flres [usL afLer Lhe selecLed execuLable or Lhe package flnlshes execuLlng
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
ln Lhe LvenL Pandlers Lhere ls a blue llnk ln Lhe mlddle used Lo creaLe an LvenL
Pandler When cllcked Lhls llnk creaLes an evenL handler on Lhe package 1wo dropdown
menus exlsL aL Lhe Lop of Lhe LvenL Pandlers 1ab 1he dropdown menu on Lhe
lefL conLalns a llsL of all execuLables ln Lhe package 1hls llsL conLalns all Lhe Lasks ln Lhe
package lf no Lasks exlsL ln Lhe package Lhe only execuLable wlll be Lhe package
When creaLlng an evenL handler lL ls lmporLanL Lo selecL Lhe execuLable from Lhe
dropdown menu Lo ensure Lhe Lasks ln Lhe evenL handler execuLe when needed 1he
dropdown menu on Lhe Lop rlghL conLalns a llsL of all Lhe evenLs LhaL can be chosen for
Lhe selecLed execuLable Cllcklng Lhe blue llnk ln Lhe mlddle of Lhe Lab creaLes an evenL
handler for Lhe package 1hls causes Lhe Lasks ln Lhe evenL handler Lo execuLe lf Lhe evenL
occurs durlng any Lasks ln Lhe package lf you wanL Lhe Lasks ln Lhe evenL handlers Lo flre
only for a cerLaln Lask ln Lhe package selecL Lhe Lask ln Lhe lefL dropdown menu and
Lhen cllck Lhe blue llnk ln Lhe evenL handler 1hls creaLes an evenL handler for Lhe expllclL
Lask and execuLes only when Lhe selecLed evenL occurs Some of Lhe common uses for Lhe
evenL handlers are noLlflcaLlon and logglng When you need Lo be noLlfled wlLh an emall
abouL a speclflc evenL LhaL occurred ln a package Lhe evenL handlers are Lhe proper place
Lo execuLe Lhls Lask
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1o be noLlfled vla emall LhaL a package has compleLed drag ln and conflgure a Send
Mall 1ask ln Lhe nosLLxecuLe LvenL Pandler for Lhe package Send Mall 1asks can
conLaln lnformaLlon abouL Lhe package ?ou can lnclude any sysLem varlables ln Lhe
message Lo Lell you whaL occurred ln Lhe package and when lncludlng Lhe Lrror
uescrlpLlon
?ou can creaLe a cusLom logglng framework lf you are noL conLenL wlLh Lhe naLlve SSlS
logglng LxecuLe SCL 1asks ln Lhe evenL handlers can wrlLe lnformaLlon Lo a daLabase
1hese LxecuLe SCL 1asks execuLe only when Lhe evenL occurs 1hls logs errors when
Lhey occur wlLh Lhe nLrror LvenL Pandler and warnlngs wlLh Lhe nWarnlng LvenL
Pandler
lL can be hard Lo keep Lrack of mulLlple evenL handlers on many dlfferenL execuLables ln
a package 1he LxecuLable dropdown menu ln Lhe evenL handler Lab shows all of Lhe
evenL handlers on Lhe package and each execuLable 1here ls an LvenL Pandler folder
under Lhe package and each execuLable ln Lhe package 1he plus nexL Lo Lhls folder
opens Lhe folder and shows Lhe evenL handlers ln Lhem ln Lhe evenL handlers ls an
LxecuLables folder showlng each Lask ln Lhe evenL handler 1he same Lasks can be seen
ln Lhe ackage Lxplorer Lab
Logg|ng |n the Data I|ow
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
ln some uaLa llows of a package Lhere ls a need Lo log lnformaLlon ne of Lhe
common lLems Lo log ls a row counL 1o log row counLs ln a uaLa llow you wlll need Lo
creaLe a 8ow CounL Lransform ln Lhe uaLa llow 1he 8ow CounL wlll need Lo be ln Lhe
flow wlLh Lhe resL of Lhe Lasks ln Lhe uaLa llow package varlable wlll need Lo be
creaLed Lo hold Lhe numerlc lnformaLlon from Lhe 8ow CounL Lransform n example of
a good varlable namlng convenLlon would be lnL8owCounL lf you have mulLlple row
counLs Lhen mulLlple varlables wlll be needed lf you wanL Lo log Lhe exLracLed rows
and Lhe loaded rows Lhen you wlll need a 8ow CounL Lransform lmmedlaLely afLer Lhe
source and one more lmmedlaLely before Lhe desLlnaLlon Lach wlll need Lo wrlLe Lo a
dlfferenL varlable
fLer Lhe 8ow CounL Lransforms and varlables have been creaLed you can creaLe an
LxecuLe SCL Lask ln Lhe nosLLxecuLe LvenL handler of Lhe package wlLh an lnserL
sLaLemenL Lo log Lhe lnformaLlon Lo a SCL Lable 1he row counL varlables would be
passed ln as parameLers Lo Lhe SCL command
Logg|ng |n 8I xress
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
8l xress from ragmaLlc Works
(hLLp//wwwpragmaLlcworkscom//producLs/buslnesslnLelllgence/
blxpress/defaulLaspx ) ls an enLerprlse ready Lool LhaL wlll auLomaLlcally
add all needed row counLs Lo each daLa flow and evenL handlers ln a package lL
wlll also apply Lhls same framework across all packages ln your envlronmenL 1hls
can save hours or days of work and glves you a conslsLenL and robusL udlLlng
lramework for all of your packages LhaL wlll help any company pass sLrlcL
regulaLlons llke Sarbanesxley
(Sx)
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
fLer 8l xress ls lnsLalled lL can be run from ouLslde of vlsual SLudlo or as a 8luS
addln
When ln vlsual SLudlo you can rlghLcllck on a package and selecL dd/updaLe
udlLlng lramework 1he framework can be applled Lo a slngle package or Lo
mulLlple packages n Lhe ConnecLlon lnformaLlon Lab you selecL Lhe server and
daLabase where you would llke Lo save Lhe audlLlng lnformaLlon 1he defaulL
daLabase name ls SSlSops
Cllcklng Lhe new opLlon ln Lhe daLabase wlll glve you Lhe creaLe screen 1hls wlll
creaLe Lhe Lables and sLored procedures needed Lo run Lhe evenL handlers
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
fLer 8l xress ls lnsLalled lL can be run from ouLslde of vlsual SLudlo or as a 8luS addln
When ln vlsual SLudlo you can rlghLcllck on a package and selecL dd/updaLe
udlLlng lramework 1he framework can be applled Lo a slngle package or Lo mulLlple
packages n Lhe ConnecLlon lnformaLlon Lab you selecL Lhe server and daLabase
where you would llke Lo save Lhe audlLlng lnformaLlon 1he defaulL daLabase name ls
SSlSops Cllcklng Lhe new opLlon ln Lhe daLabase wlll glve you Lhe creaLe screen 1hls
wlll creaLe Lhe Lables and sLored procedures needed Lo run Lhe evenL handlers
n Lhe Logglng pLlons Lab you wlll selecL Lhe opLlons of whaL you would llke Lo log
and how many Llmes ln a loop Lo log ?ou can selecL your scrlpL language and use Lhe
warnlng edlLor Lo remove warnlngs you don'L wanL Lo log 1he dvanced Lab allows you
Lo enLer cusLom varlable names LhaL you need Lo log 1hls ls so you can lncorporaLe
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
your own cusLom audlLlng componenLs lnLo Lhe framework nce all of Lhe
opLlons are seL cllck sLarL Lo apply Lhe audlLlng framework
8l xress wlll creaLe aL leasL Lwo row counLs for each uaLa llow ln your package
ne wlll log Lhe exLracLed rows one wlll log Lhe loaded rows 8l xress also creaLes
all Lhe needed evenL handlers Lo log all Lhe daLa
nce Lhe package has run you wlll need Lo vlew Lhe daLa 8l xress lncludes
cusLom reporLs Lo vlew Lhe daLa ln grld and graph forms 1he reporLs conLaln
mulLlple parameLers Lo allow you Lo vlew [usL Lhe daLa you need Lo see
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
-ot|f|cat|on of rob|ems
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
lf an error happens aL 200 ln Lhe mornlng how are you golng Lo be alerLed
of Lhe problem so you make your SL MosL buslnesses need Lo have
packages noLlfy employees abouL package execuLlons WheLher Lhe
package was successful or had an error SomeLlme [usL Lhe facL LhaL Lhe
package has sLarLed ls needed Lo be senL Lo noLlfy Lhe proper lndlvlduals or
groups
noLlflcaLlon vla emall ls Lhe mosL common way Lo perform Lhls ln SSlS
Lma|| -ot|f|cat|on
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1he Send Mall 1ask ls SSlS wlll send can emall vla SM1 Lo mulLlple emall addresses
1he proper place Lo creaLe Lhese Send Mall 1asks for noLlflcaLlon ls ln Lhe LvenL
Pandlers of a package 1he LvenL Pandlers are called when speclflc evenLs flre durlng
Lhe run Llme of a package lor example 1he nreLxecuLe flres before Lhe package
beglns execuLlon 1hls allows you Lo recelve an Lmall showlng Lhe package has begun
execuLlon
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
?ou can also pass ln varlables from Lhe package Lo show lmporLanL lnformaLlon abouL
Lhe package 1o be noLlfled of an Lrror place a Send Mall 1ask ln Lhe nLrror LvenL
Pandler and ln Lhe message body place Lhe SysLemLrroruescrlpLlon varlable 1hls can
be done ln Lhe expresslons of Lhe Send Mall 1ask ny oLher varlables ln Lhe package
can be used also lf Lhe row counLs ln a uaLa llow have been saved Lo a user deflned
varlable uslng Lhe 8ow CounL 1ransform Lhen Lhose varlables can be senL Lo users vla
emall galn Lhls can be done ln Lhe expresslon node of Lhe Send Mall 1asks ln Lhe
LvenL Pandler
Pere ls an example of an expresslon Lo place ln Lhe message source of Lhe Send Mall
1ask ln Lhe nLrror LvenL Pandler Lo show all of Lhe lmporLanL lnformaLlon when an
error occurs on a package
Pockoqe Nome + Q5ystemPockoqeNome + n +
5tort 1ime + {u1_w51k l0) Q5ystem5tort1ime + n +
rror + Q5ystemrroruescription + n +
5ource + Q5ystem5ourceNome + n +
computer + Q5ystemMochineNome + n +
user + Q5ystemuserNome
noLlce Lhe u1_WS18 command ln fronL of Lhe sLarL Llme Lhls ls needed Lo casL Lhe sLarL
Llme as a sLrlng lnsLead of a daLe Llme L Lhe end of each llne ls a new llne feed 1hls ls
an escape command 1hls ls [usL one example of how Lo use Lhe Send Mall 1asks Lo be
noLlfled when a package falls
-ot|f|cat|on |n 8I xress
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
8l xress bullds Lhe noLlflcaLlon lnLo a package auLomaLlcally ?ou can cusLomlze when
and how you would llke Lo be noLlfled 1o add noLlflcaLlon Lo a package wlLh 8l xress
rlghL cllck on Lhe package ln Lhe package explorer and selecL dd/updaLe noLlflcaLlon
under Lhe noLlflcaLlon menu
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1hls wlll sLarL Lhe noLlflcaLlon wlzard whlch wlll allow you Lo selecL Lhe
opLlon you prefer ln noLlflcaLlon 8l xress can apply Lhe noLlflcaLlon Lo
one slngle package or Lo mulLlple packages slmulLaneously lace a check
nexL Lo each package LhaL needs noLlflcaLlon
8lxress can seL up noLlflcaLlon vla emall and LexL message over SM1
?ou can be noLlfled when a package has a warnlng an error compleLes or
ls successful
1hls can be cusLomlzed Lo noLlfy you when Lhe error occurs or walL unLll
Lhe package compleLes
1here ls even a warnlng edlLor Lo remove warnlngs you do noL wanL Lo be
noLlfled abouL
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
fLer seLLlng Lhe opLlons and cllcklng sLarL on Lhe lasL screen Lo add Lhe noLlflcaLlon
Lo your packages you wlll see a scrlpL Lasks ln Lhe LvenL Pandlers of your packages
1hese scrlpL Lasks wlll perform Lhe noLlflcaLlon and send Lhe emalls and LexL
messages vla SM1
SSIS Dep|oyment
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
So you have developed a seL of packages and you're saLlsfled wlLh how Lhey run ln
8uslness lnLelllgence uevelopmenL SLudlo (8luS) now lL's Llme Lo deploy your
packages so you can schedule Lhem Lo run over nlghL 1here are several meLhods
LhaL you could use Lo deploy packages 1here are also dlfferenL locaLlons LhaL you
can deploy Lo whlch are dlscussed ln Lhe nexL secLlon LlLled SLorage pLlons
ne meLhod used for deploylng a seL of packages ls by creaLlng a ueploymenL
ManlfesL
nce ueploymenL ManlfesL ls creaLed you wlll noLlce lL ls slmply a wlzard LhaL
deploys all Lhe packages from Lhe pro[ecL Lo one locaLlon 1hls ls a llLLle llmlLed
because ofLen you may only need Lo deploy one package aL a Llme 1o creaLe a
ueploymenL ManlfesL rlghLcllck on Lhe pro[ecL ln Lhe SoluLlon Lxplorer and selecL
Lhe ueploymenL uLlllLy properLy
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Pere you wlll change CreaLeueploymenLuLlllLy Lo 1rue now Lhe nexL Llme Lhere ls a
bulld on Lhls pro[ecL you wlll flnd Lhe ueploymenL ManlfesL ln Lhe blnueploymenL
folder lnslde Lhe same locaLlon as Lhe pro[ecL 1hls meLhod uses a wlzard Lo deploy all
your packages Lo a locaLlon buL whaL lf you only wanL Lo deploy one package aL a
Llme? 1o only deploy a slngle package make sure Lhe package ls open and selecL llle
Save Copy packagenamedLsx s
Storage Cpt|ons
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1he packages are ready Lo deploy buL now you have Lo declde where Lo deploy Lhem Lo
1here are many facLors Lo conslder when decldlng where Lo deploy your packages 1he
real decldlng facLors generally come down Lo securlLy or ease of deploymenL re you
more concerned wlLh Lhe securlLy of your packages or are you more concerned wlLh
Lhe ease of deploymenL durlng a developmenL process LhaL could requlre you Lo deploy
packages several Llmes? So dependlng on Lhe employer Lhe securlLy of Lhe packages
could be Lhe prlorlLy and ouLwelgh any oLher facLors whlch provldes Lhe besL reasonlng
for chooslng MSu8 for Lhe deploymenL LargeL
MSD8 I||e System
D|saster kecovery k
Lase of Dep|oyment k
Secur|ty k
Debug k
erformance k k
Dep|oyment 1hrough 8I xress
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Wouldn'L lL be nlce Lo have a slmpllfled process for deploylng packages? 8lxress
has removed much of Lhe headache LhaL package deploymenL creaLed ln Lhe pasL
WlLh 8uslness lnLelllgence uevelopmenL SLudlo (8luS) lnLegraLlon Lhe
deploymenL uLlllLy noL only allows you Lo deploy lndlvldual or mulLlple packages aL a
Llme buL lL also wlll deploy package conflguraLlon flles 1hls ls key because ofLen you
wlll sLore conflguraLlon flles ln on locaLlon on developmenL and some where
compleLely dlfferenL ln producLlon 8l xress also allows for 8lulrecLlonal 1ransfer
meanlng you could move packages back and forLh beLween source and LargeL
locaLlons
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1o sLarL Lhe deploymenL process uslng 8lxress selecL Lhe ueploymenL
lcon lnslde of 8luS or lnslde Lhe sLandalone 8lxress Lool 1he flrsL screen LhaL
wlll appear ls Lhe deploymenL opLlons
Pere you can speclfy Lhe deslred folder locaLlon for checkpolnLs and
conflguraLlon flles ln Lhe envlronmenL LhaL Lhe packages are belng deployed Lo
?ou also have Lhe ablllLy Lo change Lhe package proLecLlon level lf you declde
Lhls ls necessary ln Lhe LargeL
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
now LhaL you have Lhe deploymenL opLlons seL cllck nexL Lo selecL Lhe source and
LargeL locaLlons for deploymenL
Pere you wlll Lell Lhe Lool where Lhe packages are orlglnaLlng from and where you
wlsh Lo deploy Lhem Lo
fLer provldlng Lhe Lool wlLh Lhese Lwo locaLlons slmply selecL Lhe package(s) LhaL
you would llke Lo deploy and cllck Lhe green arrow ln Lhe mlddle Lo lnlLlaLe Lhe
package deploymenL
Schedu||ng ackages
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
uslng Lhe schedullng feaLures ln SCL Server genL provldes Lhe beneflL of auLomaLlng
Lhe execuLlon of your SSlS packages on a SCL [ob 1hls becomes very useful on
servers LhaL are hlghly acLlve durlng regular buslness hours because you can schedule
your packages overnlghL when Lhe server ls leasL acLlve
1o schedule a package you flrsL creaLe a SCL Server genL [ob LhaL runs Lhe package
Lhen asslgn a scheduled Llme for Lhe package Lo run ?ou wlll creaLe Lhe [ob by
connecLlng Lo Lhe daLabase englne ln managemenL sLudlo on Lhe server you wanL Lhe
package Lo run 8lghLcllck on Lhe !obs folder locaLed under SCL Server genL and
selecL new !ob Lo open Lhe new !ob dlalog box Pere you wlll glve Lhe [ob a name and
asslgn a llsL of sLep LhaL Lhls [ob wlll execuLe lor example lL ls common Lo have one
sLep LhaL runs all Lhe SSlS packages Lo updaLe a uaLa Warehouse Lhen upon compleLlon
a second sLep LhaL process a cube fLer selecLlng Lhe sLeps page you wlll creaLe a new
sLep by cllcklng new whlch wlll brlng up Lhe new !ob SLep dlalog box
ssumlng LhaL Lhe sLep you wanL Lo add ls a SSlS package change Lhe Lype Lo SCL Server
lnLegraLlon Servlces ackage nexL selecL Lhe package source whlch could be from elLher
a SCL Server or a llle SysLem and choose Lhe package Lo run 8efore cllcklng k Lo
compleLe Lhls sLep be sure Lo glve lL a name ln Lhe SLep name properLy
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
1he nexL sLep would be Lo schedule Lhls [ob so Lhls package can run unaLLended and
durlng non peak server Llme SelecL Lhe Schedule page and selecL new Lo enable Lhls
feaLure 1hls wlll brlng up Lhe new !ob Schedule dlalog box
where you can made declslons on Lhe frequency and duraLlon of Lhls [ob nce you
have made Lhese declslons glve Lhe schedule an approprlaLe name and cllck k Lo
save lL lnsLead of creaLlng a new schedule each Llme you run a [ob you can also plck
from a llsL of schedules by selecLlng lck on Lhe schedule page 8e careful Lhough noL
Lo run Loo many [obs aL Lhe same Llme or you could run lnLo a problem LhaL defeaLs
one of Lhe purposes of schedullng [obs WlLh Loo many [obs runnlng aL Lhe same Llme
your server could Lake a poundlng much Lhe same LhaL lL does durlng peak hours of
usage lor Lhls reason be sure Lo carefully space ouL Lhe Llmes LhaL your [obs run
1he daLa behlnd Lhe scenes for [obs and schedules ls sLored ln Lhe msdb daLabase
and can be querled and reporLed on [usL llke any oLher daLabase 1he sys[obhlsLory ls
one of several sysLem Lables ln Lhe msdb daLabase LhaL can be used Lo query and
reporL on [ob execuLlons
Common rob|ems
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
One of the most frequent problems associated with jobs is with the
permissions given to the SQL Server Agent Service Account which is used
to run the steps in a job within the SQL Server Agent. f you have created
a package that may require permissions beyond what this service account
is granted you will probably want to create a proxy account to run the
selected job step.
mplementing a proxy account is a three part process.
The first step is to create Credentials. A credential is a record that holds
authentication information. Under the Security folder in Management
Studio you will find the Credentials. Right-click and select new credentials
to open the New Credentials dialog box.
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
n this window you will provide an dentity, which is the name of the account that
has needed rights. Often this will be, but is not limited to, a Windows user
account. Next, you will specify the password used for this account. Then finish
creating the credential record by giving it a name.
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
The second step is to create a proxy account that uses the credentials
you just created in the last step. n the Object Explorer you will right-click on
Proxies under the SQL Server Agent folder and click New Proxy to create a
new proxy account. This will open the New Proxy Account dialog box where
you will first input the credentials you just created in the last step. Click the
ellipsis next to Credential name to open the Select Credential dialog box.
Here you will click Browse to select from the credentials that have already
been created. Once you have selected the appropriate credentials click OK
twice to return to the New Proxy Account editor. Then select which
Subsystems the account will use in the Active to the following subsystems
box. n this case we are only interested in using this account to run SSS
packages so place a check next to SQL Server ntegration Services
Package, shown in the screenshot below. Click OK to complete the proxy
account setup.
The last step in this process is to apply the proxy account to the job that
requires it. To do this open the job properties then edit the step you will be
adding the account to. Here you will change the Run as option to the proxy
account previously created.
Conc|us|on
Managlng and Conflgurlng SSlS ackages
ubllshed 6/1/2009
n this technical article, you learned how to use package configurations to
give you a zero touch deployment.
You also learned how to deploy and schedule your packages using a series
of various techniques, including a 3rd party product called B xPress, which
makes the deployment much simpler.
Lastly, you learned how to create your own auditing framework for your
packages or how to create a framework for notification and auditing in just a
few clicks with BxPress.
For more information: Robert Peterson
rpeterson@pragmaticworks.com
904-638-2392

S-ar putea să vă placă și