Before you start it is recommended that you have a complete backup so that
should there be any problems you can return to the status quo ante.
The steps are the following:
(1)Delete unnecessary data from the database.
(2)Unload the data from the database into a flat file.
(3)Edit the solid.ini file in order to limit the size to which the database
will grow.
(4)Delete the database.
(5)Recreate the database.
(6)Reload the data into it.
1) To delete unnecessary data from the database use the command
#ovdwevent -trim.
You can test to see what data you are about to delete using
#ovdwevent -trimnodelete
before you do it for real. For a full explanation of the options see the
ovdwevent (1) man page. However deleting data will not reduce the size of the
database file, it will simply free up space inside it. (Once you have got your
database under control you might consider setting up a cron job to delete
superfluous data on a regular basis, and thus prevent any problems caused by
the database filling up.)
2) Now unload the data from the database into a flat file with ovdwunloader.
Check the man page for a full explanation of the options. You will need to
export both the trend and event data, so you will need to run the command twice:
#ovdwunloader -file trend_output_file -trend -v
#ovdwunloader -file event_output_file -event -v
Stop OpenView
#ovstop -v
3) The default size of the database is a single two gigabytes file. You can
control the size by editing $OV_DB/analysis/default/solid.ini and setting the
FileSpec parameter in the Index File section. The FileSpec parameter describes
the location and the maximum size of the database file and accepts the
following three arguments:
database file name
max filesize
device number (optional)
You can also use the FileSpec parameter to divide the index file into multiple
files and onto multiple disks. To do this, specify another FileSpec parameter
identified by the number 2. The index file will be written to the second file
if it grows over the maximum value of the first FileSpec parameter. For example
the default value for this parameter is solid.db, 2147483647 (which equals 2 GB
expressed in bytes).
FileSpec_1=SOLID.DB 2147483647
In the following example, the parameters divide the index file on the disks C:,
D: and E: to be split after growing larger than 1 GB (=1073741824 bytes).
FileSpec_1=c:\soldb\solid.1 1073741824 1
FileSpec_2=D:\soldb\solid.2 1073741824 2
FileSpec_3=G:\soldb\solid.3 1073741824 3
NOTE. The index file locations entered must be valid path names in the server’s
operating system. For example, if the server runs on a UNIX operating system,
path separators must be slashes instead of backslashes. Although the database
files reside in different directories, the file names must be unique. In the
above example, it is assumed that C:, D: and E: partitions reside on separate
physical disks. Splitting the index file on multiple disks will increase the
performance of the server because multiple disk heads will access the data in
your index file. There is no limit to the number of index files you may use.
4) Now delete the database:
#cd $OV_DB/analysis/default
#rm solid.db
#rm solmsg.*
#rm ./log/sol*.log
5) Now recreate an empty database
#cd $OV_DB/analysis/default
#ovdbrun -x exit -u ovdb -p ovdb
#cd $OV_CONF/analysis/sqlScripts
#ovdbcheck -start
#ovdwquery -file tables_common.solid
#ovdwquery -file tables_event.solid
#ovdwquery -file tables_trend.solid
#ovdwquery -file tables_topo.solid
#ovdbcheck -stop
#ovstart -v
6) Now that OpenView is running again we need to reload the data from the flat
files into the database.
#ovdwloader -file trend_output_file -v
#ovdwloader -file event_output_file -v
How to do that in NNMi 9.x?
ReplyDeletehttp://hpopenview.blogspot.com/2012/07/quickstart-nnmi-9x-delete-clean.html
DeleteThanks for the useful article! My edition NNMi 9.x delete (clean) database http://hpopenview.blogspot.com/2012/07/quickstart-nnmi-9x-delete-clean.html
ReplyDeleteovdwconfig.ovpl -type embedded -reload
ReplyDelete