I used script task component and specified the variable in package level and
ReadOnlyVariables property in the script task Editor. Since I copied and
ran them in parallel, it got the error. This behavior is consistent with the
"Allan Mitchell" wrote:
> Hello yongli,
>
> The error suggests that you are trying to ref an object that the task knows
> nothing about. Is it a script task that throws the error? How do you let
> the task know about the variable? What is the code you use?
>
>
> Allan Mitchell
>
www.SQLDTS.com >
www.SQLIS.com >
www.Konesans.com >
> > One more thing to add in my case. I have a variable defined in both
> > package, when runing separately, it is fine. When running in paralle,
> > one of the later finished package failed due to follwoing reason:
> >
> > Error: The script threw an exception: The element cannot be found in a
> > collection. This error happens when you try to retrieve an element
> > from a collection on a container during execution of the package and
> > the element is not there.
> >
> > "yongli" wrote:
> >
> >> Hi Allan,
> >>
> >> I did change the package ID. The reason I copied/pasted an existing
> >> package to create a new one is because they have the same steps
> >> except for details.
> >>
> >> I saw this oddity in the debug mode. Although I changed the package
> >> IDs,
> >> but the other objects still share the same ID between two packages (I
> >> am
> >> wondering if this is the root cause). Both Packages run some Data
> >> Flow Tasks
> >> and SQL validations.
> >> The first one did 140 rows, and the second one did 7 rows. This is
> >> what I
> >> observed:
> >> when I put both packages in a master package and let them run in
> >> parallel
> >> (later I found putting a dependency between them still cause the
> >> problem),
> >> The 7 rows package finish successful in Green in Master package while
> >> the
> >> other is still running some DFT task, I can see the correponsding
> >> task in
> >> yellow in the successful package, kind of odd?
> >> At end the other package failed in red in Master Package, the
> >> corresponding
> >> tasks in the successful package changed color to red too even it is
> >> green in
> >> the master package, also the row count changed from 7 to 140
> >> something.
> >> It seems to me this is some synchroniztion problem in display in the
> >> debug
> >> mode.
> >> (maybe due to those tasks with same IDs).
> >> Although I checked the results to be fine, but this will affect my
> >> overal ETL flow in the master package. This is why I asked if we
> >> need to change all the object IDs in this case?
> >>
> >> Thanks.
> >>
> >> "Allan Mitchell" wrote:
> >>
> >>> Hello yongli,
> >>>
> >>> Are you saying that after having changed the PackageID for one of
> >>> the packages you had issues? What were those issues exactly? How
> >>> did they cross over?
> >>>
> >>> Allan Mitchell
> >>>
www.SQLDTS.com > >>>
www.SQLIS.com > >>>
www.Konesans.com > >>>> When I copy/paste an existing package, it inherits all the IDs from
> >>>> the exisiting package. I generated a new ID on package level for
> >>>> the copied package (but other level objects still share the same ID
> >>>> ), then I made some modification on the new package, and let two
> >>>> packages run in parallel in a master package, which caused tasks
> >>>> cross-run each other. Is this because those tasks share the same
> >>>> IDs? If so, what' s the easiest way to make the pasted package
> >>>> have different IDs on all objects from the existing one?
> >>>>
> >>>> Thanks,
> >>>>
>
>