# Executing a SQL File

You can execute a SQL file from the SQL File Editor or from 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 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 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.

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