Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a new Firebird database from the command line?

I'd like to create a new Firebird database in my C# client application. Is there a command line utility that lets you do this?

like image 919
dthrasher Avatar asked Oct 21 '09 16:10

dthrasher


1 Answers

you can use isql but I advice you to use directly the api.

isql -input test.sql

test.sql is like this :

SET SQL DIALECT 3;

SET NAMES UNICODE_FSS;

CREATE DATABASE 'D:\testdata.fdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 16384
DEFAULT CHARACTER SET UNICODE_FSS;

CREATE TABLE CUSTOMERS (
    CUST_ID       INTEGER NOT NULL,
    CUST_NAME     INTEGER,
    CUST_UNISITE  INTEGER
);

CREATE TABLE SMS_DETAIL (
    SD_ID                       INTEGER NOT NULL,
    SD_MESSAGE_DATA             VARCHAR(160)
);

creating database via the api

like image 79
Hugues Van Landeghem Avatar answered Oct 18 '22 03:10

Hugues Van Landeghem