Closed Biduzeira closed 2 weeks ago
What is gbak command line ? Could you try with ParallelWorkers = 1 (or using explicit switch -PAR 1 ) ?
gbak command line that I used and the error does not occur:
gbak -rep -k -z -v -ST TDRW -user SYSDBA -pass XXXXX "C:\adm\teste5.fbk" "127.0.0.1/3041:c:\adm\wesley5.fdb"
so, i also tried forcing fbsvcmgr to use 1 parallel worker (res_parallel_workers 1) and i got NO ERRORS. fbsvcmgr.exe 127.0.0.1/3041:service_mgr -user SYSDBA -password XXXXX action_restore dbname "c:\adm\wesley5.fdb" bkp_file "C:\adm\teste5.fbk" verbose res_no_shadow res_stat TDRW res_replace res_parallel_workers 1
and i did a reverse test, i forced gbak to use more than 1 parallel worker (-PAR 16) AND THE ERROR HAPPENED :
gbak -rep -k -z -v -ST TDRW -user SYSDBA -pass XXXXX "C:\adm\teste5.fbk" "127.0.0.1/3041:c:\adm\wesley5.fdb" -PAR 16
Could you provide me with this backup for investigation ?
Yes, but it's a customer database. Can you give me an email so I can send you a download link? I will prepare the file for you.
hvlad at users sf net Thanks!
I just sent it to you, then confirm if you received it and were able to download it please
Downloaded, thanks.
Should be fixed now, check next snapshot build, please
Thank you very much for your attention! I will test.
It is fixed, I believe. If something goes wrong, we could re-open ticket.
yes it was fixed, apologies for the delay
I'm having problems restoring a db using fbsvcmgr. --> When done via gbak the problem does not occur <--.
Here are the details:
Firebird-5.0.0.1306 and 5.0.1.1387 (last snapshot) - x86 - Superserver
Original DB ODS version: 13.1
Windows 11 x64
Firebird.conf: DataTypeCompatibility = 3.0 MaxParallelWorkers = 16 ParallelWorkers = 16 RemoteServicePort = 3041 IpcName = FIREBIRD5 RemotePipeName = pipefb5
-firebird.log: no record.
Command line: fbsvcmgr.exe 127.0.0.1/3041:service_mgr -user SYSDBA -password XXXXX action_restore dbname “c:\adm\wesley5.fdb” bkp_file “C:\adm\teste5.fbk” verbose res_no_shadow res_stat TDRW
restore log (I removed parts I thought unnecessary with ****):
c:\ADM\Firebird5>fbsvcmgr.exe 127.0.0.1/3041:service_mgr -user SYSDBA -password XXXXX action_restore dbname "c:\adm\wesley5.fdb" bkp_file "C:\adm\teste5.fbk" verbose res_no_shadow res_stat TDRW gbak: time delta reads writes gbak: 0.000 0.000 0 0 opened file C:\adm\teste5.fbk gbak: 0.001 0.000 0 0 use up to 16 parallel workers gbak: 0.001 0.000 0 0 transportable backup -- data in XDR format gbak: 0.001 0.000 0 0 backup file is compressed gbak: 0.001 0.000 0 0 backup version is 11 gbak: 0.051 0.049 0 789 created database c:\adm\wesley5.fdb, page_size 8192 bytes gbak: 0.056 0.005 0 2 started transaction gbak: 0.057 0.000 0 0 restoring domain T_ANO gbak: 0.057 0.000 0 0 restoring domain T_CPF_CNPJ
structure of the original database: img1 and img2 below
After the restore, I accessed the restored database and checked the COM_PEDIDO table and did the select “SELECT FROM COM_PEDIDO WHERE ID_PEDIDO = 113798” and it returned EMPTY, then I did another search without using the PK_COM_PEDIDO index “SELECT FROM COM_PEDIDO WHERE ID_PEDIDO = 113798 PLAN (COM_PEDIDO NATURAL)” and it returned 1 record!
I recreated the database using gbak (because the problem doesn't occur), made a new backup to try a new restore via fbsvcmgr and the error persists, except that the error changed the value of the key “Problematic key value is (”ORDER_ID“ = 113774)”.
In other words, there seems to be a problem with the creation of the PK_COM_PEDIDO primary key index when recreating via fbsvcmgr. I found this strange because it works normally in GBAK.
I tried to extract the minimum information from the tables and objects involved to create a script to simulate it, but the error didn't occur.
if you need any more information, I'm happy to help. thanks.