Hi,
how can I run a script under different databases with Automation Designer? I tried it with Connection Iterator, but the scipt runs always on the default/actual connection.
Best regards
Hi,
how can I run a script under different databases with Automation Designer? I tried it with Connection Iterator, but the scipt runs always on the default/actual connection.
Best regards
Right-click and run the connection iterator iterator action, not the script action.
Or, you can right-click on the app and run that, as shown below. That will run everything listed on the right.
Hi John, thanks for the quick reply. I always run the app, but the script is still only executed on one database.
We're using Taod 16.3. Is there maybe any configuration I did wrong?
Are you sure that the script is only running on one database?
Maybe you have an output file set up, but it is being overwritten by each run of the script action.
There are a few ways to prevent that. Here is one:
For what it's worth, I just tested it on 16.3 and it worked as expected. If you post screen shots of your script action details, I'll try again.
The output is stored in a separate folder for each database. Unfortunately, the output file is the same in both folders.
Oh, you have nested iterators. That was a bug 2025 R1 and prior (connection iterators only passing connection to child actions, not grandchild or lower). It was fixed in version 2025 R2.
If you change your app so that the Execute Script is directly under the connection iterator (so it is a child action and not a grandchild), the script will run in the correct connection.
Ah, ok. We need to slowly update our version.
Is there a way to get the connection data from the connection iterator, such as CI.DB_Name or similar?
Thanks
Is there a way to get the connection data from the connection iterator, such as CI.DB_Name or similar?
Not really, no. And I wouldn't trust anything happening, connection wise, at any action not directly under the connection iterator.
But you could do this instead. ACTIVESESSIONDB is TNSName for the current connection. Which may be different from what you are getting from your query iterator, but hopefully it can work for you.
There is also ACTIVESESSIONUSER which is the logon user name.
That might bring me closer to the solution. Thanks.