How do I Diagnose the Unify Database in Unix?

Export to PDF | Export to DOC

Usually the Unify Database is in the /usr/unify directory and the datafiles are in another location.

Locate the location of the existing Database. From / run find . -nname “*.db” -print

Set all of the environment variables. Ensure DBPATH is set to the path of the directory with the database .db file.

Backup the .db database file to another location.

run /usr/unify/unsup/dbcheck -dev > /tmp/dbck.tmp.

Review the last entry for blkofst= in the “Segment Information” at the top of the /tmp/dbck.tmp also ensure their are not any entries begining with “ERROR”.

If 512 * the offset size is larger than the size of the .db file then there is data loss and a series of binalry zeros needs to be appended to the end of the .db file.

To append binary zeros to the file use this script. In this script it is assumed the datase offset * 512 is 20MB larger than the file so 20MB is needed at the end of the Database:

  1. count=0
  2. while [ $count -lt 20000000 ]
  3. do
  4. echo -n ‘\000’ >> /tmp/file
  5. count=`expr $count + 1`
  6. done

Then append the file by cat file.0 >> file.db where file.db is the database name.

Now run /usr/unify/unsup/dbcheck -dFv > /tmp/dbck1.tmp to force a fix if the database size was off and Step 4 did not fix corrupted data.

Now run in the following order (Usually called from mainmenu in the Application –> System Administration –> Database.):

  1. A Hash Table rebuild
  2. A Repoint (Redirect)
  3. Index b-tree rebuild (IDXMNT)

If the data is still corrupt then run /usr/unify/unsup/dbcheck -dFcv > /tmp/dbck.tmp

Run /usr/unify/unsup/dbcheck -dev > /tmp/dbck.tmp and verify the /tmp/dbck.tmp does not contain any ERROR entries.

Now run in the following order (Usually called from mainmenu in the Application –> System Administration –> Database.):

  1. A Hash Table rebuild
  2. A Repoint (Redirect)
  3. Index b-tree rebuild (IDXMNT)

 

Leave a Reply

Your email address will not be published. Required fields are marked *