Skip to content

How to Fix and Protect Audit Master Data from Corruption

Release Date: 08/12/2021
Version: 7.x & Up

In this article, we are going to talk about two issues related to Audit Master database corruption:
  1. How to fix the audit master data when it becomes corrupted
  2. How to prevent audit master data from becoming corrupted in the future
We have noticed that if a user reboots the PSQL server for reasons like a Windows Service Pack update or software installation, then it is possible that the PSQL Audit Master database, if installed, may get corrupted. This can be confirmed by looking at the PVSW.log on the PSQL database engine server.  Users can bring up PSQL Control Center and choose "Help" -> "PVSW.Log."  The following is a sample PVSW.Log:

The entry on 7/25/2021 12:04:00AM shows the AMLOG file of Audit Master is corrupted with an error code  like 110.*...  The timing coincides with the Windows SP update and the reboot of that server that night. Windows SP updates do not always cause Audit Master data to be corrupted. On the other hand, this corruption issue has been observed multiple times with this particular site and coincides with a Windows SP update.

This problem is especially applicable for those who have 24x7 presence on the internet where their PSQL database is being updated all the time, and for those who have heavy PSQL database usage where shutting down PSQL services takes time.

How to Fix a Corrupted Audit Master Database
To fix the problem, we need to initialize the AMLOG and AMVIEW files. This requires shutting down of the PSQL server, which is inconvenient for those who need PSQL running 24x7. After you shut down the PSQL server, the production AMLOG and AMVIEW files are in C:\Program Files (x86)\Actian\PSQL\Audit\DATA, and the empty files are in C:\Program Files (x86)\Actian\PSQL\Audit\Empty. It is suggested that you swap both AMLOG and AMVIEW if either the AMLOG or AMVIEW file is corrupted. You will lose the current view of Audit Master data. All your history archive data will still be intact.

Shut Down PSQL Services Before Rebooting PSQL Server
To prevent the Audit Master database  from corruption, the proper way to reboot the PSQL database server is to add a step before the server is about to reboot and shut down the PSQL services -- both the Relational and Transaction Engine first, before rebooting the database server.  If  you have a web services server, shut that down down before you shut down PSQL services. 

Shutting down PSQL services will shield the Audit Master database from corruption. After the reboot, PSQL services will be started automatically and the user does not need to do anything.  See sample screen below for the two PSQL services to be shut down before rebooting the server:


Feedback and Knowledge Base