Helpful Information
 
 
Category: Firebird SQL Development
Sql syntax manual/reference

Well I have installed the firebird classic rc2(BTW should i have installed the superserver?).

The thing is how do i get a hold on the syntax for the cmd line interface, given the fact that tools will come later...;)

I guess a proper doco should be available so we can test the database.

like log on with sysdba/masterkey doesn't help either...

All i can start is the isql but then logging in is kinda weird?


Any tips?

like i get this when i try to log on to the gsec to change sysdba's password




C:\Documents and Settings\Administrator.cc345772-a>cd /d E:\Program Files\Firebi
rd\Firebird_1_5\bin

E:\Program Files\Firebird\Firebird_1_5\bin>gsec
unavailable database
unable to open database


E:\Program Files\Firebird\Firebird_1_5\bin>ISQL
Use CONNECT or CREATE DATABASE to specify a database
SQL>
SQL>
SQL> set sql dialect 1;
SQL> create database "employe2.fdb";
Statement failed, SQLCODE = -904

unavailable database



Any one has any idea/links of helping setting up the firebird env.?

TIA

The quick start guide (http://www.ibphoenix.com/downloads/qsg.pdf) I believe has what you are looking for.

qsg I have already.

I think the configuration is the problem but dunno where to find the info...

Ok - you are looking for the language reference docs then. Have you downloaded those?

I would download the whole manual set - http://www.ibphoenix.com/downloads/60All.zip ( 11 megs + - )

But the one you need is the Langref.pdf which is inside that package...

Originally posted by tarry
Well I have installed the firebird classic rc2(BTW should i have installed the superserver?). If you're only going to connect to Firebird locally, then classic should be okay. If you're going to connect to it from other remote machines, then the server version would be the better choice.

http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_ss_vs_classic

Thanx people.
I'm gonna give it a try again. The services are running fine..
creating database gives the -904 error. I'll give it yet another shot. Though It would be nice to hear from anyone who'd done just the install and then could create and also carry out the dmls and ddl's with ease.

sqlcode -904 has several error explanations in the ref manual...





E:\Program Files\Firebird\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'employee.gdb' length 10000
CON> file 'employee2.gdb' length 10000 pages
CON> file 'employee3.gdb' length 10000 pages
CON> file 'employee4.gdb';
Statement failed, SQLCODE = -904

unavailable database
SQL>



Anyone point me to the problem.:confused:

Just out of curiousity, what happens when you type in the following commands? These are the commands that work on my Windows laptop so you might have to change the paths accordingly. I'm connecting to the security database and displaying its entries. Then I'm connecting to an existing sample database.

(from the bin directory with the isc4.gdb security database being one level higher)

gsec -user sysdba -password masterkey -database ../isc4.gdb

This gives me a GSEC> command prompt.
If it type the command "di" it displays the entries in the security database.

(from a dos prompt in the bin directory with the sample databases being in the "example" directory)

isql -user sysdba -password masterkey -database ../examples/EMPLOYEE.GDB

This brings me to an SQL> prompt where I type:

SELECT * FROM EMPLOYEE;

This returns a bunch of records.

Does any of this work on your machine? I'm using FB 1.0 so you might have to change some file extensions.

*.gdb extensions i don't have . I have in vers. 1.5
fdb extensions.
isc4.gdb I couldn't find.

Here's what I did...




E:\Program Files\Firebird\Firebird_1_5\bin>gsec -user sysdba -password masterkey -database E:\Program Files\Fi
rebird\Firebird_1_5\security.fdb
invalid parameter, no switch defined
error in switch specifications
I/O error for file "E:\Program"
Error while trying to open file
The system cannot find the file specified.

unable to open database

E:\Program Files\Firebird\Firebird_1_5\bin>gsec -user sysdba -password masterkey -database ../security.fdb
I/O error for file "../security.fdb"
Error while trying to open file
The system cannot find the file specified.

unable to open database

E:\Program Files\Firebird\Firebird_1_5\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set sql dialect 1;
SQL> create database "employe2.fdb";
Statement failed, SQLCODE = -902

Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> -user sysdba -password masterkey
CON> ;
Use CONNECT or CREATE DATABASE to specify a database
SQL> set sql dialect 1;
SQL> create database "employe2.fdb";
Statement failed, SQLCODE = -902

Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL>



The gsec does work BTW



E:\Program Files\Firebird\Firebird_1_5\bin>gsec -user sysdba -password masterkey
GSEC> help

gsec utility - maintains user password database

command line usage:
gsec [ <options> ... ] <command> [ <parameter> ... ]

interactive usage:
gsec [ <options> ... ]
GSEC>
<command> [ <parameter> ... ]

available options:
-user <database administrator name>
-password <database administrator password>
-role <database administrator SQL role name>
-database <security database>
-z

available commands:
adding a new user:
add <name> [ <parameter> ... ]
deleting a current user:
delete <name>
displaying all users:
display
displaying one user:
display <name>
modifying a user's parameters:
modify <name> <parameter> [ <parameter> ... ]
help:
? (interactive only)
help
displaying version number:
z (interactive only)
quit interactive session:
quit (interactive only)

available parameters:
-pw <password>
-uid <uid>
-gid <uid>
-fname <firstname>
-mname <middlename>
-lname <lastname>

GSEC> display
user name uid gid full name
------------------------------------------------------------------------------------------
SYSDBA 0 0
GSEC> modify help
record not found for user: HELP

E:\Program Files\Firebird\Firebird_1_5\bin>help modify
This command is not supported by the help utility. Try "modify /?".



E:\Program Files\Firebird\Firebird_1_5\bin>gsec -user sysdba -password masterkey
GSEC> z
gsec version WI-T1.5.0.3389 Firebird 1.5 Release Candidate 2



It's something very basic, but i can't put my finger on it:mad:

It;s working now..
Basics? Well I just had to get a hang of the syntax.

This is cool stuff man, it's got stored proc's like the one's of pl/sql.
Not bad.

Though still waiting for that ver. 5 form mysql where they'll be intoducing the pl/sql kind of stored procs...

Thanx again for your help.

For anyone interested the syntax was(to create the db...)




create database '../employee.fdb';
CREATE TABLE cross_rate
(
from_currency VARCHAR(10) NOT NULL,
to_currency VARCHAR(10) NOT NULL,
conv_rate FLOAT NOT NULL,
.
.
.
.
.


Cheers!

Tarry

Today, I dealed with this problem on a windows Xp installation in my notebook. I have installed the firebird ver. 1.5.3.4870-win32.exe and the problem was that the database was unavailable (error SQL code -904), choosing the classic service.
The solution have been to reinstall the firebird as superserver, as service.
Vincenzo




Well I have installed the firebird classic rc2(BTW should i have installed the superserver?).

The thing is how do i get a hold on the syntax for the cmd line interface, given the fact that tools will come later...;)

I guess a proper doco should be available so we can test the database.

like log on with sysdba/masterkey doesn't help either...

All i can start is the isql but then logging in is kinda weird?


Any tips?










privacy (GDPR)