October 9th, 2013, 04:33 PM
Firebird migration ODS issue
I tried to migrate an Interbase database to a Firebird 2.5 instance but I'm in trouble with the ODS format used on the origin database. If I run the gstat command on Interbase server I can notice that the database uses the ODS 12 version and I can't import this database on Firebird 2.5 version.
Are there some method to import this database?
I have also tried the Firebird 3.0 Alpha 1 version but the behavior is the same.
Thanks a lot,
October 10th, 2013, 03:59 AM
Firebird's ODS and Interbase's ODS are different. Try to export the data as SQL script and import it in new, empty Firebird database. IBExpert has such tools.
And maybe you'll have to change some things in the script if they are not supported in Firebird.
October 17th, 2013, 01:01 PM
Thanks for the reply. I have tried to export the database from Interbase to Firebird as suggested in transporable format, and the import worked as expetected. The tables are visibile.
Originally Posted by mIRCata
If i tried to run a backup/restore from Firebird to Firebird, I noticed an error during the imort phase.
Could this behavior be related to the ODS difference?
October 18th, 2013, 04:08 AM
What is the error?
And what are the versions of both Firebirds?
October 18th, 2013, 05:29 AM
I tried the backup situation on the same firebird instance after the moving from Interbase. The server has been installed with firebird-superserver version 126.96.36.199539 on CentOS 6 x86_64.
The status of the imported database on FB is:
I received an error about the violation of primary key into an index.
Number of DB pages allocated = 86400
Sweep interval = 0
Forced Writes are ON
Transaction - oldest = 72
Transaction - oldest active = 73
Transaction - oldest snapshot = 73
Transaction - Next = 77
ODS = 12.0
Default Character set: NONE
gbak: ERROR:violation of PRIMARY or UNIQUE KEY constraint "RDB$INDEX_12" on table "RDB$RELATION_CONSTRAINTS"
gbak:Exiting before completion due to errors
October 18th, 2013, 07:08 AM
This error shows that somehow you have 2 or more constraints (primary key, foreign key, check etc) with duplicate names.
This will show you the duplicates. And if they are not with RDB$* (system constraints) you have to change/remove them before the backup.
GROUP BY 1
HAVING COUNT(RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_NAME)> 1
ORDER BY 1