Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index > Database Conversion

Database Integrity Routine

Scroll Prev Top Next More

Follow the steps below and to validate the integrity of your database.

 

1.Make a backup copy of the database.

 

2.Copy the entire database to your "local drive" in a separate folder with at least twice as much available free disk space.

 

3.Start R:BASE using the latest version/update and switch the current folder to the appropriate database folder on your local drive.

 

4.At the R>, connect to the database:

 

DISCONNECT

SET MESSAGES ON

SET ERROR MESSAGES ON

SET MULTI OFF

 

CONNECT dbname

or connect to the database with OWNER password, if any

CONNECT dbname IDENTIFIED BY owner password

 

5.Check the connected database CHARacter settings, especially the IDQUOTES. At the R> prompt:

 

CLS

SHOW CHAR

 

Notice the setting for IDQUOTES (the last item on list).

 

If this setting is blank/null, make sure to set the IDQUOTES settings to ` (that is a single reversed quote, on the same key as the ~ tilde). At the R>, type:

 

SET IDQUOTES=`

 

6.Now create the unload file with NULL set to -0-. At the R> prompt:

 

CLS

SET NULL -0-

OUTPUT newdb.ALL

UNLOAD ALL

OUTPUT SCREEN

 

This step will create two files (newdb.ALL and newdb.LOB)

 

7.DISCONNECT, and then rename this database to some other name. At the R> prompt:

 

DISCONNECT

 

RENAME dbname.RX? dbnameBK.RX?

or for RB1 through RB4 files, use:

RENAME dbname.RB? dbnameBK.RB?

 

8.Now, let's rebuild the fresh database and see if it passes the integrity check. At the R> prompt:

 

CLS

RUN newdb.ALL

 

Watch the activity and all messages on the screen. Don't fall asleep. You might miss an important warning. Completion time may vary based on size of the database (number of tables/records/indexes)

 

If there were no warnings or error messages, you've got a fresh/healthy database.  

 

Errors?

 

1.If there are any warning or -ERROR- message(s), take them seriously. In that case, disconnect and delete the bad database (built using RUN newdb.ALL). At the R> prompt:

 

DISCONNECT

 

DELETE dbname.RX?

or for RB1 through RB4 files, use:

DELETE dbname.RB?

 

DELETE newdb.ALL

DELETE newdb.LOB

 

2.Rename and connect to the previously saved database (Step 7).

 

RENAME dbnameBK.RX? dbname.RX?

or for RB1 through RB4 files, use:

RENAME dbname.RB? dbnameBK.RB?

 

CONNECT dbname

 

3.CORRECT all -ERROR-s accordingly and then repeat Step 6.

 

4.Do not quit or give up until you see a completely fresh database without any warnings or errors.

 

If there is a considerable amount of errors with both rebuilding the structure and/or data, please refer to the "Database Repair Routine" within the Database Maintenance PDF document in the R:BASE program directory.