![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Using SS2000. We have several packages that run every 30 minutes to an hour and they read and update the same table. I'm wondering if there is a way, before a package runs, to check to see if one of the other packages is running and then not run the second package until the first one finishes. I thought maybe by checking the system processes I could tell but the packages all appear to run as dtsrun. I also thought I could run each package using dtsrun and wrap a vb exe file around it and then look for the vb exe file in system processes. Or maybe there are some dts objects that I can check in a vb program to see if the package is running using the package id? Does anyone have any suggestions? Thanks, Dan |
#3
| |||
| |||
|
|
There isn't really any way to see which package is running, as they are generally hosted inside something like DTSRUN as you have seen, and they aren't really SQL processes in their own right. Some ideas- Make the packages run sequentially, perhaps have each package as a different step within a SQL Server Agent job. Or If each package is a job then you could check the running jobs, and look for the appropriate named job. Or On the advanced properties of a Connection in DTS you can set the property called Application Name. This will show up in sysprocesses as whatever value you enter, so you can use a value specific to the package, such as package name, and other packages can query sysprocesses to see if that value is present. -- Darren Green http://www.sqldts.com "Dan" <ddonahue (AT) archermalmo (DOT) com> wrote in message news:u0FC9pPPEHA.680 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Using SS2000. We have several packages that run every 30 minutes to an hour and they read and update the same table. I'm wondering if there is a way, before a package runs, to check to see if one of the other packages is running and then not run the second package until the first one finishes. I thought maybe by checking the system processes I could tell but the packages all appear to run as dtsrun. I also thought I could run each package using dtsrun and wrap a vb exe file around it and then look for the vb exe file in system processes. Or maybe there are some dts objects that I can check in a vb program to see if the package is running using the package id? Does anyone have any suggestions? Thanks, Dan |
![]() |
| Thread Tools | |
| Display Modes | |
| |