Subject Encounter "invalid request BLR at offset %d" when running gbak while other changing database's meta data


I start two connections to a firebird 2.5.3 x64 server running the following actions:

Connection1: Keep running "CREATE GLOBAL TEMPORARY" and "DROP TABLE" on a database for 5 minutes

Connection2: Run GBAK to backup the database

In connection 2, I encounter this error regularly when running GBAK:

gbak: ERROR:invalid request BLR at offset 51

gbak: ERROR:    table id 16809 is not defined

gbak: ERROR:gds_$compile_request failed

gbak:Exiting before completion due to errors

As learned from other's experience, I knew it is not encourage to backup database while others trying to change the metadata of database.

Is there a way to detect either:

  1. Prior to GBAK, detech is someone is changing meta data OR
  2. Prior to changing meta data, is someone running GBAK on the database
Best Regards,
Chee-Yang Chau