Toad World® Forums

Loop Dataset Activity Not Working In TDP 4.0 Beta batch, but works fine in 3.8 batch

Team,

I’m experiencing issues getting an automated task to run correctly using 4.0 Beta. Basically its an automation task that uses a loop dataset variable to input the database name to spit out 10 different files switching the database name in the loop variable each time in just one select to file task. The entire automation works fine in 3.8 and in the 3.8 batch mode through the task scheduler. Now that I’m using the 4.0 beta, this same task works absolutely fine while running in TDP 4.0 Beta itself, its just failing when I use it in the batch mode for 4.0 beta called through the task scheduler. From the looks of the log, its not recognizing the variable for the connection for some reason in batch mode. I’m attaching the log files for both 3.8 and 4.0 for reference. The automation itself has settings I’d like to send separately if needed, so just let me know if I need to send that.

Any way this can be tested in both versions also and see if you run into a similar issue? I’d hate for 4.0 to launch and this issue is present and I have to use two different versions.

Lastly, I use an I-Series ODBC connection on my end for this, which requires the unquote information for the variables to be fed into the queries correctly. Let me know if you need further information. Thanks!
Loop_Variable_Logs.zip (5.36 KB)

The error seems to be that when run in batch mode the script can’t find the connection. This is the earliest issue shown in the log

“There is no connection description. Connection failed.”

When you are in design mode the automation designer will use the open connection if the same as needed in the activity. But when in batch mode it has to look up the connection, connect, execute the activity and then closes at the end of the activity. So this is the area we need to debug.

Look and see if you have two connections defined that have similar names. We may be trying to use the wrong one.

Also, look inside the export wizard file. What is the connection it is looking for. Look in the xml. Try and make that the same one as the connection you tell the activity to use. Don’t save the template pointing to one connection and the activity saying to use another. While this should work it may in your case cause some confusion.

If that does’t sort it out you can use my connection override option. To do this you need to do these two things.

  1. Set you connection in the connection manager to connection on startup. (This is check box at bottom of connection)

  2. Use the “Connect on Startup connection when running automation scripts” See Options | Environment | Connection manager.

What this does is forces a connection to open and then the script will use that connection and not close it.

Beyond that you will need to open a support case. TDP 4.0 is already on its way to GA but I am here to dig you out of anything

[8-|]

Debbie,

I went ahead and just proactively checked that “Connect on Startup connection when running automation scripts” option and reran. This appears to have done the trick automatically without having to check further into the issue. I think I’m good to go :slight_smile: Thanks so much!

chad

Yay[I]

I have an automation script with a loop dataset activity and it is not working in the designer or as a batch job. It gets to the beginning export or the first query and just hangs. How do I attach the script?

I created a simple loop activity and it worked fine. I am having problems with my existing script, which uses dynamic SQL. I will try just letting it run and see what happens. Usually it only takes 3 minutes to run, but now it is running over 10 minutes.

Have you double checked the connection information Debbie mentioned regarding my issue to see if that may be the same issue you are having?

Thanks!

Yes, that’s not the issue. Thanks.