Firebird 2.5 DB Conversion to Firebird 4

874 views
Skip to first unread message

Bennie Coetzer

unread,
Nov 8, 2021, 1:11:20 PM11/8/21
to firebird-support
I need to convert a FB 2.5 DB to FB4.  Can single delphi app connect to Firebird 2.5 and Firebird 4 simultaneously so that I can convert record by record.  I have tried some conversion tools but they failed on some large images.

Carlos H. Cantu

unread,
Nov 8, 2021, 2:39:36 PM11/8/21
to Bennie Coetzer
Is there any special reason to not just do backup in FB 2.5 and restore in FB 4?

Anyway, check my Migration Guide to Firebird 4, since it may help you in the process:
https://www.firebirdnews.org/migration-guide-to-firebird-4/

Carlos
www.firebirdnews.org - www.FireBase.com.br

Mark Rotteveel

unread,
Nov 8, 2021, 3:14:53 PM11/8/21
to firebird...@googlegroups.com
The normal way of converting a database is to create a backup with gbak
under Firebird 2.5 (using the gbak of Firebird 2.5), and restore under
Firebird 4.0 (using the gbak of Firebird 4.0).

If you want a more complicated solution, then yes, it is possible to
connect from one application to both Firebird 2.5 and Firebird 4.0. I'd
recommend using the Firebird 4.0 client library, and make sure to
connect through TCP/IP (and not WNET or XNET protocol).

Mark

Bennie Coetzer

unread,
Nov 13, 2021, 12:07:56 PM11/13/21
to firebird...@googlegroups.com
Thank you
I have purchased the guide but, as before, I tried to do the backup.  However I get the following message during backup.  The DB has large Blobfields (Images)
gbak: ERROR:Internal error when using clumplet API: attempt to store 270 bytes in a clumplet with maximum size 255 bytes

Any suggestions on how to proceed.?

--
You received this message because you are subscribed to a topic in the Google Groups "firebird-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebird-support/XITCV--y1i4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/1385259552.20211108163931%40warmboot.com.br.

Dimitry Sibiryakov

unread,
Nov 13, 2021, 12:11:46 PM11/13/21
to firebird...@googlegroups.com
Bennie Coetzer wrote 13.11.2021 18:07:
> I have purchased the guide but, as before, I tried to do the backup.  However I
> get the following message during backup.  The DB has large Blobfields (Images)
> gbak: ERROR:Internal error when using clumplet API: attempt to store 270 bytes
> in a clumplet with maximum size 255 bytes
>
> Any suggestions on how to proceed.?

Use server, client and gbak of version 2.5 to make the backup.

--
WBR, SD.

Mark Rotteveel

unread,
Nov 13, 2021, 1:25:00 PM11/13/21
to firebird...@googlegroups.com
On 2021-11-13 18:07, Bennie Coetzer wrote:
> Thank you
> I have purchased the guide but, as before, I tried to do the backup.
> However I get the following message during backup. The DB has large
> Blobfields (Images)
> gbak: ERROR:Internal error when using clumplet API: attempt to store
> 270 bytes in a clumplet with maximum size 255 bytes
>
> Any suggestions on how to proceed.?

Exactly how are you creating the backup? And are you using the Firebird
2.5 gbak to make the backup?

Mark

Bennie Coetzer

unread,
Nov 14, 2021, 1:56:21 PM11/14/21
to firebird...@googlegroups.com
I have used the gbak from V2.5

--
You received this message because you are subscribed to a topic in the Google Groups "firebird-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebird-support/XITCV--y1i4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebird-suppo...@googlegroups.com.

Bennie Coetzer

unread,
Nov 16, 2021, 4:33:00 AM11/16/21
to firebird-support
Hi, these are the commands I executed.  Will running GFix help - I do not understand the error message.

C:\WINDOWS\system32>cd C:\Program Files\Firebird\Firebird_2_5\bin

gbak -user sysdba -pas masterkey -b -v -g -se service_mgr D:\Data\Data_BC\ISWIMLEXE10_2021\IS_EXPERIMENTALBC\IS_DATABASE\Database_Remote\Species\Butterflies\Images\APATURINAE_IM.FDB D:\Data\Data_BC\ISWIMLEXE10_2021\IS_EXPERIMENTALBC\IS_Database_BUP\Database_Remote\Species\Butterflies\Images\APATURINAE_IM.FDB

gbak: ERROR:Internal error when using clumplet API: attempt to store 270 bytes in a clumplet with maximum size 255 bytes

Dmitry Yemanov

unread,
Nov 16, 2021, 4:40:53 AM11/16/21
to firebird...@googlegroups.com
16.11.2021 12:33, Bennie Coetzer wrote:
> Hi, these are the commands I executed.  Will running GFix help - I do
> not understand the error message.
>
> C:\WINDOWS\system32>cd C:\Program Files\Firebird\Firebird_2_5\bin
>
> gbak -user sysdba -pas masterkey -b -v -g -se service_mgr
> D:\Data\Data_BC\ISWIMLEXE10_2021\IS_EXPERIMENTALBC\IS_DATABASE\Database_Remote\Species\Butterflies\Images\APATURINAE_IM.FDB
> D:\Data\Data_BC\ISWIMLEXE10_2021\IS_EXPERIMENTALBC\IS_Database_BUP\Database_Remote\Species\Butterflies\Images\APATURINAE_IM.FDB
>
> gbak: ERROR:Internal error when using clumplet API: attempt to store 270
> bytes in a clumplet with maximum size 255 bytes

Use shorter locations for database and backup files. The whole command
line should fit into 255 symbols.

BTW, is the FDB extension intended for the backup file?


Dmitry

Mark Rotteveel

unread,
Nov 16, 2021, 5:39:59 AM11/16/21
to firebird...@googlegroups.com
That is an 'interesting' limitation. Why is that? Could this be changed
so either the limitation does not exist, or alternatively produces a
clearer error message for this case?

Mark

Tomasz Tyrakowski

unread,
Nov 16, 2021, 5:54:56 AM11/16/21
to firebird...@googlegroups.com
AFAIK it's a Windows command prompt limitation and has nothing to do
with Firebird. See
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd.

regards
Tomasz

Mark Rotteveel

unread,
Nov 16, 2021, 6:01:34 AM11/16/21
to firebird...@googlegroups.com
That is not the problem here because this is a Firebird error, and the
file paths shown are shorter that 260 characters (123 and 127
characters, respectively). The problem is that Firebired tries to fit
the command line into a buffer that is max 255 bytes long.

Mark

Tomasz Tyrakowski

unread,
Nov 16, 2021, 6:02:50 AM11/16/21
to firebird...@googlegroups.com
On 16.11.2021 at 11:54, Tomasz Tyrakowski wrote:
> > That is an 'interesting' limitation. Why is that? Could this be
> changed so either the limitation does not exist, or alternatively
> produces a clearer error message for this case?
> >
> > Mark
> >
>
> AFAIK it's a Windows command prompt limitation and has nothing to do
> with Firebird. See
> https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd.

Self correction: WinAPI limitation, not command prompt per se (although
it often manifests itself in command line, that's why it's associated
with cmd).

regards
Tomasz

Tomasz Tyrakowski

unread,
Nov 16, 2021, 6:04:28 AM11/16/21
to firebird...@googlegroups.com
On 16.11.2021 at 12:01, Mark Rotteveel wrote:
> That is not the problem here because this is a Firebird error, and the
> file paths shown are shorter that 260 characters (123 and 127
> characters, respectively). The problem is that Firebired tries to fit
> the command line into a buffer that is max 255 bytes long.
>
> Mark

OK, didn't count the characters in the paths. In that case my remark
about MAX_PATH is irrelevant here. Sorry.

Tomasz

Dimitry Sibiryakov

unread,
Nov 16, 2021, 6:07:28 AM11/16/21
to firebird...@googlegroups.com
Mark Rotteveel wrote 16.11.2021 12:01:
> The problem is that Firebired tries to fit the command line into a buffer that
> is max 255 bytes long.

Legacy code from times when services were handled by external utilities. It
is enough to remove "-se" switch to solve the error.

--
WBR, SD.

Bennie Coetzer

unread,
Nov 21, 2021, 5:50:26 AM11/21/21
to firebird-support
Thank you all - the path seems to have been the problem.  Maybe a more explanatory error message would have been useful to newbies like me.
Regards
Bennie

Reply all
Reply to author
Forward
0 new messages