dbTalk Databases Forums  

Accessing SSIS Parent Package Variables

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Accessing SSIS Parent Package Variables in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Neil
 
Posts: n/a

Default Accessing SSIS Parent Package Variables - 02-07-2006 , 10:54 AM






Hi,

I'm working on a group of SSIS packages at the moment and I'd like to come
up with a way to perform logging on certain events within each package. Each
package should log the same information for the same event. Rather than
duplicate this logging in each package I want to create a separate logging
package and have each of my packages call this. For example I want to log the
OnPostExecute event for each task. To do this I'm going to have the event run
my logging package but I need it to pass certain information to the logging
package, e.g. PackageStartTime, ContainerStartTime, PackageName, TaskName etc

Is there some way that I can access these variables from my child logging
package or pass them down using my parent package?

Is this the best way to do this?

Most of the variables will be system variables but there could also be some
user variables that will need to be passed down.

Thanks

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Accessing SSIS Parent Package Variables - 02-07-2006 , 12:56 PM






Hello Neil,


Oh yes.

The parent package calls the child packages.

Declare in the Parent package variables to hold the things you want from
the children.
In the OnPostExecute event in the parent package you do whatever you want
with the local variables

In the child packages in the OnPostExecute event (Package Level) pass the
values you want to the parent variables from the child package. The child
can see the parent variables.

Remember each task's OnPostExecute is captured in the Package's equivalent
method.

The child package tasks' OnPostExecute events will be captured now in the
parent.

Help any?


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi,

I'm working on a group of SSIS packages at the moment and I'd like to
come up with a way to perform logging on certain events within each
package. Each package should log the same information for the same
event. Rather than duplicate this logging in each package I want to
create a separate logging package and have each of my packages call
this. For example I want to log the OnPostExecute event for each task.
To do this I'm going to have the event run my logging package but I
need it to pass certain information to the logging package, e.g.
PackageStartTime, ContainerStartTime, PackageName, TaskName etc

Is there some way that I can access these variables from my child
logging package or pass them down using my parent package?

Is this the best way to do this?

Most of the variables will be system variables but there could also be
some user variables that will need to be passed down.

Thanks




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.