Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 2nd, 2003, 11:37 AM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old June 2nd, 2003, 11:40 AM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
like i get this when i try to log on to the gsec to change sysdba's password

Code:

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

Last edited by tarry : June 2nd, 2003 at 11:57 AM.

Reply With Quote
  #3  
Old June 2nd, 2003, 12:09 PM
jpenn's Avatar
jpenn jpenn is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2002
Location: Washington, DC
Posts: 2,693 jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 41 m 10 sec
Reputation Power: 16
The quick start guide I believe has what you are looking for.
__________________
~ Joe Penn

Reply With Quote
  #4  
Old June 2nd, 2003, 12:13 PM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
qsg I have already.

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

Reply With Quote
  #5  
Old June 2nd, 2003, 12:30 PM
jpenn's Avatar
jpenn jpenn is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2002
Location: Washington, DC
Posts: 2,693 jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 41 m 10 sec
Reputation Power: 16
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...

Reply With Quote
  #6  
Old June 2nd, 2003, 01:11 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
Re: Sql syntax manual/reference

Quote:
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...p_ss_vs_classic

Reply With Quote
  #7  
Old June 2nd, 2003, 02:25 PM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #8  
Old June 2nd, 2003, 02:57 PM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Still no luck...

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

Code:


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.

Reply With Quote
  #9  
Old June 2nd, 2003, 05:54 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
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.

Reply With Quote
  #10  
Old June 3rd, 2003, 04:51 AM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
*.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...

Code:

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

Code:
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

Last edited by tarry : June 3rd, 2003 at 04:59 AM.

Reply With Quote
  #11  
Old June 3rd, 2003, 05:31 AM
tarry tarry is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Netherlands
Posts: 23 tarry User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It's working.. Thanx for your help guys

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...)

Code:

 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

Reply With Quote
  #12  
Old June 7th, 2006, 04:03 PM
VincenzoLemonIT VincenzoLemonIT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 1 VincenzoLemonIT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 8 sec
Reputation Power: 0
Install the superserver version

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



Quote:
Originally Posted by tarry
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Sql syntax manual/reference


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |