Oracle DBMS_HA_ALERTS_PRVT
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose Utilities supporting the DBMA_HA_ALERTS package which is part of Fast Application Notification (FAN).
AUTHID DEFINER
Dependencies
DBMS_HA_ALERT_LIB DBMS_SERVER_ALERT_PRVT RECENT_RESOURCE_INCARNATIONS$
DBMS_PRVT_TRACE DBMS_SYS_ERROR V$INSTANCE
DBMS_SERVER_ALERT GV$INSTANCE  
Documented No
First Available 10g
Security Model Owned by SYS with EXECUTE granted to SYSRAC.
Source {ORACLE_HOME}/rdbms/admin/dbmshae.sql
Subprograms
 
CHECK_HA_RESOURCES
Undocumented dbms_ha_alerts_prvt.check_ha_resources RETURN VARCHAR2;
conn / as sysdba

DECLARE
 retval VARCHAR2(128);
BEGIN
  dbms_ha_alerts_prvt.check_ha_resources;
END;
/
 
CLEAR_INSTANCE_RESOURCES
Undocumented dbms_ha_alerts_prvt.clear_instance_resources(
database_domain      IN VARCHAR2,
database_unique_name IN VARCHAR2,
instance_name        IN VARCHAR2,
event_time           IN TIMESTAMP WITH TIME ZONE);
conn / as sysdba

show parameter domain

show parameter unique

SELECT instance_name
FROM v$instance;

exec dbms_ha_alerts_prvt.clear_instance_resources(NULL, 'orabase', 'orabase', SYSTIMESTAMP-1);
 
INSTANCE_STARTUP_TIMESTAMP_TZ
Undocumented dbms_ha_alerts_prvt.instance_startup_timezone_tz(startup_time IN DATE)
RETURN TIMESTAMP WITH TIME ZONE;
conn / as sysdba

set serveroutput on

DECLARE
 sut gv$instance.startup_time%TYPE;
 ret VARCHAR2(100);
BEGIN
  SELECT startup_time
  INTO sut
  FROM gv$instance;

  SELECT SYS_EXTRACT_UTC(dbms_ha_alerts_prvt.instance_startup_timestamp_tz(sut))
  INTO ret
  FROM dual;

  dbms_output.put_line(ret);
END;
/
 
POST_HA_ALERT
Undocumented dbms_ha_alerts_prvt.post_ha_alert(
reason_id            IN dbms_server_alert.reason_id_t,
same_transaction     IN BOOLEAN,
clear_old_alert      IN BOOLEAN,
severity             IN dbms_server_alert.severity_level_t DEFAULT
dbms_server_alert.level_warning,
database_domain      IN VARCHAR2 DEFAULT SYS_CONTEXT('USERENV', 'DB_DOMAIN'),
database_unique_name IN VARCHAR2       DEFAULT NULL,
instance_name        IN VARCHAR2       DEFAULT NULL,
service_name         IN VARCHAR2       DEFAULT NULL,
host_name            IN VARCHAR2       DEFAULT NULL,
incarnation          IN VARCHAR2       DEFAULT NULL,
event_reason         IN VARCHAR2,
event_time           IN TIMESTAMP WITH TIME ZONE,
cardinality          IN BINARY_INTEGER DEFAULT NULL,
event_id             IN NUMBER         DEFAULT NULL,
metric_value         IN NUMBER         DEFAULT NULL,
timeout_seconds      IN BINARY_INTEGER DEFAULT NULL,
immediate_timeout    IN BOOLEAN        DEFAULT TRUE,
background_process   IN BOOLEAN        DEFAULT FALSE,
signal_interna       IN BOOLEAN        DEFAULT TRUE,
duplicates_ok        IN BOOLEAN        DEFAULT FALSE);
DECLARE
 rid    dbms_server_alert.reason_id_t;
 strans BOOLEAN := FALSE;
 clrold BOOLEAN := FALSE;
 sev    dbms_server_alert.severity_level_t;
 domain VARCHAR2(30) := SYS_CONTEXT('USERENV', 'DB_DOMAIN');
 uniq   VARCHAR2(30) := 'orabase';
 inst   VARCHAR2(30) := 'orabase';
 serv   VARCHAR2(30) := 'orabase';
 host   VARCHAR2(30) := 'PERRITO4';
 incarn VARCHAR2(30) := '0';
 eventr VARCHAR2(30) := 'user';
 eventt TIMESTAMP := SYSTIMESTAMP;
 card   BINARY_INTEGER;
 eventi NUMBER;
 metric NUMBER;
 outsec BINARY_INTEGER;
 immdto BOOLEAN := TRUE;
 bkgpro BOOLEAN := FALSE;
 sigint BOOLEAN := TRUE;
 dupok  BOOLEAN := FALSE;
BEGIN
  rid := dbms_server_alert.rsn_fan_database_down;
  sev := dbms_server_alert.level_warning;
 
  dbms_ha_alerts_prvt.post_ha_alert(rid, strans, clrold, sev, domain, uniq,
                                    inst, serv, host, incarn, eventr, eventt,
                                    card, eventi, metric, outsec, immdto,
                                    bkgpro, sigint, dupok);
END;
/
 
POST_INSTANCE_UP
Undocumented dbms_ha_alerts_prvt.post_instance_up RETURN VARCHAR2;
conn / as sysdba

col post_instance_up format a30

SELECT dbms_ha_alerts_prvt.post_instance_up
FROM dual;

Related Topics
DBMS_HA_ALERTS
DBMS_SERVER_ALERT
Packages
RAC
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved