ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Utility functions for HCS Logging from PL/SQL code
AUTHID
DEFINER
Constants
Name
Data Type
Value
Logging
HCSLOG_VRB_NONE
INT
0
HCSLOG_VRB_SUMMARY
INT
1
HCSLOG_VRB_DETAIL_ALLOCS
INT
2
HCSLOG_VRB_DETAIL
INt
3
Dependencies
DBMS_ASSERT
DBMS_AVTUNE_UTIL
DBMS_STANDARD
DBMS_AVTUNE
DBMS_HCS_LIB
UTL_FILE
Documented
No
Exceptions
Error Code
Reason
ORA-20000
Log called before Log START
ORA-44003
INVALID_SQL_NAME
First Available
21c
Security Model
Owned by SYS with EXECUTE granted to the DB and AVTUNE_PKG_ROLE roles
dbms_hcs_log.create_views(
user IN VARCHAR2 DEFAULT SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'));
PRAGMA supplemental_log_data(create_views, UNSUPPORTED_WITH_COMMIT);
exec dbms_hcs_log.create_views;
PL/SQL procedure successfully completed.
SELECT object_name
FROM dba_objects
WHERE object_type = 'VIEW'
and owner = USER
AND last_ddl_time > SYSDATE-1/24
ORDER BY 1;
dbms_hcs_log.drop_views(
user IN VARCHAR2 DEFAULT SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'));
PRAGMA supplemental_log_data(drop_views, UNSUPPORTED_WITH_COMMIT);
dbms_hcs_log.hcs_call_ctx_log_clear_clob(p_comp IN VARCHAR2);
PRAGMA supplemental_log_data(hcs_call_ctx_log_clear_clob, UNSUPPORTED_WITH_COMMIT);
exec dbms_hcs_log.hcs_call_ctx_log_clear_clob('TEST');
BEGIN dbms_hcs_log.hcs_call_ctx_log_clear_clob('TEST'); END;
*
ERROR at line 1:
ORA-20000: Log called before Log START
ORA-06512: at "SYS.DBMS_HCS_LOG", line 142
ORA-06512: at "SYS.DBMS_HCS_LOG", line 206
ORA-06512: at line 1
Purges HCS logs to the given max_segments. If call_only is TRUE (default) then the value for max_segments is not used for subsequent logging. If call_only is FALSE, the value is used for subsequent logging.
dbms_hcs_log.purge(
max_segments IN NUMBER,
call_only IN BOOLEAN DEFAULT TRUE);
PRAGMA supplemental_log_data(purge, UNSUPPORTED_WITH_COMMIT);