DelphiFAQ Home Search:

Setup and create my first Firebird database on Windows?

 

comments6 comments. Current rating: 5 stars (4 votes). Leave comments and/ or rate it.

Question:

How do I setup and create my first Firebird database on Windows?

Answer:

Follow these instructions:




##
## Setting up Firebird SQL server on Windows 2003 Server
##
## Setup, create user, create database, login
##
##
##
## I am sure this works fine on all other windows versions,
## I just happened to do this on Win2k3.
##
  1. Download and Install the Firebird application (as superserver and service) into %systemdrive%\fbsql I installed into d:\fbsql, and I will use this as my example, you may have another. I believe the default is c:\Program Files\Firebird SQL. When I installed I basically selected all the defaults except for my install path.
  2. after install start service

  3. Go to Start, Run, and open cmd promt:
    cd d:\fbsql
    bin\gsec -user sysdba -password masterkey -database
    localhost:d:\fbsql\security.fdb
  4. Once in GSEC... you have a prompt: GSEC>
    GSEC> Add dbuser -pw yourpassword -fname fullname
    GSEC> display
    GSEC> quit
  5. Next open the sample database:
    bin\isql localhost:d:\fbsql\examples\employee.fdb -u dbuser -p
    yourpassword
  6. Now lets create mydb, you now have a prompt: SQL>
    SQL>create database 'localhost:d:\fbsql\mydb.fdb';
    SQL>exit;
  7. You now have a new database created and you should be able to log in like so:
    d:\fbsql\bin\isql localhost:d:\fbsql\mydb.fdb -u dbuser -p yourpassword

    - OR - from a remote host (if you installed the client)

    pathto\isql servername:d:\fbsql\mydb.fdb -u dbuser -p yourpassword
NOTES:
-as I mentioned I used the non-default path for my server installation: d:\fbsql
-The main key for this to work for me was to use the 'host:path\to\file.fdb' syntax.
For example, the documentation stated simple commands like so:
gsec -user sysdba -password masterkey isql -u sysdba -p masterkey These did not work for me, I had to supply the host and db file for each to work. On gsec I had to supply the -database switch that specified the correct security database. So, my commands that worked:

gsec -user sysdba -password masterkey -database
localhost:d:\fbsql\security.fdb

isql localhost:d:\fbsql\mydb.fdb -u dbuser -p yourpassword


Comments:

2006-04-27, 13:33:11
anonymous from Brazil  
rating
2006-06-28, 12:55:56
anonymous from Czech Republic  
rating
thank you very much, this article helped me a lot
2006-11-17, 23:24:39
anonymous from United States  
Any suggestions for a GUI to use with the Windows version of Firebird 2.0?
2007-03-09, 10:08:10
anonymous from Canada  
rating
short, clear, strait to the point. thanks!
2008-01-14, 15:50:25
anonymous from United States  
I like to use Marathon with Firebird. IBExpert from HK-Software works well too.
2008-01-17, 14:33:10
anonymous from Brazil  
rating
thanks a lot!

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Washington, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
Leave your comment here:
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.