dbTalk Databases Forums  

DTS Run Status in system tables

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


Discuss DTS Run Status in system tables in the microsoft.public.sqlserver.dts forum.



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

Default DTS Run Status in system tables - 08-15-2003 , 05:03 PM






I have an interesting situation:

I have two DTS packages that affect the same table so if they run at the
same time, we get deadlocks all over.
I'd like to schedule each to check if the other is running an re-try 3 times
after 1/2 an hour. So, add a new step in the schedule to do this and fail if
the other is running, right?

But how do you determine if another DTS package is currently running in the
system tables? The msdb.dbo.sysjobHistory.run_status column never gives a
status of "4". So where do I look?

Thanks,

- Bill Connelly



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Run Status in system tables - 08-15-2003 , 06:06 PM






In article <#sFdYk3YDHA.1492 (AT) TK2MSFTNGP12 (DOT) phx.gbl>, Bill Connelly
<bill.connelly (AT) crossmark (DOT) com> writes
Quote:
I have an interesting situation:

I have two DTS packages that affect the same table so if they run at the
same time, we get deadlocks all over.
I'd like to schedule each to check if the other is running an re-try 3 times
after 1/2 an hour. So, add a new step in the schedule to do this and fail if
the other is running, right?

But how do you determine if another DTS package is currently running in the
system tables? The msdb.dbo.sysjobHistory.run_status column never gives a
status of "4". So where do I look?

Thanks,

- Bill Connelly

The only reliable way to see if another job is running or not is for
that job to explicitly set a flag to say that it is running. I do this
as part of a processes to detect long running jobs. You could add a
start step to the jobs that inserted something into a table to say I
starting, and then when complete remove it, or have another regular job
that checked the status. Completed is reliable enough. I forget my exact
method, but I know starting had to be logged manually.

An alternative to a table would be to use sp_getapplock and
sp_releaseapplock to indicate the current execution of a job.
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com




Reply With Quote
  #3  
Old   
maxmail
 
Posts: n/a

Default Re: DTS Run Status in system tables - 10-25-2003 , 06:26 PM




msdb.sysdtssteplog is a good place to start


--
Posted via http://dbforums.com

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.