Welcome to SynapseDirect Sign in | Join | Help
in Search

SynapseDirect

DB Corruption repair

Last post 05-03-2008, 7:52 PM by Graham. 33 replies.
Page 1 of 3 (34 items)   1 2 3 Next >
Sort Posts: Previous Next
  •  11-16-2006, 8:02 PM 1420

    DB Corruption repair

    As with any database, it is a fact that can corruption can occur. In this eventuality what tools are available to repair corrupted databases?

    What is the typical sequence for recovery. ie: recover from backup, attempt to repair db etc.
     

    Filed under:
  •  11-16-2006, 9:31 PM 1421 in reply to 1420

    Re: DB Corruption repair

    Database corruption occurs due to hardware faults, or improper server installation.  It is strongly advised that servers must be installed onto dedicated PCs for serving, and ideally using a server OS eg. Windows 2000 server, or Windows 2003 server.  Anything else is second best.

    In the event that database corruption has occurred, your best bet is to restore from a backup.

    Failing the availability of a recent backup, then you may follow the steps here.  Although it refers to Interbase, it also applies to Firebird.

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  11-16-2006, 9:35 PM 1422 in reply to 1421

    Re: DB Corruption repair

    And here is an article on some common ways to cause corruption!

    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  11-22-2006, 10:08 PM 1457 in reply to 1420

    Re: DB Corruption repair

    I've used Firebird SQL with Synapse since March 2006.  I've had absolutely no database problems at all.  This includes many crashes of Synapse while playing with alpha releases etc.  Firebird is easy to maintain and darn near close to zero administration.  I do hourly backups, but have never needed to use them.

    And I guess the good (or bad, for me) news is that I violate all of Graham's suggestions.

    (1) I use a Windows XP box to host the Firebird Database.

    (2) The computer was cheap, not overly high-powered.

    (3) I often (mostly) use Synapse right from the "server" computer !

    (4) I often run tonnes of other apps on the "server" computer as well.

     

    Admittedly I am going to migrate to an apparently more robust system, more along the lines of Graham's suggestions.

    This is just a real life testimony that despite not following the most robust guidelines, Firebird has been rock solid.

     



    Developer
  •  11-22-2006, 10:55 PM 1461 in reply to 1457

    Re: DB Corruption repair

    Jason:

    (3) I often (mostly) use Synapse right from the "server" computer !

    (4) I often run tonnes of other apps on the "server" computer as well.

    Very naughty... you're asking for trouble.  You should always minimize the circumstances in which corruption can occur.

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  01-15-2007, 1:27 PM 2162 in reply to 1461

    Re: DB Corruption repair

    I was forced to do a clinic out of town where there was no access to the internet.  So, I copied my database to my laptop and did the clinic that way running the server locally. 

    Back home I copied the database to a USB hard drive and then back onto the server.

    Start up Synapse EMR - no go.  It asked to setup a new connection.

    I then went to the ODBC control panel to test my connection on the server and it reported that the database was damaged Sad

    No problem ... copied it from my laptop again to the USB hard drive, and then back again on to the server.  Worked fine after that. 


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  01-29-2007, 8:07 PM 2561 in reply to 2162

    Re: DB Corruption repair

    You can do that if you are the only one accessing the database.  If your main office staff still have to work on the database or if you have another physician usng the database, you won't be able to do it this way.


    Contributing
  •  10-13-2007, 9:27 AM 4356 in reply to 1421

    Re: DB Corruption repair

    I am serious about safeguading patients' database.
    However, as far as reasonably possible, I would like to minimize cost also.
    Hope you can explain to me in clearer terms why is it not recommended for Synapse Server & Client to run from the same PC. You mentioned that anything else is second best. How good is "second best" & whether "second best" is an acceptable risk level?
    If I dedicate a PC to become the server, would any PC running Windows XP Pro be sufficient?
    How to find out whether DB corruption has occured?
  •  10-13-2007, 12:30 PM 4357 in reply to 4356

    Re: DB Corruption repair

    If you run the synapse server from your PC, then there is a risk that any of the programs on your PC can crash windows and that might interrupt a database write which then corrupts the database tables.  Programs that do that also includes spyware and viruses.  It happens.  But it is much less likely to happen on a PC which no one else is using.

    When I used another database program - not Firebird, on my laptop, it was a regular occurrence to get database corruption which is why I wrote Synapse as n-tier architecture, or client server, to prevent this happening. 

    To check for db corruption, you should do daily database backup with the Firebird backup tool and this also can check for corruption.

    XP Pro, XP Home ... both can be used if you're a single physician. I'd recommend 2Ghz P4 or faster with 512Mb of ram minimum.

    If you really want to run Synapse-server on the same PC, then I'd at least suggest you run it from a virtual PC to protect it from viruses/spyware. 


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  10-13-2007, 6:53 PM 4359 in reply to 4357

    Re: DB Corruption repair

    Graham,
    Where is the database located as you mentioned you can copy the database to your laptop?
    Although I have installed Synapse Client & Synapse Server onto my single PC & started trying to familiarize myself with it, I have absolutely no idea at all as to where is my patient's data (consultation records etc) being stored to (which drive/directory/folder/file extension etc). I am very concerned/scared of relying on EMR & go paperless if I do not know what an EMR program/software is doing for/to meHmm.
    Does Firebird comes preinstalled with Synapse Client/Server? I asked this because when I tried to install Firebird 2.0.3 I was informed that 1 existing Firebird or Interbase version has been found. And I did find Firebird 1.5.3 in my program folders.
    May I know where is the Firebird Backup Tool located, within the Synapse Client?
  •  10-13-2007, 7:10 PM 4360 in reply to 4359

    Re: DB Corruption repair

    Lewis:
    Graham,
    Where is the database located as you mentioned you can copy the database to your laptop?
     
    the database that stores all your data is called remr.fdb
    but all the scans and other files generated ( such as pdfs ) are stored in the cache-listener directory. 
     
     

    Does Firebird comes preinstalled with Synapse Client/Server? I asked this because when I tried to install Firebird 2.0.3 I was informed that 1 existing Firebird or Interbase version has been found. And I did find Firebird 1.5.3 in my program folders.
    May I know where is the Firebird Backup Tool located, within the Synapse Client?

    Firebird was installed when you installed the synapse-server using the installation program.

    The firebird backup tool is a command line tool named gbak.exe

    You can not use the DOS or Windows "copy" program safely to copy the remr.fdb file. 


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  10-13-2007, 8:27 PM 4365 in reply to 4360

    Re: DB Corruption repair

    What is a command line tool & how can I get gbak.exe running to do backup using firebird backup tool?
    What can I used safely to copy remr.fdb file?
  •  10-13-2007, 9:06 PM 4366 in reply to 4365

    Database maintenance

    All you need know about gbak http://www.destructor.de/firebird/gbak.htm

    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  10-16-2007, 3:21 PM 4404 in reply to 4366

    Re: Database maintenance

    I have something 6,000 copies of my REMR.fdb  :)

    I just keeps making backups.  I've never had a problem, so maybe I should reduce the frequency of the backing up :)

     



    Developer
  •  10-16-2007, 5:35 PM 4406 in reply to 4404

    Re: Database maintenance

    I think that's overkill!  are you making hourly backups with Fibs??

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
Page 1 of 3 (34 items)   1 2 3 Next >
View as RSS news feed in XML
Try-out the Click to try-out Synapse EMR Express Edition Free Synapse EMR Express Edition Click to try-out Synapse EMR Express Edition · ©2006 SynapseDirect · Terms and Conditions · Privacy Policy · help us keep Synapse EMR Express free for all Doctors

managing your electronic medical records · Unique Visits Dell Computer