Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a Task Retrieve the Name of the Package? 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi everyone,

I hope this is easy to explain.

I have a table that "stores" the names of SPs that execute - info such as time it started, time it ended etc.

I want to expand this and start tracking the execution of certain critical DTS packages.

Is there a way, using T-SQL or VBscript, to retrieve the name of the package the task is running inside?

Of course I can always hard-code it, but anyone could do that...

Thanks, John
 
If you have enabled logging within the package the data your after already exists in msdb. There is actually a sys table that does just this. However unless you have gone into dsconnected edit and edited all the properties you won't get the name of each step but rather get ExecuteSQLTask1.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Thanks MDXer,

This would be a bit too much work. And we don't have logging enabled on all packages.

I was hoping there was something as easy as what we use to determine the name of the stored procedure that's running.

It's cool that you have discovered this though.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top