Search code examples
c#firebirddatabase-backupsfirebird-3.0firebird-.net-provider

How to inspect nbak state of a Firebird database


Is there a way in C# to inspect the nbak state of a Firebird database?

The state in the database header would be set to nbak_state_diff or nbak_state_normal. But how do I actually read this value?


Solution

  • Select MON$BACKUP_STATE From MON$DATABASE
    

    Quote from https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref-appx05-mondb.html

    Current physical backup (nBackup) state:
    0 - normal
    1 - stalled
    2 - merge

    Also see c:\Program Files\Firebird\Firebird_3_0\doc\README.monitoring_tables.txt

    P.S. for C#-related questions it is often faster to ask in a dedicated Google forum, see http://stackoverflow.com/tags/firebird-.net-provider/info