Environment
Privileged User Manager
Situation
Incremental vacuum of the strfwd database is failing
Errors seen in the unifid.log
Error, Db strfwd.ldb - SQL Statement, PRAGMA incremental_vacuum(1000)
Error, Db strfwd.ldb - SQL Error, database disk image is malformed
Resolution
Backup the /opt/novell/npum/service/local/strfwd/strfwd.ldb for safe keeping, then do the following:
1. Check the size of the strfwd.ldb:
ls -hal /opt/novell/npum/service/local/strfwd/strfwd.ldb
-rw-r----- 1 root root 550M Oct 3 22:25 strfwd.ldb
2. Use sfwdutil to check database integrity:
/opt/novell/npum/service/local/strfwd/sfwdutil -d /opt/novell/npum/service/local/strfwd/strfwd.ldb -i
Checking database integrity...this may take some time...
Database failed integrity check.
3. Use sfwdutil to vaccum (shrink) that database:
/opt/novell/npum/service/local/strfwd/sfwdutil -d /opt/novell/npum/service/local/strfwd/strfwd.ldb -V
Checking database integrity...this may take some time...
Database failed integrity check.
4. Use sfwdutil to check database integrity:
/opt/novell/npum/service/local/strfwd/sfwdutil -d /opt/novell/npum/service/local/strfwd/strfwd.ldb -i
Checking database integrity...this may take some time...
Finished checking database integrity...
${msgid}$,${target}$,${svcid}$,${tstamp}$,${spf.module}$,${spf.method}$
5. Check the size of the strfwd.ldb:
ls -hal /opt/novell/npum/service/local/strfwd/strfwd.ldb
-rw-r----- 1 root root 120K Oct 15 14:20 strfwd.ldb
Additional Information
Although the databases used for Privileged User Manager typically don't need manual manipulation, there certain cases where manual manipulation is needed to bring the database into better health.
Sfwdutil is used primarily for manual manipulation of the strfwd.db
Sfwdutil was created to validate the integrity of a database. Sfwdutil will also allow you to vacuum (shrink) a database. Sfwdutil with the '-V' option will reclaim unused disk space and reconstruct the database from scratch. This will leave the database with a file size that is minimal in size.