#FAQ: 10027-EN, Date: 7/9/2001

How to validate and repair the GDS 2000 PRO database with the command line utilities "gbak" and "gfix" instead of the "IBConsole" utility.


The information in this article applies to :
GDS 2000 PRO (English)
GDS 2000 PRO (French)


Description
This procedure explains how to validate and repair the GDS 2000 PRO database when this one could not be repaired with the "IBConsole" utility (See FAQ 10019-EN).

For more information on the INTERBASE command line utilities refer to the "Operations Guide" manual in the INTERBASE documentation (downloadable separately from the web site of INTERBASE at http://www.borland.com/interbase ).

WARNING: Assistance of a qualified technician is strongly recommended to use the INTRBASE "gbak" and "gfix" utilities.


Solution
1- Logon to the server where INTERBASE is installed on. If the server is a Windows server, open an "MS-DOS" session. If the server is a Unix/Linux server, open a command shell session.

2- Define the following two variables (By doing this, you do not have to type in the user name and password every time you issue a command).

    SET  ISC_USER=SYSDBA
    SET  ISC_PASSWORD=masterkey

(If you have changed the password for the "SYSDBA" INTERBASE user, affect this new password to the ISC_PASSWORD variable instead of "masterkey")

3- Go to the folder where the INTERBASE command line utilities are located. Usually these utilities are in the "C:\Program Files\OroLogic\GDSPRO\Interbase\Bin" folder under Windows and in the "/opt/interbase/bin" folder under Unix/Linux.

4- Be sure nobody is using GDS 2000 PRO while you try to repair the database else the operation will fail.

5- It is strongly recommended to make a copy of the GDS 2000 PRO database file (usually "GDS2000P.GDB") before trying to repair it. Use the operating system to make a copy of the database (Under Windows use "Windows Explorer" or the "copy" command. Under Unix/Linux use the "cp" command). By doing this, you ensure to have a copy of your database before any modification of this one.

6- Type the following command line to check for database corruption:

    gfix -v -full gds2000p.gdb

(Replace gds2000p.gdb by the full path to the GDS 2000 PRO database. For example, under Windows, if the full path to the database is "C:\Program Files\OroLogic\GDSPRO\GDS2000P.GDB" type:

    gfix -v -full "C:\Program Files\OroLogic\GDSPRO\GDS2000P.GDB"

Under Unix/Linux, if the full path to the database is "/home/gds/gds2000p.gdb", type:

    gfix -v -full /home/gds/gds2000p.gdb

Note: Use quotation marks only under Windows and only if the database path contains spaces.

7- The previous command should indicate thay the database contains errors. To repair these errors type the following command:

    gfix -mend -full -ignore gds2000p.gdb

(Replace gds2000p.gdb by the full path to the GDS 2000 PRO database)

8- Now check to see if the corruption has been repaired by typing the following command:

    gfix -v -full gds2000p.gdb

(Replace gds2000p.gdb by the full path to the GDS 2000 PRO database)

9- If you still see errors, you should now do a full backup and restore with the "gbak" utility.

Type the following command to make a backup of the GDS 2000 PRO database.

    gbak -backup -v -ignore gds2000p.gdb gds2000p.gbk

(Replace gds2000p.gdb by the full path to the GDS 2000 PRO database. Replace also gds2000p.gbk by the full path to the GDS 2000 PRO database but be sure to keep the "gbk" extension.)

However if gbak falls over because it is having trouble with garbage collection, then use the following command:

    gbak -backup -v -ignore -garbage gds2000p.gdb gds2000p.gbk

If there is corruption in record versions of a limbo transaction, then you may need to include the -limbo switch:

    gbak -backup -v -ignore -garbage -limbo gds2000p.gdb gds2000p.gbk

10- Now restore the GDS 2000 PRO database by typing the following command:

    gbak -replace -v gds2000p.gbk gds2000p.gdb

(Replace gds2000p.gdb by the full path to the GDS 2000 PRO database. Replace also gds2000p.gbk by the full path to the GDS 2000 PRO database but be sure to keep the "gbk" extension.)

11- The restore is now completed. Verify that the database has been fixed by typing the command mentioned at step 6. The "gfix" utility should not indicate any errors.

12- Now you can run GDS 2000 PRO.


Status
OK

See also FAQ 10019-EN



© 1996-2008 OroLogic Inc.