General Information
Library Note
Morgan's Library Page Header
Purpose
AWR Server Source Utilities
AUTHID
CURRENT_USER
Constants
Name
Data Type
Value
General
UPLOAD_BOUND_CURR_SNID
VARCHAR2(128)
'CURRENT_SNAP_ID'
UPLOAD_BOUND_MAX_SNID
VARCHAR2(128)
'MAX_SNAP_ID'
Dependencies
AWRHUB_CONFIG
DBMS_AWRWH_LIB
DBMS_AWR_WAREHOUSE_SERVER
DBMS_AWRHUB
Documented
No
Exceptions
Error Code
Reason
ORA-13575
The database is
not registered as a AWRHub source.
ORA-13576
The AWRHub creation operation failed: string
Pragma
PRAGMA SUPPLEMENTAL_LOG_DATA(default, UNSUPPORTED);
First Available
20c
Security Model
Owned by SYS with EXECUTE granted to the DBA role.
Source
{ORACLE_HOME}/rdbms/admin/dbmsawr.sql
{ORACLE_HOME}/rdbms/admin/prvtawr.sql
Subprograms
CHECK_REGISTRATION_STATUS (new 23ai)
Returns the registration status
dbms_awrhub_source.check_registration_status(wait_time IN NUMBER DEFAULT NULL)
RETURN VARCHAR2;
SELECT dbms_awrhub_source.check_registration_status (1);
GET_HUB_ACCOUNT
Returns the hub_account for given source_name and source_id
dbms_awrhub_source.get_hub_account(
hub_name IN VARCHAR2,
source_name IN VARCHAR2,
source_id IN NUMBER)
RETURN VARCHAR2;
TBD
MODIFY_SOURCE_SETTINGS (new 23ai parameters)
Modifies the settings of an AWR Hub source
dbms_awrhub_source.modify_source_settings(
hub_name IN VARCHAR2 DEFAULT NULL
source_name IN VARCHAR2 DEFAULT NULL,
upload_interval IN NUMBER DEFAULT NULL,
upload_lo_bound IN VARCHAR2 DEFAULT NULL,
upload_hi_bound IN VARCHAR2 DEFAULT NULL);
TBD
REGISTER_SOURCE
Configure the database where it runs as an AWRHub source of the specified hub
dbms_awrhub_source.register_source(
hub_name IN VARCHAR2,
source_name IN VARCHAR2 DEFAULT NULL,
hub_mailbox IN VARCHAR2,
mailbox_type IN VARCHAR2 DEFAULT 'FILE_SYSTEM',
mailbox_cred IN VARCHAR2 DEFAULT NULL,
cred_owner IN VARCHAR2 DEFAULT NULL);
exec dbms_awrhub_source.register_source ('UW_AWR_HUB', 'PDBTEST', 'AWR_HUB_MAIL');
SETUP_SOURCE_CACHE_MAILBOX
Configures a cache mailbox for AWRHub source
dbms_awrhub_source.setup_source_cache_mailbox(
hub_name IN VARCHAR2,
source_name IN VARCHAR2 DEFAULT NULL,
cache_mailbox IN VARCHAR2 DEFAULT NULL);
exec dbms_awrhub_source.setup_source_cache_mailbox ('UW_AWR_HUB', 'REMOTE_AWR_SRC', 'AWR_MAIL_HUB');
UNREGISTER_SOURCE
Unregisters a source from an AWRHub
dbms_awrhub_source.unregister_source(
hub_name IN VARCHAR2 DEFAULT NULL,
hub_account IN VARCHAR2 DEFAULT NULL);
exec dbms_awrhub_source.unregister_source ;
UPLOAD_SNAPSHOT (new 23ai)
Manually uploads snapshot(s) in the specified range to AWRHub server
dbms_awrhub_source.upload_snapshot(
beg_snap_id IN NUMBER DEFAULT NULL,
end_snap_id IN NUMBER DEFAULT NULL);
exec dbms_awrhub_source.upload_snapshot (SYSDATE-7, SYSDATE)