Executing a SQL File

You can execute a SQL file from the SQL File Editor or from WorkSpace Navigator.

Prerequisites 

Make sure the database server is running and you are connected to it through a connection profile.

Execute the SQL file using one of the following methods.
Option Description
From SQL File Editor
  1. In the WorkSpace Navigator project folder, double-click to open the SQL file in SQL File Editor.
  2. Right-click in the editor, and select Execute All.
From WorkSpace Navigator
  1. Select one or more SQL files.
  2. Right-click the files and choose Execute SQL File.
  3. If you selected multiple SQL files, click OK in the Select Profiles for the File dialog.
From the toolbar
  1. Click the "Choose a .sql File to Execute" 
						  Choose One or More SQL Files to Execute button on the Database Development perspective toolbar.
  2. On your file system, navigate to your workspace and project.
  3. Select the SQL files you want to execute from the file system, and click Open.
  4. Select the Database Server Type, Connection Profile Name, and Database Name.
  5. (Optional) If you did not create a connection profile for this database type, click Create.
  6. Click OK.

The SQL file executes, and results appear in the SQL Results view. SQL Results view displays the result sets, database server messages, execution status (success or failure) and operation details.

Related concepts
SQL File Editor
SQL Scrapbook
Related tasks
Creating a SQL File
Editing a SQL File
Opening a SQL File
Saving a SQL File
Executing a SQL Statement
Running an Ad Hoc SQL Statement
Viewing SQL Results
Related reference
SQL Editor Preferences
Code Assist Preferences
SQL Files/Scrapbooks Preferences
Syntax Coloring Preferences
Templates Preferences