2012年2月16日星期四

Batch Script

Hello everyone,

I have about 20 dtsx packages to run in a particular order.
Some create tables, other fill/convert data, and others just clean/remove temporary tables.

Everything works ok manually...
But, i need to run them automatically.

A batch script seems the quickest and more simple way to do...
So, I made a batch with something like this:

dtexec.exe file1.dtsx > output1.txt
dtexec.exe file2.dtsx > output2.txt
dtexec.exe file3.dtsx > output3.txt

(the ideia is to save the logs...)

My first question is...
I get a very usual "product level is insufficient" (0xC00470FE) error on some components...
It's wierd because manually works ok. But through the batch it returns lot's of these...
I searched for information and found this...
It's a nice topic, not enought to fix my problem.

My second question is...
A noob batch script question:
Can i make something like this:
dtexec.exe file1.dtsx > output1.txt
IF FIND /C /I "End Error" output1.txt != 0 GOTO EXITSCRIPT
The ideia is to search the log for errors, and if found any run other batch file...

Thank you so much for any help!!!

David

Have you thought about just creating a master package that runs your packages in the desired order? You have a lot more flexibility that way instead of batch files. Just my opinion.

没有评论:

发表评论