Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
CactusJuice
Starting Member
46 Posts |
Posted - 2005-01-31 : 14:03:46
|
| I have a package, pkgMorningUpdate that runs at 3am. When employees come in the morning I'd like our Intranet home page to show the status of the package (the last sucessful time it was run, and/or some kind of success or failure code).I've looked all over but cannot figure out how to get the status or last executed time of a DTS package. How can I do this?thanks! |
|
|
rishimainidba
Starting Member
30 Posts |
Posted - 2005-02-01 : 01:12:10
|
| Hi..C whenever u create a DTS Package and Schedule it...u also end up by creating a job in sql server with name as that of the Package name. So if u can find out whether that job was a success or not u will be able to find out whether ur package was successful or not.Now to find out whether ur job was a success or not run this query in "msdb" database.-----------------------------------------------------------------------------------------------select * from sysjobhistory where job_id=(select job_id from sysjobs where name='urjobname')and run_status=0 and step_id=0order by run_date,run_time desc-----------------------------------------------------------------------------------------------Here run_status=0 means ur job was a failure whereas run_status=1 means ur job was a success.I hope u can find solution 4 urself now.RegardsRishi |
 |
|
|
|
|
|