Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Wednesday, March 28, 2012

Multi-step SSIS Job Hangs

I have two SSIS packages that I want to run in one SQL Agent job as two individual steps. The two packages run fine when they are in separate jobs. However, when I run the job conaining both SSIS packages (under the same proxy), the first SSIS package starts, but hangs in the middle.

I then tried setting the DelayValidation flag to True as suggested for a similar issue in another thread from this forum. After changing the DelayValidation flag to True for all containers and tasks on the second SSIS package, the first SSIS package ran completely through sucessfully, but the job continued executing for hours and the second SSIS package never started. I finally killed the job.

Any ideas as to what is the problem here? I have logged to the event viewer and see that the first package completes sucessfully. They run successfully in separate jobs, but I can not get them to run together within the same job without hanging.

Any help is appreciated,

Paulette

What task is the package hanging on?

Do the packages share any external resources? Perhaps there is resource locking occurring.

-Jamie

|||

Thanks Jamie. Well, I know Step 1 (the first SSIS package) finished based on an event viewer message 'Package "ExtractPkg" finished Successfully.', but that was the last event to be logged. No event was logged stating that the second package started. It seems that the job is hanging while trying to start the second package, so I cannot see a task that either package is hanging on.

As far as shared resources... The packages do not share a "Data Source" in the solution, however they do have individual connections that point to the same SQL server and database.

Also, they both share audit and error handler "child" packages that they call from their event handlers. DelayValidation for the Audit and Error handler packages is currently set to false. Could the sharing of these audit and error handler packages be causing a problem? We planned on removing the audit and error handler packages from future versions since we've discovered the automatic logging provided in SSIS is sufficient for our needs.

- Paulette

|||

My first avenue of attack would be to disable/remove the eventhandlers to see if the problem goes away. That sounds like it could be the problem.

By the way, executing a package from each eventhandler is a huge overhead as I have talked about here: http://blogs.conchango.com/jamiethomson/archive/2005/03/01/1100.aspx

-Jamie

|||

Thank you Jamie! When I removed the event handlers the job ran perfectly!

- Paulette

Monday, March 26, 2012

Multi-Server Jobs

Why is it that when viewing Multi-Server Jobs on the MSX Server via Management Studio (Server\SQL Agent\Jobs\Multi-Server Jobs), only jobs that are in the default [Uncategorized (Multi-Server)] category appear? Any other Multi-Server job that has been put into a different category is displayed under the Local Jobs folder.

A master server distributes jobs to, and receives events from, target servers. A master server also stores the central copy of job definitions for jobs that are run on target servers. Target servers connect periodically to the master server to update their schedule of jobs. If a new job exists on the master server, the target server downloads the job. After the target server completes the job, it reconnects to the master server and reports the status of the job.

So in this case if you haven't specified the job category then they are shown as default.

|||That still doesn't answer my question! All I was questioning was why when a job has been categorised in any other Multi-Server job category than [Uncategorized (Multi-Server)] it doesn't show under the Multi-Server jobs folder, (as it does in Enterprise Manager).|||Having dug around a little further it appears that this has already been raised as a bug and should be in SP2.|||

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=139988

This will be addressed in the next service pack.

sql