Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrestorable database from FB2.5 (also only metadata) [CORE4828] #5125

Closed
firebird-automations opened this issue Jun 5, 2015 · 7 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @livius2

Attachments:
plemiona_meta.fbk

I try to migrate my database from FB2.5 but it raise error also if i use only metadata backup
This backup is restorable under 2.5.4 without problem but under WI-T3.0.0.31855 Firebird 3.0 Beta 2 it raise error

Connecting to server 127.0.0.1/3051...
Database restore started 17:56:52
gbak:opened file C:\BackUp\Plemiona\Bazy\plemiona_meta.fbk
gbak:transportable backup -- data in XDR format
gbak: backup file is compressed
gbak:backup version is 9
gbak:created database C:\Import\Bazy\FB3\plemiona.meta, page_size 16384 bytes
gbak:started transaction
gbak:restoring domain SEC$KEY
Database restore canceled 17:56:54 due to IBPP exception:

*** IBPP::SQLException ***
Context: ServiceImpl::Wait
Message: isc_service_query failed

SQL Message : -803
Invalid insert or update value(s): object columns are constrained - no 2 table rows can have duplicate column values

Engine Code : 335544665
Engine Message :
violation of PRIMARY or UNIQUE KEY constraint "RDB$INDEX_2" on table "RDB$FIELDS"
unknown ISC error 335545072
Exiting before completion due to errors

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

Database metadata backup from FB2.5.4
Try to restore under FB3

@firebird-automations
Copy link
Collaborator Author

Modified by: @livius2

Attachment: plemiona_meta.fbk [ 12754 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

I found where the problem is.
In the past i migrate from FB2.5 to FB3 but after some problems i migrate back to FB2.5
But this migration, migrate also few system domains named "SEC$".
And now when problems was fixed i try migrate back from FB2.5 to FB3 - and this domains conflict with system domains ;-)

I remove them and restore work ok.

but now i see another problem
I have database created under 2.5 i suppose 2.5.3 - and there i create udf declaration

DECLARE EXTERNAL FUNCTION IMPORT_CSV_BLOB
cstring(32000), cstring(496), cstring(8000), cstring(16000), blob, cstring(16), cstring(16), cstring(16)
RETURNS integer BY VALUE
ENTRY_POINT 'IMPORT_CSV_BLOB'
MODULE_NAME 'UDF_CSV';

now 32000 is too big?
something was changed in the middle?
Database is restorable but this udf function can not be created from script

Error: *** IBPP::SQLException ***
Context: Statement::Prepare( DECLARE EXTERNAL FUNCTION IMPORT_CSV_BLOBXXX
cstring(32000), cstring(496), cstring(8000), cstring(16000), blob, cstring(16), cstring(16), cstring(16)
RETURNS integer BY VALUE
ENTRY_POINT 'IMPORT_CSV_BLOB'
MODULE_NAME 'UDF_CSV' )
Message: isc_dsql_prepare failed

SQL Message : -204
Undefined name

Engine Code : 336397260
Engine Message :
unknown ISC error 336397260
Dynamic SQL Error
SQL error code = -204
Data type unknown
Implementation limit exceeded
COLUMN

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Karol,

The original issue of this case, as you have reported was a by-product restoring a v3.0 database to v2.5 and then trying to restore that v2.5 database to v3.0 -- which is not a supported operation. So, this case should be closed.

Your new issue with the UDF definition should be opened as a new case/issue. So, please open a case accordingly.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

Thanks Sean
I raport this as CORE4829

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant