dbTalk Databases Forums  

Enumerate DTS Steps?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Enumerate DTS Steps? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dj
 
Posts: n/a

Default Enumerate DTS Steps? - 03-09-2005 , 09:19 AM






I know you can use sp_enum_dtspackages to list the DTS packages
on a given server, but is there a way to list the individual step names, etc.?

TIA
Cheers,
dj

Reply With Quote
  #2  
Old   
dj
 
Posts: n/a

Default RE: Enumerate DTS Steps? - 03-09-2005 , 09:25 AM






Hmm... I guess I could always use sp_help_jobsteps. Doh!

"dj" wrote:

Quote:
I know you can use sp_enum_dtspackages to list the DTS packages
on a given server, but is there a way to list the individual step names, etc.?

TIA
Cheers,
dj

Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Enumerate DTS Steps? - 03-09-2005 , 01:28 PM



In message <51F60320-BFF4-4951-957D-1A451B2D18F4 (AT) microsoft (DOT) com>, dj
<dj (AT) discussions (DOT) microsoft.com> writes
Quote:
I know you can use sp_enum_dtspackages to list the DTS packages
on a given server, but is there a way to list the individual step names, etc.?

TIA
Cheers,
dj
No. When packages are save to msdb..sysdtspackages, some information is
persisted in the relational table, name version and similar, but the
rest such as steps is part of the package which is in COM structured
storage in the image column of that table.

Do get this info you would need load the package into the object model
and enumerte the steps. Pseudo code-

Declare PkgObject as DTS.Package

PkgObject.LoadFromSQLServer( info from sysdtspackages or
sp_enum_dtspackages )

For Each Step in PkgObject.Steps
-- Do stuff here
Next

You could do this in T-SQL, but only through the OLE stored procedures,
create the object, call load, enumerate step objects. A start point
would the spExecutePKG.sql and spDisplayPKGErrors.sql code from the link
below as the do the load, and step enumeration, albeit aimed at
executing a package and check each step for an error afterwards.


Archive
(http://www.sqldts.com/default.aspx?273)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.