You can execute scripts stored in the Script Repository. You can submit a script for execution either from the Script Editor, or from the SQL Scripts home page.
When you submit a script for execution, the Run Script page appears. It displays the script name, when it was created and by who, when it was last updated and by who, the number of statements it contains, and its size in bytes. It also lists unknown statements such as SQL*Plus commands that it will ignore during execution.
Finally, it lists statements with errors. If there are errors, the Run control does not appear.
Topics:
To execute a script in the Script Editor:
Open the script you want to execute in the Script Editor.
Click Run in the Script Editor.
The Run Script page appears.
The Run Script page displays information about the script and lists statements in error preventing execution, or statements such as SQL*Plus commands that will be ignored when the script is executed. The Run Script page has three controls:
Cancel to return to the SQL Scripts home page without executing the script.
Edit Script to load the script into the Script Editor.Edit Script appears instead of Run when a script has errors.
Run to submit the script for execution. Run is not available if there are script errors.
Click Run to submit the script for execution.
The Manage Script Results page appears listing script results.
Click the View icon for the results you want to view. The View icon is at the right end of the scripts listed in the Manage Script Results page.
To execute a script from the SQL Scripts home page:
Click the SQL Workshop icon on the Workspace home page.
Click the SQL Scripts icon.
Click the Run icon for the script you want to execute in the SQL Scripts home page.
The Run icon is at the right end of the scripts listed in the Details view of the SQL Scripts home page.
The Run Script page appears.
The Run Script page displays information about the script and lists statements in error preventing execution, or statements such as SQL*Plus commands that will be ignored when the script is executed. The Run Script page has three controls:
Cancel to return to the SQL Scripts home page without executing the script.
Edit Script to load the script into the Script Editor. Edit Script appears instead of Run when a script has errors.
Run to submit the script for execution. Run is not available for scripts with errors.
Click Run to submit the script for execution.
The Manage Script Results page appears listing available results for the script.
Click the View icon for the results you want to view. The View icon is at the right end of the scripts listed in the Manage Script Results page.
On the Run Script page, you can:
Cancel the execution. Click Cancel to exit the Run Script page without executing the script. The SQL Scripts home page appears.
Edit the script. Edit Script appears instead of Run when a script has errors. Click Edit Script to load the script into the Script Editor to remove the lines with errors.
Execute the script. Click Run to execute the script.
If you execute a script that takes a long time to complete, you can view its status in the Long Operations report available in the Database Monitor.
To view the status of a long running script:
Click the SQL Workshop icon on the Workspace home page.
Click Utilities and then Database Monitor.
Accessing the Database Monitor page requires database administrator privileges. You must have a database account that has been granted the DBA role.
Enter a valid database account username and password at the prompt and click Login.
Select Long Operations under Activity.
The Long Operations report displays. You can see the status of your long-running script.