Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to find if SSIS packages are running?


how to find if SSIS packages are running?

Author
Message
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
Any t-sql which can tell me if a particular package is running or not? Under the folder "Running Packages" it really doesnt say if the package is running or not. Please help!!
Joshua M Perry
Joshua M Perry
SSC-Addicted
SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)

Group: General Forum Members
Points: 464 Visits: 545
Since you didn't specify a version, I'm going to reply based on SQL 2005. You best bet is tables in the MSDB database that are named dbo.sysdtsxxxx - these tables hold all the package execution details. Specifically, dbo.sysdtslog90 gives a good basic history of package execution.

SELECT [id],[event],[computer],[operator],[source],[sourceid],[executionid],[starttime],[endtime],[datacode],[databytes],[message] FROM [msdb].[dbo].[sysdtslog90]



And dbo.sysjobactivity should show any currently executing packages.

SELECT [session_id],[job_id],[run_requested_date],[run_requested_source],[queued_date],[start_execution_date],[last_executed_step_id],[last_executed_step_date],[stop_execution_date],[job_history_id],[next_scheduled_run_date] FROM [msdb].[dbo].[sysjobactivity]



Another useful table is dbo.sysdtspackages90, which will give a listing of all your stored packages. Note that there is also a table named dbo.sysdtspackages, which is used for compatibility with legacy DTS packages.

Joshua Perry
http://www.greenarrow.net
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
Thanks. None of your queries gave me list of currently running packages (:. In the second query, you do not have any column referring to SSIS package? I do see some packages running under the "Running Packages" folder in SSIS. We are on sql 2005. Are you sure this query worked for you in finding currently executing packages?
chandan_jha18
chandan_jha18
Mr or Mrs. 500
Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)Mr or Mrs. 500 (513 reputation)

Group: General Forum Members
Points: 513 Visits: 2133
sqldba_icon (4/18/2011)

Thanks. None of your queries gave me list of currently running packages (:. In the second query, you do not have any column referring to SSIS package? I do see some packages running under the "Running Packages" folder in SSIS. We are on sql 2005. Are you sure this query worked for you in finding currently executing packages?


Use a profiler trace to capture what is hitting your server and it will give you a hostname too. From there you can find out how these packages are being executed and from where.
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
chandan_jha18 (4/19/2011)
sqldba_icon (4/18/2011)

Thanks. None of your queries gave me list of currently running packages (:. In the second query, you do not have any column referring to SSIS package? I do see some packages running under the "Running Packages" folder in SSIS. We are on sql 2005. Are you sure this query worked for you in finding currently executing packages?


Use a profiler trace to capture what is hitting your server and it will give you a hostname too. From there you can find out how these packages are being executed and from where.


Oh yeah for sure i could do that Smile. Just wanted to avoid using trace, i am so surprised there isnt a query to find running SSIS packages on a server?
Joshua M Perry
Joshua M Perry
SSC-Addicted
SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)

Group: General Forum Members
Points: 464 Visits: 545
I think I understand what you're asking for now. That's not exposed via TSQL, but you could use some .NET code and expose it through an assembly that can be called with TSQL.

http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.application.getrunningpackages(v=SQL.90).aspx

Keep in mind that this has the same limitation of the Running Packages folder in SSMS - administrators will see all packages, and other users will only see packages they have started.

So, if you want to expose a list of all running packages to all users, you would need to create the assembly and execute the TSQL with a proxy. Or you could display the list of packges in an application using the collection object that is returned.

Joshua Perry
http://www.greenarrow.net
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
Joshua M Perry (4/19/2011)
I think I understand what you're asking for now. That's not exposed via TSQL, but you could use some .NET code and expose it through an assembly that can be called with TSQL.

http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.application.getrunningpackages(v=SQL.90).aspx

Keep in mind that this has the same limitation of the Running Packages folder in SSMS - administrators will see all packages, and other users will only see packages they have started.

So, if you want to expose a list of all running packages to all users, you would need to create the assembly and execute the TSQL with a proxy. Or you could display the list of packges in an application using the collection object that is returned.



Thanks yeah i knew that i could do this using .net code. What do u mean by "same limitation of the Running Packages folder in SSMS - administrators will see all packages". I am admin on the box as well as sql server. I still cannot see packages running under the RUnning Packages folder.
Joshua M Perry
Joshua M Perry
SSC-Addicted
SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)SSC-Addicted (464 reputation)

Group: General Forum Members
Points: 464 Visits: 545
In addition to system level roles, the running packages folder uses the SSIS roles in the MSDB database. By default, logins with the db_dtsadmin or sysadmin role will see all packages, logins with the db_dtsoperator and db_dtsoperator roles will only see packages they started.

Joshua Perry
http://www.greenarrow.net
gacsale
gacsale
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 8
It works...

http://troywitthoeft.com/simple-ssis-package-monitoring-for-sql-server-2008/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search