x

Avoid multiple processing of SSIS package (Running package cannot be re-executed)

Hi,

I am executing an SSIS package with DTEXEC. How can I prevent that SSIS executes the same package more than once?

Example: I double-click on the DTEXEC command, the SSIS package is running, I double-click on the DTEXEC command again --> Now the SSIS package should not be executed because it is already running.

Thanks!
more ▼

asked Oct 09, 2012 at 07:24 AM in Default

matmar gravatar image

matmar
0 2 2 2

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

I think we need more information. Why are you starting it a 2nd time when you dont want to? Surely you start it and wait for it to complete before starting it again.

It may be easier to identify that it is running if you add it to a SQL Agent job and then you can see whether the job is running or not.
more ▼

answered Oct 09, 2012 at 02:47 PM

Fatherjack gravatar image

Fatherjack ♦♦
42.7k 75 79 108

Right, it would not be a problem with SQL Agent, I understand that.

I am doing an SSIS project for a customer and this customer is using a third party scheduling tool called OpCon (unfotunately). You can avoid multiple processing in that scheduling tool like you can do in SQL Agent but it is a very complex tool and always requires a lot of involvement of other consultants.

So I thought there must be a very simple way to prevent multiple processing of the same SSIS package at the same time. I thought there must be a flag, an option or something...

I can imagine adding "control tables" etc. to check whether a package is running or not but this again would require quite a heavy change to the SSIS design.

Isn't there a very simple way to solve that?

Thanks a lot in advance for your help...
Oct 09, 2012 at 03:43 PM matmar
If the scheduling is in a different app then you have a choice to either put the logic in the app or in the SSIS package itself. Putting it somewhere else will just add more chance for confusion
Oct 09, 2012 at 03:50 PM Fatherjack ♦♦
(comments are locked)
10|1200 characters needed characters left

What do you mean with "put the logic in the SSIS package itself"? Did you think about something like this: Control flow in the beginning of the package which checks the status. If it is Running than quit else Run the package.

I hoped there was a simple answer to this question. Is there a package property, an SSIS property or something else which prevents multiple processing?
more ▼

answered Oct 09, 2012 at 04:03 PM

matmar gravatar image

matmar
0 2 2 2

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x939
x6

asked: Oct 09, 2012 at 07:24 AM

Seen: 1145 times

Last Updated: Oct 09, 2012 at 04:03 PM