Toad World® Forums

Need to intialize for Oracle Applications before running the optimization

Begin
fnd_global.apps_initialize(user_id => ln_user_id,

resp_id => ln_resp_id,

resp_appl_id => ln_resp_appl_id);
End;

I have to run the following before a select returns records from Oracle Applications:

This is session related.
How can I run this in the same session as the optimizations ?

Hi,

You can instruct SQL Optimizer to execute a script file after connecting to the database.

  1. First, create a script file that contains the code you wish to execute and save it to your local file system. Note: you will need to set the variables (ln_user_id, ln_resp_id, ln_resp_appl_id) in the script or replace them with literal values.

  2. Within SQL Optimizer, open the Options dialog by selecting the Options button in the top right of the application window.

  3. Navigate to the General | Options page and look in the "General Options" group box for the Execute Login Script. Enable it by checking the box and enter the path and name of the script file you created in Step 1.

  4. Press Ok to Save changes and close the options dialog.

Now, any new database connection should run your script file once the connection is established.

I'd recommend testing your script file in Toad to ensure it operates properly.

Regards,
Greg