Solution for gbak error

25 views
Skip to first unread message

Check_Mail

unread,
Aug 9, 2022, 8:39:28 AMAug 9
to firebird...@googlegroups.com

Hello again,

 

I’m already looking for a solution of my problem. Our customer is far away from our company and there is no option to connect to it from here. I have a database backup file from firebird 3.0 an I get during restore an error, invalid request BLR at offset 847, Input parameter mismatch for procedure P_AP_10. Therefore there are no triggers and procedures in the restored database file. In two weeks I should finished some extensions but I can’t see the stored procedures.

 

The ibbackupsurgeon provides not the best result, all procedures are without names and so on.

 

Can I restore the functions, without changing the original database file (far away)?

 

Thank you.

 

Tomasz Dubiel

unread,
Aug 9, 2022, 9:09:22 AMAug 9
to firebird-support
About ibbackupsurgeon  probably others would say more, but in such sittuations the most easy way to handle this is to recompile all stored procedures (at least one dependent from P_AP_10 needs correction, it wont compile, probably in the result of changing parameters) at the live database and to make gbk archive after that one more time.

Tomasz Tyrakowski

unread,
Aug 9, 2022, 9:23:59 AMAug 9
to firebird...@googlegroups.com
This happens when a stored procedure dependency changes causing
incompatibilty. In your case it seems there's a procedure (or a trigger,
or a check), which internally executes P_AP_10. Later on, the API (i.e.
parameter list) of P_AP_10 changed, but the procedure/trigger depending
on it hasn't been updated to comply with the new API of P_AP_10.
Upon gbak restore, the procedures are being re-compiled in the database
and this mismatch is detected, preventing the compilation of the
procedure/trigger depending on P_AP_10.
The only thing I can think of is to pass -NODBTRIGGERS and -NO_VALIDITY
parameters to gbak. If the procedure is used by a trigger or a check
condition (which is not a good practice, but who knows), it might help.
If there's another stored procedure, which depends on P_AP_10 and
contains an invalid invocation of it, I don't know any plausible solutions.
Perhaps some specialized gbk manipulation tools (like the surgeon you
tried) would be able to remove a particular procedure from the backup
file, but I don't know about such tool. The gbak output should tell you
which procedure compilation fails (add -V for more verbose output).
Apart from that, you should do your best to repair your customer's
database (find the procedure depending on P_AP_10, update its code and
alter it in the database), because as it is, all his gbak-made backups
are worthless, he won't be able to restore the database from them.

regards
Tomasz

Check_Mail

unread,
Aug 9, 2022, 9:36:42 AMAug 9
to firebird...@googlegroups.com
Hello Tomasz,

there is another procedure (for testing) which calls the p_ap_10. Now I had change the p_ap_10 and forget to change the test-procedure. All works fine on the customers side, but the restore fails.

With the -no_validity switch could it work?

Thank you.

-----Ursprüngliche Nachricht-----
Von: firebird...@googlegroups.com <firebird...@googlegroups.com> Im Auftrag von Tomasz Tyrakowski
Gesendet: Dienstag, 9. August 2022 15:24
An: firebird...@googlegroups.com
Betreff: Re: [firebird-support] Solution for gbak error
--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/7cb6e491-3c73-727d-8e7a-584089a1aff5%40sol-system.pl.

Check_Mail

unread,
Aug 9, 2022, 9:40:54 AMAug 9
to firebird...@googlegroups.com
..the same error

-----Ursprüngliche Nachricht-----
Von: firebird...@googlegroups.com <firebird...@googlegroups.com> Im Auftrag von Check_Mail
Gesendet: Dienstag, 9. August 2022 15:37
An: firebird...@googlegroups.com
Betreff: AW: [firebird-support] Solution for gbak error
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/000d01d8abf5%240e093010%242a1b9030%24%40satron.de.

Reply all
Reply to author
Forward
0 new messages