Creating A Database
To create a database interactively using the isql command shell, open a command prompt in Firebird’s bin subdirectory and type isql (Windows) or ./isql (Linux):
$ isql Use CONNECT or CREATE DATABASE to specify a database
To create a database named monkey.fdb and store it in a directory named test on your C:-drive:
SQL>CREATE DATABASE 'C:\test\monkey.fdb' page_size 8192 CON>user SYSDBA password 'masterkey';
For the full syntax of CREATE DATABASE, refer to the Language Reference of your Firebird version.For example, the Firebird 5.0 Language Reference section on CREATE DATABASE.
|
Note
|
In the When running Classic Server on Linux, or when using Firebird 3.0 or higher, if the database does not start with a host name, the database file will be created with the current user as the file owner.This may cause access denied errors for others who may want to connect at a later stage.By prepending the |
To test the newly created database type:
SQL>SELECT RDB$RELATION_ID FROM RDB$DATABASE; RDB$RELATION_ID =============== 128 SQL> commit;
To get back to the command prompt type quit or exit.
|
Note
|
The above technique, as demonstrated, works, but ideally databases and metadata objects should be created and maintained using data definition scripts. |