Reputation: 31
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
Reputation: 802
use this
/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
/opt/firebird/bin/gbak -rep -user SYSDBA -password masterkey /opt/firebird/security.fbk /opt/firebird/security.fdb
/opt/firebird/bin/isql -user SYSDBA -password masterkey -i /opt/firebird/upgrade/security_database.sql /opt/firebird/security.fdb
service firebird stop:
cp security.fdb security2.fdb
Upvotes: 1
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
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