Previous Next JavaScript must be enabled to correctly display this content

## 6.10 Executing a SQL Script

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 page.

When you submit a script for execution, the Run Script page appears. It displays the script name, when it was created and by whom, when it was last updated and by whom, the number of statements it contains, and its size in bytes. It also lists unknown statements such as SQLcl commands that are ignored during execution.

If a script does not contain any runnable statements, the Run control does not display.

- Executing a SQL Script in the Script Editor
  Learn how to execute a script in the Script Editor.
- Executing a SQL Script from the SQL Scripts Page
  Learn how to execute a script from the SQL Scripts page.

See Also:

About Long Operations Page

Parent topic: Using SQL Scripts

### 6.10.1 Executing a SQL Script in the Script Editor

Learn how to execute a script in the Script Editor.

To execute a script in the Script Editor:

1. Open the script you want to execute in the Script Editor.
2. Click Run in the Script Editor.

   The Run Script page appears. This page displays information about the script and lists statements in error preventing execution, or statements such as SQLcl commands that are ignored when the script is executed.

   Available options on the Run Script page include:

   - Cancel - returns you to the SQL Scripts page without executing the script.
   - Run Now - to submit the script for execution.
3. Click Run Now to submit the script for execution.

   The Manage Script Results page appears listing script results.

4. To view script results, click View Results.

See Also:

- Using the Script Editor
- Viewing SQL Script Results

Parent topic: Executing a SQL Script

### 6.10.2 Executing a SQL Script from the SQL Scripts Page

Learn how to execute a script from the SQL Scripts page.

To execute a script from the SQL Scripts page:

1. On the Workspace home page, click SQL Workshop and then SQL Scripts.

   The SQL Scripts page appears.

2. Click the View Report icon.

   Reports view appears.

3. In the far right column, click the Run icon for the script you want to execute.

   Tip:

   If the script does not contain any runnable statements, an error icon displays.

   The Run Script page appears. This page displays information about the script and lists statements in error preventing execution, or statements such as SQL*Plus commands that are ignored when the script is executed.

   Available options on the Run Script page include:

   - Cancel - returns you to the SQL Scripts page without executing the script.

   - Run Now - to submit the script for execution.

4. Click Run Now to submit the script for execution.

   The Manage Script Results page appears listing available results for the script.

5. Click the View Results icon in the far right column.

See Also:

Viewing SQL Script Results

Parent topic: Executing a SQL Script