DelphiFAQ Home Search:

Setup and create my first Firebird database on Windows?

 

comments12 comments. Current rating: 4 stars (9 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!
2008-07-11, 18:22:03
jicmonemy from Bucharest, Romania  
SUUUUUUUPEEEEEER!!!!!!!!!!
2009-09-27, 20:11:52
anonymous from Iceland  
rating
Thank you so much
2009-10-05, 08:44:14
anonymous from Finland  
rating
Use Maestro Firebird as GUI for creating database in Firebird.
2012-06-11, 07:40:29
jaffa from India  
rating
Great.
2012-06-11, 07:41:23
anonymous from India  
rating
In the earliest database systems, efficiency was perhaps the primary concern, but it was already recognized that there were other important objectives. One of the key aims was to make the data independent of the logic of application programs, so that the same data could be made available to different applications. Thanks.
Regards,
<a href=' http://www.fivebutt..m/'>WEB DESIGN COMPANY</a>
2012-06-11, 07:41:42
jaffa from India  
rating
In the earliest database systems, efficiency was perhaps the primary concern, but it was already recognized that there were other important objectives. One of the key aims was to make the data independent of the logic of application programs, so that the same data could be made available to different applications. Thanks.
Regards,
<a href=' http://www.fivebutt..m/'>WEB DESIGN COMPANY</a>

 

 

NEW: Optional: Register   Login
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, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

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.

photo Add a picture: