Open cborges82 opened 1 year ago
Just a sanity check: do you really need it? Because those options can potentially corrupt your database if you use them incorrectly. They are only intended for one off use to correct issues with a database, if you're sure the database actually has that problem. If your database doesn't have the problem, or you specify the wrong character set, it will logically corrupt your database (by reinterpreting bytes of strings using the specified character set). Only use it if restoring with gbak returns an error and prompts you to use these options.
Also, isc_spb_res_fix_fss_metadata
and isc_spb_res_fix_fss_data
aren't bitmaps options, so they shouldn't be added to FbRestoreFlags
, they are Server Parameter Buffer options with a string value (the character set to use).
To expand: because isc_spb_res_fix_fss_metadata
and isc_spb_res_fix_fss_data
aren't bitmap option, you get the error, because they will enable options which are bitmap options:
isc_spb_res_fix_fss_data
= 13 (1101) and isc_spb_res_fix_fss_metadata
= 14 (1110), so using them as flags will enable other options. isc_spb_res_fix_fss_data
will enable options isc_spb_bkp_ignore_checksums
, isc_spb_bkp_metadata_only
, isc_spb_bkp_no_garbage_collect
, and isc_spb_res_fix_fss_metadata
enables options isc_spb_bkp_ignore_limbo
, isc_spb_bkp_metadata_only
, isc_spb_bkp_no_garbage_collect
.
Just a sanity check: do you really need it? Because those options can potentially corrupt your database if you use them incorrectly. They are only intended for one off use to correct issues with a database, if you're sure the database actually has that problem. If your database doesn't have the problem, or you specify the wrong character set, it will logically corrupt your database (by reinterpreting bytes of strings using the specified character set). Only use it if restoring with gbak returns an error and prompts you to use these options.
Also,
isc_spb_res_fix_fss_metadata
andisc_spb_res_fix_fss_data
aren't bitmaps options, so they shouldn't be added toFbRestoreFlags
, they are Server Parameter Buffer options with a string value (the character set to use).
Yes, I need. The convertion from 1.5 to 3.0 I need to inform that the DB will be on WIN1252.
Where should be included this kind of option?
Yes, I need. The convertion from 1.5 to 3.0 I need to inform that the DB will be on WIN1252.
Where should be included this kind of option?
Taking a quick look at the sources, I think you would need to add them (with Append2
) to the startSpb
in Execute
and ExecuteAsync
of FbRestore
and FbStreamingRestore
, with the appropriate value. .
This option will allow you to migrate your database from version 2.1 or earlier to version 2.5 or later of Firebird without the use of external tools or manual gbak operations.
I can't wait for them to be added.
I'm automating a migration from Firebird 2.5 to 3.0 using FbStreamingBackup and FbStreamingRestore and Embeded servers. However the isc_spb_res_fix_fss_data and isc_spb_res_fix_fss_metadata is not on FbRestoreFlags options.
I clone the repository and included:
But, when i run the process he show the follow error:
I think I need to change something on FbStreamingRestore.Execute() to include this parameters, but I don't know where.
Here the code: