savoweb
savoweb

Reputation: 31

Cannot attach to password database

I have begun to port my Firemonkey Application into OSX. I used DBExpress driver DevArt. I read this post in order to convert Firebird from Server to Embedded.

But when my application starts, it raises an exception:

Cannot attach to password database

The database is copied from my Windows installation and not created on OS X. I don't think this the problem, but it lies in the conversion from Server to Embedded because the documentation is for the old Firebird version.

Have you got any ideas to solve my problem?

Upvotes: 1

Views: 1974

Answers (3)

kovarov
kovarov

Reputation: 802

use this

  1. STEP 1 (make a copy of security.fdb):

/opt/firebird/bin/gbak -user SYSDBA -password masterkey /opt/firebird/security.fdb /opt/firebird/security.fbk

if you get following error you have to chown security.fdb to firebird user!

gbak: ERROR:I/O error for file "/opt/firebird/security.fdb" gbak: ERROR: Error while trying to open file gbak: ERROR: Permission denied gbak:Exiting before completion due to errors

  • STEP 2 (restore the database):

/opt/firebird/bin/gbak -rep -user SYSDBA -password masterkey /opt/firebird/security.fbk /opt/firebird/security.fdb

  • STEP 3 (database conversion):

/opt/firebird/bin/isql -user SYSDBA -password masterkey -i /opt/firebird/upgrade/security_database.sql /opt/firebird/security.fdb

  • STEP 4 (stop the firebird):

service firebird stop:

  • STEP 5 (overwrite the old security fdb):

cp security.fdb security2.fdb

Autor: Marcin Rybak

Upvotes: 1

Marcodor
Marcodor

Reputation: 5741

First backup db on win os and restore it on osx. Different physical storage format.

Also, even on embeded version, on mac osx, Firebird use security2.fdb (with write permissions) in case you specify username / password. Without user / pass it should work without security2 database.

Upvotes: 1

Christopher Ramírez
Christopher Ramírez

Reputation: 1720

Cannot attach to password database means that firebird can not find the users database. It's a file named security.fdb or security2.fdb on Firebird 2.0 and above. This file should be in firebird folder as stated in the IBPhoenix's article you linked.

Upvotes: 0

Related Questions