Wednesday, March 7, 2012

Development Issues with SSIS

We have been facing some delevelopment issues with SSIS. These are as follows:

    We want to execute some tasks in a particular package depending on a condition. Example: If record count is more than 0 then go to next task else stop the package.
    We tried to write a script, in which we evaluate the value of the variable. This variable is populated with the record count value.
    We cannot find any particular function which can exit the package successfully. We can fail the Task, but that means the package is failed. wo dont want to fail the package.
    In short we want to conditionally execute some tasks in a package. Something like an "If container" similar to "For container".

    We have one main package from which we execute 5 other packages. We want to assign values for connection information and variables in this main package only. The other 5 packages should pick values from this main package.

    We are scheduling our package from Windows Scheduled Tasks. When the package is run in this manner, it doesnt read values of variables and connections from configuration file. It uses the values that were provided during development which are embedded in the code.

Thanks

Anup


1. You can do this in control flow by editing the precedence constraints (the arrows) and using an evaluate operation 'expression and constraint' where the expression will be based on the variable 'recordcount'

2. use package configuration for your connection manager in the children packages to 'receive' the connection string from the parent package via variable.

3. not sure about that. I recomment to use SQL Agent Job instead.

Rafael Salas

|||

Hello Anup,

To pass connection information and value of a variables to the child packages, You have to define the connection information and the value of a variable in an configuration file and later you have to create variables at the master package level to which you want the values to be passed to the child packages(note: the name of variable created in the master package should be same in all the child packages as well). And later on go to the child packages, click on package configuration and select type of "Parent Package Variable". Make sure the variable names are same as the master package variables. The value of the variables in the child packages which are hard coded will be overwritten by the values assigned from the master package. Hope this help you.

Regards,

Raju

No comments:

Post a Comment