Search code examples
firebirddatabase-restorefirebird2.1

Firebird 2.1 invalid request BLR at offset 1839 on restore database?


I have a fairly large database. When I deleted the database using 'delete from table_name' command, the data was successfully deleted, but the size of the database remained large. After searching for various information, someone suggested that I have to backup the database with 'Gbak' and then restore it again. However, when I tried to restore the database, I encountered the following error message:

invalid request BLR at offset 1839.
Input parameter mismatch for procedure SIMPANJURNALPENJUALAN.
SQLCODE: -104
GDSCODE: 335544343

I have tried checking the related procedures and the procedures seem to be running fine. Do you have any recommendations for a solution to this issue?


Solution

  • The error message means that you have PSQL code (e.g. a trigger, or another procedure) which uses SIMPANJURNALPENJUALAN and the type of parameters used in its call was different than the actual definition of that stored procedure. This generally should not happen, and is an indication that a bug occurred when SIMPANJURNALPENJUALAN was altered (e.g. to change the type of its parameters), or that some manual modification was done through the system tables instead of using DDL.

    Given this error happened during restore, it is likely that you now have a database which did not finish restoring. I hope that you didn't overwrite your old database, and still have it.

    The way to analyse this is to check the dependencies of your stored procedure (i.e. the PSQL code calling your stored procedure), and try to recompile them in the original database, or otherwise fix and alter the relevant PSQL code before trying another backup and restore.

    As an aside, Firebird 2.1 has been end-of-life since December 2014. You shouldn't be using it any more. Several security related bugs have been fixed in newer version since the last Firebird 2.1 release (2.1.7).