Subject Re: [firebird-support] Re: gbak Out of Memory
Author Helen Borrie
At 05:50 AM 28/02/2010, you wrote:
>Thank you for your answer Helen.
>Yes you right, housekeeping is set to 0, but the the daily sweep was turned off by the customer.
>I tried to do a sweep but get I it fails because out of memory
>gbak - b- g also fails because of the same reason, unable to allocate memory. Fbserver starts to consume memory, and after a while it fails.
>Somehow I'm not able to backup/restore the database. Do you think the database is corrupt?

It seems likely that *your copy* is corrupt, probably caused by your earlier attempt to perform gfix -mend without doing the preceding validation steps. It is also possible that you had a "bad" copy originally because the database file was copied while the database was on-line.

>Any other idea to test?

Well, can we assume the obvious....that you have checked that you have enough resources available on your machine? (RAM, swap memory, hard disk space available for allocating new pages, temp space available for TempDirectories, etc.)?

I think you need to get a fresh copy of the original database file from your customer, taken when the database is certainly off-line. That is because, from what you have said already, there is a good chance you corrupted your original copy, or started with a corrupt copy. If you are trying to get this copy remotely then I would highly recommend that you get your customer to shut down Firebird first. Better still, ask the customer to shut down both the database and the FB server and make the copy for you, on site.

Then, when you have a *true* copy on your own machine, make another copy locally to work with and *store the fresh copy safely* somewhere. Then, each time you try something different, begin again with a new copy of the "safe" copy.

Do the steps in the right order, as described in the Analyse and Repair procedure.

If that doesn't work out, then download the free IBFirstAid Diagnostician tool from Work with *another fresh copy* of the database. Doing things in the right order is essential for this tool, as well, so READ THE DOC. The free version of this tool does not repair a database - it is for diagnosis only.