DB Corruption repair

Discussion in 'Backup & Disaster Recovery' started by Anonymous, Nov 16, 2006.

  1. Lewis

    Lewis New Member

    Do I just put the command line into Windows Command Prompt under Accessories?

    One more thing, someone told me that since firebird is based on SQL, it is OK to just use the Windows copy & paste function to back up the database. Of course I haven't try that.

    What I have tried is using Windows Backup under Accessories-System Tool-Backup to:

    1. backup the database, then 2. move the original database to somewhere else, & then 3. restoring the database from backup file. IT DID WORK! Also when I deleted the restored backup file & moved back the previously moved original database file, it looks still OK.

    Any comment especially concerning database corruption issue?

  2. Graham

    Graham Developer Staff Member

    >Do I just put the command line into Windows Command Prompt under Accessories?

    Yes, if that is where the command prompt is.

    >One more thing, someone told me that since firebird is based on SQL,
    it is OK to just use the Windows copy & paste function to back up
    the database. Of course I haven't try that.

    Completely wrong. That will only work if there are no Firebird process accessing the database. If there is, you will likely corrupt the database.

    SQL is an Ansi standard for a computer language. It has no relevance to operating system functions.


    >What I have tried is using Windows Backup under Accessories-System Tool-Backup to:

    >1.
    backup the database, then 2. move the original database to somewhere
    else, & then 3. restoring the database from backup file. IT DID
    WORK! Also when I deleted the restored backup file & moved >back the
    previously moved original database file, it looks still OK.

    I don't think this is really safe either. Unless Firebird is shut down. Windows backup needs to do a shadow backup if this is to work while live. Furthermore these tools do not report on the internal consistency of the database.

    You can only use gbak to backup an open firebird database. Fibs also uses Gbak. It just wraps a gui around it.


    Have you actually had any issues with database corruption?
  3. Lewis

    Lewis New Member

    Sorry to admit that I still can't perform backup or restore using gbak as I got error message for whatever the commands I typed into Windows Command Prompt.

    I can now perform backup using FIBS, but the problem remains as to how to restore from the backup in case such a need arises.

    I have just learned a quick backup method for Windows XP system from IBPhoenix Knowledgebase:

    1. Shut down fb server manually: open Control Panel\Administrative Tools\Services, scroll down to Firebird Server & select it, then click stop to shutdown the server.

    2. Perform an operating-system-level (OS-level) backup using the Windows Backup function under Start\All Programs\Accessories\System Tools\Backup.

    3. Restart fb server manually after completing OS-level backup: open Control Panel\Administrative Tools\Services, scroll down to Firebird Server & select it, then click start to restart the server.

    In performing an OS-level backup with the fb server shut down, restoring the backup file is easy for an "amateur" like me; to restore backup, just shut down the fb server again, restore the backup using the Windows Backup function under Start\All Programs\Accessories\System Tools\Backup, then restart the fb server. That's it, RIGHT?

    I am sure that I shut down the fb server correctly as I received the following message when I tried to start Synapse EMR Express Server with the fb server shut dwon:[​IMG]This screen has appeared as we can not open a connection to the database...........................................................
  4. Graham

    Graham Developer Staff Member

    Yes, that would work ...

    I normally use IBOConsole to do restores rather than using the command line as it saves me typing the commands


    http://www.mengoni.it/Downloads/

  5. Lewis

    Lewis New Member

    I installed IBOConsole & tried to register the firebird server by choosing the Local Server option & typing in the User Name & Password. However, I received an error message saying that "Client library fbclient.dll not found in the path. Please install it to use this functionality".

    What's wrong? I can actually find fbclient.dll within the folder "C:\Program Files\firebird\firebird_1_5\bin".

    FYI, both my Synapse EMR server & client are installed & run within the same computer running Windows XP Pro.
  6. Graham

    Graham Developer Staff Member

    IBOConsole from memory doesn't need to be installed. I think it just runs from whatever directory it is placed in.

    Since Firebird is not generally in the path, you can either add it, or just copy the fbclient.dll to the same directory where IBOConsole resides.

    You might also want to consider upgrading to Firebird 2.0.x ...

  7. Lewis

    Lewis New Member

    I followed your advice & I have registered & logged into both the server & the database. Wow! There are so many things I can do to the database using IBOConsole, including database backup & restore[Y]; much much simpler than the gbak commands[:)].

    In order to upgrade to Firebird 2.0.x, what should be the proper steps to be taken? Do I just download it & install it over the existing Firebird 1.5 version? Will it affect Synapse EMR server & client functionality? Do I need to shut down the server before installation? Any significant benefit in upgrading?
  8. Graham

    Graham Developer Staff Member

    Yes, shut down the server.

    I think the installation should uninstall the original Firebird installation. You also need to install the latest ODBC driver.

    FB 2 has differential backups, and the ODBC driver has better support for float values which the latest Synapse server uses.

  9. Lewis

    Lewis New Member

    Which one should I install first, Firebird or ODBC driver?

    Regarding the ODBC driver, should I download &amp; install <h1>Firebird ODBC/JDBC Drivers version 2 Beta?
    </h1>

  10. Graham

    Graham Developer Staff Member

    Firebird 2 and then the latest stable odbc driver.

  11. Lewis

    Lewis New Member

    May I know whether IBOConsole can backup or restore firebird database while the server is running?
  12. Lewis

    Lewis New Member

    When I tried installing Firebird 2.1.xxx, I was informed that preinstallation analysis indicates that 1 existing firebird version has been found, &amp; that if I continue with the installation Firebird will be installed but not configured. I will also need to complete the installation manually.


    Should I just continue with the installation? Do I need to perform any manual configuration after installation?
  13. Graham

    Graham Developer Staff Member

    No. You must always shut down a server before restoring it. That way is a sure way of causing corruption. But you can always backup while the server is running.
  14. Graham

    Graham Developer Staff Member

    Hmm. Perhaps uninstall Firebird first then.

Share This Page