Subject Re: [ib-support] ISQL on to create tables?
Author Helen Borrie
At 01:06 AM 14-06-02 +0000, you wrote:
>I've been running FB on Windows and used IBConsole to create a table
>via SQL. I decided to install the Linux version to develop in a true
>C/S environment.
>Since I'm using the classic server on Linux, I can't use IBConsole.

Yes you can. You just don't have the Services API available for
Classic. However, there are many better Windows interactive admin tools
around - try IB_SQL free from

>How do you use ISQL to create a database using SQL? Due to teh
>nature of the app, the tables have to be created with SQL.

Get into isql and, if necessary, log into the server.

# isql -user sysdba -password masterkey
SQL> SET SQL DIALECT 3; <--- you need the colon at the end of a command

Issue a legal DDL command to CREATE DATABASE:

SQL> CREATE DATABASE '/usr/data/mydb.gdb' -page_size 8192;

You will now be connected to the new database.

If the database already exists and you are coming back to it, you need to
connect to it with a legal CONNECT statement:

SQL> CONNECT '/usr/data/mydb.gdb' user 'sysdba' password 'masterkey';

(You won't need the user and password if you started isql as sysdba).

While logged in, create a table interactively, using a legal DDL CREATE
TABLE statement. You can get the syntax from any of the available
documentation sources. For example:

SQL> CREATE TABLE MyTable( [press Return key]
CON> COL1 INTEGER, COL2 VARCHAR(30), [press Return key]
CON> [ rest of column definitions ] [press Return key]
CON> ); [press Return key]

Creating database objects interactively is not highly recommended - a DDL
script provides ongoing self-documentation. However, there are tools in
isql that enable you to save your interactive statements to a script.

The whole process is fully covered in the Using Firebird manual and
Reference Guide; or you can search in the IB6 beta docs for the isql
documentation (OpGuide.pdf) and the DDL syntax (LangRef.pdf and other places).

>I've gone into ISQL, typed create database BS1 and I get a token
>unknown error.

SQL is quite "pertickerlar" about syntax.

>There aren't any man pages for ISQL, so I'm at a loss on it's use.
>I've looked at the beta docs for IB6 and they indicate to use DDF to
>create the tables.

You need to learn to find your way around the beta docs. <g>


All for Open and Open for All
Firebird Open SQL Database · ·