Invoking isql

<< Overview | Firebird Interactive SQL Utility | Command-line switches >>

Invoking isql

If you do not have the Firebird bin directory on your path, then either go to the bin subdirectory of your Firebird installation and type isql (Windows) or ./isql (Linux) at the command prompt, or, type the full path to the isql application to execute it. If the bin is on your path, you may start it by typing isql regardless of your operating system.

Example

 C:\Firebird_2_0\bin>isql

 Use CONNECT or CREATE DATABASE to specify a database
 SQL> CONNECT "C:\DATABASES\FIREBIRD\MY_EMPLOYEE.FDB"
 CON> user 'SYSDBA' password 'secret';

The above is the simplest method of starting isql, and once activated in this way, you must begin by either creating a new database, or connecting to one. The prompt given by isql is a hint as to what you must do next. If you wish to connect to an already existing database, you may pass the database name on the command line. You should be aware that unless you also pass the username and password as well, you may see an error message telling you that your username or password have not been defined. In this case, you need to supply the username and password, or create two environment variables as discussed below.

The following example shows how to pass the database name plus user credentials on the command line.

 C:\Firebird_2_0\bin>isql -user sysdba -password secret employee

 Database: employee, User: sysdba

 SQL>

In this example, we used a database alias for the employee database. This example comes predefined in the file aliases.conf which normally lives under the directory that Firebird was installed in, but some Linux distributions put it in /etc/firebird/n.n where n.n is the version of the Firebird database server. There is more information on connecting to databases, using full paths or alias names, below.

back to top of page
<< Overview | Firebird Interactive SQL Utility | Command-line switches >>