#FAQ: 10130-EN, Date: 05/22/2009

When I'm using NewWayService 4, I receive read or write errors or errors indicating that the database is corrupt.


The information in this article applies to :
NewWayService 4.x (English)
NewWayService 4.x (French)


Description
Error messages examples:
- "I/O error for file ..."
- "Error while trying to read from file ..."
- "Database file appears corrupt"
- "Database corrupted"


When using NewWayService 4, it could happend in rare cases that the database become corrupted in such events:

- The Firebird database server did not stop correctly, for example, following a problem with the server where the database is located.

- Write errors on the hard drive by the operating system.

- Hardware failures.


Solution
If NewWayService 4 database becomes corrupted or damaged, here are the steps to follow to fix it. For more detailled information about correcting Firebird database errors, refer to the Firebird documentation.

If Firebird is installed on a LINUX server, you need to have the Super Server version of Firebird installed on your LINUX server to be able to use the Database utility mentionned in the procedure below. If you have the Classic Server version of Firebird installed on your LINUX server, refer to the Firebird documentation to use the gfix and gbak command line utilities instead of the Database utility.

Before beginning, be sure that nobody is accessing the damaged database or are using NewWayService 4.

It is strongly recommended to make a copy of the NewWayService 4 database file (usually named nws.fdb) before trying to repair it.


1- Run the Database utility included with NewWayService 4. From the Windows Start button, select Programs | NewWayService 4 | Database utility.

2- Select the Validation tab.

4- Click on the top right button (button on the right side of the Mode multi-user radio button) to display the list of connections.

5- Select the connection to the database you want to repair and click the OK buton.

5- Type the password of the SYSDBA Firebird user into the Password field. (If you did not changed the password of the Firebird SYSDBA user, the default password is masterkey in lowercase).

6- Check the following 3 options:

Validate record fragments
Mark corrupt records
Ignore checksums errors

Do not check any other options.

7- Click the Start validation button and answer Yes to the confirmation.

8- After the validation process is finished, you should get the Validation completed message. Click the OK button. A summary of the validation process is displayed on screen and can have the following format:

Summary of validation errors

Number of data page errors : 1
Number of database page errors : 2



Close this window by clicking the X button at the top right.

9- To complete the database repair process, a backup and a restore of the database must be done.

10- Select the Backup tab.

11- Click on the top right button (button on the right side of the Mode multi-user radio button) to display the list of connections.

12- Select the connection to the database you repaired and click the OK button.

13- Type the password of the SYSDBA Firebird user into the Password field. (If you did not changed the password of the Firebird SYSDBA user, the default password is masterkey in lowercase).

14- Check the following 3 options:

Ignore checksums
Ignore transactions in limbo
Disable garbage collection

Do not check any other option.

15- Click the Start Backup button and answer Yes to the confirmation.

16- When the backup process is finished, the Backup successfully completed message is displayed. Click the OK button.

17- Select the Restore tab.

18- Click on the top right button (button on the right side of the Mode multi-user radio button) to display the list of connections.

19- Select the connection to the database you repaired and click the OK buton.

20- Type the password of the SYSDBA Firebird user into the Password field. (If you did not changed the password of the Firebird SYSDBA user, the default password is masterkey in lowercase).

21- Do not check any option.

22- Click the Start Restore button and answer Yes to the confirmation.

23- When the restore process is finished, the Restore successfully completed message is displayed. Click the OK button.

24- Quit the Database utility.

25- The database is now repaired. You can run back NewWayService 4.


Status
Information

See also FAQ 10131-EN



© 1996-2012 OroLogic Inc.