February 10, 2015 at 8:57 am
I created an ssis project which has a Master package. This package runs a series of execute package tasks. I would like to be able to capture in a sql database table The name of the task, the start time each package task began to execute, and the amount of time in minutes it took for the package task to run.
What I have done so far is to follow each package task with a SqlTask to insert the data. But I am having a hard time configuring the variables correctly to accomplish the goal. System::StartTime does not seem to work because it captures the start time of the Master Package. Perhaps I need to capture the inside each package and insert to the table instead of trying to do it all in the master.
Any Ideas?
February 11, 2015 at 5:20 pm
use the ExecuteSQL task to run a stored procedure that accepts a string where you pass what part of the package/packagename and write it to a "log" table in your SQL database.
February 11, 2015 at 6:00 pm
I haven't tried it, but you might be able to use Event Handlers to insert into "log" tables.
February 11, 2015 at 7:52 pm
Why not just use the out of the box package logging ? It is real easy to get it to write to a database table. You can configure it to log start/end of packages and tasks (and a heap of other events as well). You do not need to write any code to write the logs.
February 20, 2015 at 1:43 am
you can schedule your package with the SQL job and then check the all information from (msdb..dbo.sysjobhistory) table.
OR
you can use the system variable ("StartTime") and end time with the help of getdate() function.
____________________________________________________________
APViewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply