Subject Re: [firebird-support] firebird on debian SQLCODE = -902 as normal user
Author Helen Borrie
At 09:16 PM 26/11/2007, you wrote:
>Helen Borrie wrote:
> >
>> You haven't mentioned what you are using as your security login to the
>> *database*. Does user ANDI exist in security2.fdb?
>> ./heLen
>no the user ANDI didn't exist in the security.fdb.
>There is only a security.fdb no security2.fdb, but in debian is firebird
>= 1.0x and firebird2 = 1.5x and firebird2.0 = 2.0
>So I've installed:
>mrburns:/var/log# aptitude show firebird2-classic-server
>Paket: firebird2-classic-server
>Zustand: Installiert
>Automatisch installiert: nein
>I added the user ANDI to the security.fdb with the same password than
>SYSDBA, but the problem still occurs.
>(I copied the security.fdb to a local computer where ibexpert is
>installed and added through ibexpert and replaced the old security.fdb
>with the new one.
>But I had never to do this.

Next, what *model* of firebird 1.5 have you installed?

>The curious is, that I have no possibility to type the username and
>password. In my other installations I start isql, then CONNECT
>'database.gdb' and then USER 'SYSDBA' PASSWORD 'xxx', but here I can't
>write the USER and the PASSWORD. isql tries immediately to connect:
>andi@mrburns:~$ isql-fb
>Use CONNECT or CREATE DATABASE to specify a database
>SQL> CONNECT 'database.gdb';
>Statement failed, SQLCODE = -902
>operating system directive open failed
>-Permission denied

This error suggests one of two things:

a) You are running Superserver not Classic. With SS you cannot connect directly to a database file as you can with Classic and the client.

b) The firebird group doesn't have execute permissions on the directory where the database file is located.

Assuming the following:

1. You installed the Superserver model of Firebird
2. You have renamed isql to isql-fb
3. You are in $firebirdroot$/bin directory

~~~$ .isql-fb [return]
Use CONNECT or CREATE DATABASE to specify a database
SQL> CONNECT 'localhost:\path\to\database.gdb'
CON> USER 'ANDI' PASSWORD 'xxxxxxxxxxx';

Or, you can connect directly from the command-line:
~~~$ .isql-fb 'localhost:\path\to\database.gdb' -user ANDI -pass xxxxxxxxxxx [return]

I also set the ISC_USER and ISC_PASSWORD as environment variable, but
the problem is still there.

That won't help if you're attempting the wrong way to connect or if the required group permissions are missing...