Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to get package tasks execution history from SSISDB?

$
0
0

Hello,

Question: How do I query SSISDB for the execution history of tasks within a specific package?

Background: We need to improve the performance of some monstrous SSIS 2012 packages that take far too long to execute.  We'd like start by identifying the longest-running packages as well as some of the longest-running tasks within those packages.  I found the below query that returns exactly what we need for package history, but I'm having a hard time getting the history of the individual SSIS tasks.

Thanks,
Eric

--Package history query.
SELECT 
	  project_name
	, package_name
	, [status]
	, CASE [status] 
		WHEN 1 THEN 'created' 
		WHEN 2 THEN 'running' 
		WHEN 3 THEN 'canceled' 
		WHEN 4 THEN 'failed' 
		WHEN 5 THEN 'pending' 
		WHEN 6 THEN 'ended unexpectedly' 
		WHEN 7 THEN 'succeeded' 
		WHEN 8 THEN 'stopping' 
		WHEN 9 THEN 'completed' END AS StatusDesc 
	, start_time
	, end_time
	, DATEDIFF(minute, start_time, end_time) AS 'execution_time(min)'
FROM [catalog].executions
ORDER BY 
	  package_name
	, start_time DESC
	, end_time


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>