Toad World® Forums

Toad Data Point -> Job Manager -> Automation Script need help with executing using set org for oracle 11i DB

Hi
I have a automation script that has the SQL that uses
the below set org condition and then executes the actual sql query. It worked with older versions of TDP like 3.8 but after upgrading to V4.2 it breaks, meaning doesn't run the sql thru TDP.

Need your help on how to achieve this.

Begin
fnd_client_info.set_org_context(81);
End;

Thanks

I am not able to reproduce. Would be lovely to get more details on the error message/s you are receiving, and details on how you are trying to run this within TDP...e.g. via the Editor, I presume?

Hi Gary

I am using this SQL in the .tas files. I am attaching the screenshot of the automation script and the error I receive.

Thanks

Still not able to reproduce. Some things to consider...

  1. I noticed you are using the "Select to File" task, which is typically used for executing a single query.
    Are you trying to run more than one query after the FND call?
  2. Does the script logic you are trying to execute within the automation job run correctly in the TDP Editor? Given the nature of the error message, there may be a semi-colon out of place? Can't be sure, since I don't see your entire script.
  3. Upgrade to the latest TDP (5.0.4) and see if you still get the issue.
  1. I Have 2 sql , in v3.8 I had them both in Select to File task, so did not change that structure.

  2. I did try running the sqls in TDP editor run the first one and then run the second sql this way they work fine, as first SQL is to only set the org and no data will be exported out of it. (Attached the sql for you for reviewsql.txt (8.8 KB) )

  3. My admin team is not willing to upgrade yet

There were some changes in how we parsed the Execute SQL block of code and what we executed. I think you have a version that might be looking only for the last Select statement. Please download the Beta and try. We have made changes in this area.

Hi Debbie

Sure, can you please point me to the download link for beta version?. Thanks

Most definitely. I usually include the link but I must have been in a hurry when answering your post. Here is the link.