22

I have an application made with Delphi 2006 and Firebird 2.5. For connection a use Interbase components from Delphi. I setting up in design time a TIBDatabase with username, password tc, and work ok, but when i want to run application in another pc (first i install Firebird 2.5 on it), i received this error:

Statement failed, SQLSTATE = 28000

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

What is this? How can I resolve that?

user157251
  • 64,489
  • 38
  • 208
  • 350
Origen Banaru
  • 221
  • 1
  • 2
  • 3

6 Answers6

17

The message clearly states the username and password you're using to connect at design time in your development machine are not valid to the database server you're trying to connect on the other machine (let's call it production). From your message it seems it is not the same server you connect to at design time.

I suggest you to test this issue with ease to put the LoginPrompt property to true on the TIBDatabase component to allow it to ask the user for propper credentials before connecting. You will be able to connect using any valid username/password combination for that server. To be sure the combination are valid, try to connect using the isql command line tool, for example the command

c:\test>isql test.fdb -u sysdba -p masterkey

will connect to c:\test\test.fdb using default username and password. (the firebird root directory must be in the path environment variable for this to work)

Also, you can use the gsec command line tool to adjust the password for this engine or you can provide the create users and change passwords on that production machine before trying to connect to it.

On Windows, firebird default sysdba password is masterkey.

jachguate
  • 16,468
  • 2
  • 52
  • 93
  • 2
    Firebird password length is limited to 8 characters... so masterke is enough enough to get you into Firebird. This used to be the case in Interbase but I haven't tried that since IB 6 – Nazar Nov 25 '10 at 19:16
  • There's a great [getting started walkthrough](http://swinbrain.ict.swin.edu.au/wiki/Create_a_Firebird_Database) here. – Assad Ebrahim Feb 17 '14 at 14:56
1

At 'isql-fb' from linux terminal and after the 'CONNECT' on database: - I solved after delete(drop) and recreate the 'SYSDBA' user.

Observation: I had problems with file and folder permission at '/tmp/firebird' and I needed to use 'sudo' or root to open 'isql-fb'

Thanks.

Wellington1993
  • 194
  • 1
  • 2
  • 15
  • 1
    `DROP USER 'SYSDBA';` `CREATE USER 'SYSDBA' PASSWORD 'masterkey';` `ALTER USER 'SYSDBA' GRANT ADMIN ROLE;` – Wellington1993 Aug 29 '17 at 20:47
  • What do you mean after the 'CONNECT' on the database? I have the same error, but it appears when I try to connect to the database. So no chance to run the 'DROP' etc – otong Jan 04 '19 at 07:04
  • 1
    You can open 'isql-fb' without specifying the connection parameters. And the "CONNECT" it's a command for use inside isql-fb: https://www.firebirdsql.org/pdfmanual/html/isql-connect-database.html When you use isql-fb, maybe you can access your database with "connect" command. – Wellington1993 Jan 25 '19 at 12:06
  • in my case, "connect" command need username and password. it says "Your user name and password are not defined." – dhidy Aug 02 '20 at 18:50
1

I once got this error trying to connect to a Firebird 3.0.3 database using the Firebird 2.5 client libraries. I just forgot to update the client libraries to 3.0.3. Maybe this will help someone.

dsungaro
  • 120
  • 1
  • 7
1

The solution that finally worked for me on windows was starting cmd.exe as administrator and running "C:\Program Files (x86)\Firebird\Firebird_3_0\gsec.exe" -user sysdba -password masterkey -mo sysdba -pw masterkey

Tanonic
  • 73
  • 5
0

This error is because the credentials for Firebird db is simply not stored in the database file. It's stored in the configuration file on the Firebird Server. If you copy over the DB file, and not the password -- you will have a different password.

On Ubuntu machines you can find out the password and username in the file, /etc/firebird/<version>/SYSDBA.password

It'll look something like,

ISC_USER=sysdba
ISC_PASSWORD="password"

Use those credentials to connect to the database file.

user157251
  • 64,489
  • 38
  • 208
  • 350
  • That is not quite correct, user account information including password is stored inside the security database (with more options like using operating system authentication in more recent versions), but not in a configuration file. – mghie May 03 '14 at 05:39
  • 1
    I don't understand your correction, the password in the conf file `SYSDBA.password` is *certainly* what `isql` wants. – user157251 May 03 '14 at 05:43
  • First there is no connection with Ubuntu in the question. Second it's possible to change the SYSDBA password on a Ubuntu machine without changing the SYSDBA.password content, by using Firebird-native ways of modifying that password instead of the administration script. – mghie May 03 '14 at 05:46
  • @mghie could I know where's the reference to change the SYSDBA password without changing the SYSDBA password content? I'm having the same problem, – otong Jan 04 '19 at 07:12
  • @otong: As written in the most upvoted answer, use the `gsec` tool on the machine with the server. – mghie Jan 04 '19 at 08:22
-2

The easiest solution was to uninstall firebird and all the components associated with it in add and remove programs, after uninstalling check if the gds32.dll dll was deleted from the syswow and system32 folder then enter the program files folder check manually delete the folder firebird that even after the uninstallation continues many times restart the machine and reinstall firebird the problem will be solved.

  • 1
    this dismiss the problem at all - when the program wont find the dll, it will not reach the part where it tries to login to firebird – cmks Nov 12 '20 at 21:41