Log and History Management
You are looking at an older version of the documentation. The latest version is found here.
The Data Virtuality Server has several procedures for log cleaning and housekeeping which are in the SYSLOG
schema.
SYSLOG.clearFinishedJobLogs
This procedure clears job history for finished jobs only.
SYSLOG.clearFinishedJobLogs(IN before timestamp)
This command clears all log entries with a finish timestamp earlier than the provided timestamp. To clear all entries for finished jobs from the job history, provide NULL
.
SYSLOG.clearJobLogs
This procedure clears job history.
SYSLOG.clearJobLogs(IN before timestamp)
This command clears all log entries with a finish timestamp earlier than the provided timestamp. To clear all entries from the job history, provide NULL
.
SYSLOG.clearQueryLogs
This procedure clears the query log.
SYSLOG.clearQueryLogs(IN before timestamp)
This command clears all log entries with a finish timestamp earlier than the provided timestamp. To clear all entries from the query log, provide NULL
.
SYSLOG.clearHistory
SYSLOG.clearHistory(IN historyTableName string, IN before timestamp)
In this procedure, historyTableName
is the name of the history table in SYSLOG
. If this parameter is set to NULL
, all history tables will be cleared.
This command clears all entries with a finish timestamp earlier than the provided timestamp. To clear all entries, provide NULL
.
Examples of usage:
1. Deleting entries from the
SYSLOG.ViewDefinitionHistory
table older than 2015-09-11 16:30:00
:
CALL SYSLOG.clearHistory(historyTableName => 'ViewDefinitionHistory', before => cast('2015-09-11 16:30:00' as timestamp));;
2. Deleting all entries from the SYSLOG.ViewDefinitionHistory table
:
CALL SYSLOG.clearHistory(historyTableName => 'ViewDefinitionHistory');;
3. Deleting entries older than 2015-09-11 16:30:00
from all history tables:
CALL SYSLOG.clearHistory(before => cast('2015-09-11 16:30:00' as timestamp));;
4. Deleting all entries from all history tables:
CALL SYSLOG.clearHistory();;