The AUDIT_ARCHIVE procedure and table function both archive the audit log file for the connected database.
>>-AUDIT_ARCHIVE--(--directory--,--member--)-------------------><
The schema is SYSPROC.
The syntax is the same for both the procedure and table function.
Execute privilege on the AUDIT_ARCHIVE procedure or table function.
None
Example 1: Archive the audit log(s) for all members to the default directory using the procedure.
CALL SYSPROC.AUDIT_ARCHIVE(NULL, NULL)
Example 2: Archive the audit log(s) for all members to the default directory using the table function.
SELECT * FROM TABLE(SYSPROC.AUDIT_ARCHIVE('', -2)) AS T1
Column name | Data type | Description |
---|---|---|
DBPARTITIONNUM | SMALLINT | dbpartitionnum - Database partition number monitor element |
PATH | VARCHAR(1024) | Directory location of archived file. |
FILE | VARCHAR(1024) | Name of the archived file. |
SQLCODE | INTEGER | The SQLCODE received while attempting to archive file. |
SQLSTATE | VARCHAR(5) | The SQLSTATE received while attempting archive file. If SQLSTATE is NULL, the value is zero. |
SQLERRMC | VARCHAR(70) FOR BIT DATA | The sqlerrmc received while attempting archive file. If SQLSTATE is NULL, the value is zero. |
MEMBER | SMALLINT | member - Database member monitor element |