This action (dropPartition) drops all the partitions older than the flag keepDays from the following tables:
Oracle:
EVENTS
CORRELATED_EVENTS
EVT_DEST_EVT_NAME_SMRY_1
EVT_DEST_SMRY_1
EVT_DEST_TXNMY_SMRY_1
EVT_PORT_SMRY_1
EVT_SEV_SMRY_1
EVT_SRC_SMRY_1
SQL Server
EVENTS
CORRELATED_EVENTS
EVT_DEST_EVT_NAME_SMRY_1
EVT_DEST_SMRY_1
EVT_DEST_TXNMY_SMRY_1
EVT_PORT_SMRY_1
EVT_SEV_SMRY_1
EVT_SRC_SMRY_1
To prevent unintentional loss of data, this action does not drop any partitions that are not archived. If you want to delete unarchived partitions, use the forceDelete flag.
Caution: If you forceDelete the data deleted cannot be recovered, so use this option with caution.
This action uses the following flags:
-action |
dropPartitions |
-keepDays |
<number of days to keep> |
-forceDelete (optional) |
<either "true" or "false"> This defaults to false if not specified, meaning that only the partitions that are older than keepDays and are already archived will be dropped. If set to true, all partitions older than keepDays will be dropped, even if they have not been archived. |
-connectFile |
<filePath> |
-tableName |
<table name> |
NOTE: Sentinel partitioned tables are organized into 2 groups. One is the EVENTS table group, which includes EVENTS and CORRELATED_EVENTS; the other is the summary table group, which includes all summary, or aggregate, tables. If any one of the tables in the group is specified by the tableName parameter, the dropPartition operation is applied to all tables in that group.
To run dropPartition:
Execute this command as follows:
-action dropPartitions -keepDays <numberofDaysToKeep> -tableName <table name> [-forceDelete <true/false>] -connectFile <filePath>
The following examples drops all the partitions older than 30 days making sure all the partitions are archived. All partitions that were skipped (not removed) because they have not been archived are listed when the operation completes.
Oracle Example:
./sdm action dropPartitions keepDays 30 tableName CORRELATED_EVENTS forceDelete false connectFile sdm.connect
SQL Example:
sdm action dropPartitions keepDays 30 tableName CORRELATED_EVENTS forceDelete false connectFile sdm.connect