Groups | Blog | Home
all groups > sql server dts > april 2004 >

sql server dts : searching within a DTS package


Dan
4/30/2004 8:24:51 AM
I'm using SQL Server 2000. I created a function in a dts that I want to use
again but I don't remember which package it is in but I do remember the
function name. Is there a way to search all dts packages for the name?

Thanks,

Dan

Dan
4/30/2004 10:08:05 AM
I've never done this. Can you point me to some code sample about how to open
a package or tell me what the object is and I can search on it?

Thanks,

Dan

[quoted text, click to view]

Dan
4/30/2004 10:41:38 AM
Thanks Allan

Dan

[quoted text, click to view]

Allan Mitchell
4/30/2004 2:48:37 PM
I presume it would be within an Active Script task.

You will need to programmatically

Open each package
Loop through the Tasks - Find the Active Script tasks
Find the ActiveXScript property and see if your function is in there.

You could also do this if your Function is within a DataPump task.



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

Allan Mitchell
4/30/2004 4:31:42 PM
OK we have examples here of using the object model in VB (and others)

Execution
(http://www.sqldts.com/Default.aspx?104)


But your code would go something like

Load Package

For each Task in package.Tasks
If Task.CustomTaskID = "DTSActiveScriptTask" THEN
msgbox Task.ActiveXScript
End if
Next


You would obviously search the ActiveXScript and not just output it to a
msgbox.

You can enumerate through your packages by using this article

Enumerating DTS Packages using VB.Net
(http://www.sqldts.com/default.aspx?250)



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

AddThis Social Bookmark Button