How to recover seodb / rebuild the seosdb?
Privileged Identity Manager, version 12.x
PAM Server Control, version 14.x
Because many updates are made to the CA Privileged Identity Manager database, the database files may become fragmented. Reindexing and rebuilding the database helps ensure database optimization for speed and reliability. Reindex the database during your routine maintenance procedures every three to six months, and when you have a performance problem.
Here are the steps to check the database and rebuild it if necessary:
Stop ControlMinderif it's running
# secons -s
Make a backup that you won't touch
# cp -R /opt/CA/AccessControl/seosdb /backup/location
Change into your seosdb directory
# cd /opt/CA/AccessControl/seosdb
Close the database, in case it's open still:
# dbmgr -u -close
Check the database:
# dbmgr -u -check
If there are no errors take the following step: Rebuild the database files using the following commands: dbmgr -u -build seos_cdf.dat dbmgr -u -build seos_pdf.dat dbmgr -u -build seos_pvf.dat dbmgr -u -build seos_odf.dat
If every thing goes fine without any error messages, please start ControlMinder.
If the dbmgr -u -check gives an error, or there are errors with the -build command on the database files, perform the following:
Create another backup of the old database that we can operate on, you can remove this after the test
# cp -R /opt/CA/AccessControl/seosdb /opt/CA/AccessControl/seosdb_tmp (all on one line)
Create a script that will duplicate the rule set by running the dbmgr utility
on the temp database:
# cd /opt/CA/AccessControl/seosdb_tmp
# dbmgr -export -l -f /tmp/lang_script
Create a new database over your current one.
# cd /opt/CA/AccessControl/seosdb
# dbmgr -c -cq
Import the script generated previously to populate the new database:
# cd /opt/CA/AccessControl/seosdb
# selang -l -f /tmp/lang_script
Execute the dbmgr utility to create a flat file containing data from the old database:
# cd /opt/CA/AccessControl/seosdb_tmp
# dbmgr -migrate -r /tmp/flat_file
Load the data from the flat file into the new Access Control database:
# cd /opt/CA/AccessControl/seosdb
# dbmgr -migrate -w /tmp/flat_file
selang -c -f /tmp/file_to_import
Start the PIM / PAMSC endpoint daemons and verify.