Issue the nzhistcleanupdb command to delete outdated history information from a history database.
nzhistcleanupdb [options]
Input | Description |
---|---|
{-d | --db} dbname | The name of the history database from which you want to remove old data. The name must be a valid, unquoted identifier. |
{-n | --host} NZ_HOST | The host name of the system where the database resides. The default and only value for this option is NZ_HOST. |
{-u | --user} user | The user account that permits access to the database. The default is NZ_USER. The user must both be able to access the history database and must have the Delete privilege for the history database tables. |
{-p | --pw} password | The password for the user account that permits access to the database. The default is NZ_PASSWORD. |
{-t | --time} "<yyyy-mm-dd[,hh:mm[:ss] ]>" | The date and time threshold. All data recorded before this date and time is deleted. The date (year, month, and day) is required. The time (hours, minutes, and seconds) is optional. The default time is 12:00 AM (midnight, start of day). |
-f | --force | Do not prompt for confirmation. |
-g | --groom | Run a groom operation (that is, automatically issue the GROOM TABLE command) after the cleanup operation completes. This updates the zone maps for the history data tables, which improves the performance of queries against those tables. |
-h | --help | Display the usage and syntax for the command. |
[nz@nzhost ~]$ nzhistcleanupdb -d histdb -u smith -pw password -t
"2009-10-31" -g
About to DELETE all history entries older than 2013-10-31 00:00:00
(GMT) from histdb.
Proceed (yes/no)? :yes
BEGIN
DELETE 0
DELETE 98
DELETE 34
DELETE 0
DELETE 0
DELETE 188
DELETE 188
DELETE 62
DELETE 65
DELETE 0
DELETE 0
DELETE 0
DELETE 503
COMMIT