This action (deleteData) deletes the data older than a specified number of days from the given table name. It deletes data from:
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
NOTE: This action does not drop any partitions that are not archived. If you want to delete unarchived partitions, the optional flag forceDelete has to be specified with a value of true.
If forceDelete is used:
false or not specified |
drops only the partitions older than keepDays and those that are archived |
true |
drops all the partitions older than keepDays including unarchived partitions |
This command uses the following flags:
-action |
deleteData |
-keepDays |
<number of days to keep> |
[-forceDelete] |
<either true or false> |
-connectFile |
<filePath> |
-tableName |
<table name> |
To run deleteData:
Execute this command as follows:
-action deleteData -keepDays <numberofDaysToKeep> [-forceDelete <true/false>] -connectFile <filePath> -tableName <table name>
Oracle Example:
The following example drops partitions from all tables older than 13 days making sure all dropped partitions are archived. In the end, a list is generated of any partitions that were not deleted if they have not been archived.
./sdm -action deleteData keepDays 13 -forceDelete false -connectFile sdm.connect tableName EVENTS
SQL Server Example:
The following example drops the partitions from all tables older than 13 days making sure all dropped partitions are archived. In the end, it lists any partitions that were not deleted if they have not been archived.
sdm -action deleteData keepDays 13 -forceDelete false -connectFile sdm.connect tableName EVENTS