dbTalk Databases Forums  

Execute more than one package

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


Discuss Execute more than one package in the microsoft.public.sqlserver.dts forum.



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

Default Execute more than one package - 08-18-2004 , 01:22 PM






You could also try using the DTS pkg GUI tool in
Enterprise Manager & use the 'Execute Package Task' from
the palette (which looks like a yellow keyboard button
with two circling blue arrows on it). Add one task icon
in the GUI editor for each external pkg you want to
reference, and then link them up in the proper order using
the workflow arrows ('On Completion'/'On Success').

I've done this a lot & it works well! :-)

-DMllp/DBA



Quote:
-----Original Message-----
Hi,
I need to run a dts that includes 13 others dts
package. I paste the
following code, please advice if this is a good way to do
it. Also, I am not
sure if i need to unintialize the DTS.Package everytime?
Thanks
Ed

const DTSSQLStgFlag_UseTrustedConnection = 256
Dim myNum
Dim myPackagename(13)

myNum=0
myPackagename(0)="ImportMJERevenueMap"
myPackagename(1)="ImportPayerRevenueMap"
myPackagename(2)="ImportSoldToRevenueMap"
myPackagename(3)="ImportRevenue"
myPackagename(4)="ImportExpense"
myPackagename(5)="ImportDepreciation"
myPackagename(6)="ImportFSO_INST"
myPackagename(7)="ImportFSO_MTCE"
myPackagename(8)="ImportLeasePayment"
myPackagename(9)="ImportNonTelco"
myPackagename(10)="ImportOPSMatrics"
myPackagename(11)="ImportOutTasking"
myPackagename(12)="ImportProfitCenter"
myPackagename(13)="ImportTelcoReport"

Do While (myNum< 14)
MsgBox "Begin process..." +myPackagename(myNum)
Set oPKG = CreateObject("DTS.Package")

oPKG.LoadFromSQLServer
"ServerName","","",DTSSQLStgFlag_UseTrustedConnect ion,"","
","",myPackagename(myNum)

Quote:
oPKG.Execute
'MsgBox myPackagename(myNum)
oPKG.Uninitialize()
Set oPKG = Nothing
myNum = myNum + 1
Loop
Main = DTSTaskExecResult_Success


.


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 - 2012, Jelsoft Enterprises Ltd.