Oracle DBMS_CLUSTDB
Version 23c

General Information
Purpose RAC cluster validation
AUTHID DEFINER
Dependencies
DBMS_REGISTRY REGISTRY$ V$OPTION
OBJ$ USER$  
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/catclust.sql
Source Code CREATE OR REPLACE PACKAGE dbms_clustdb AS
PROCEDURE validate;
END dbms_clustdb;
/

CREATE OR REPLACE PACKAGE BODY dbms_clustdb AS

PROCEDURE validate IS
 start_time DATE;
 end_time   DATE;
 option_val VARCHAR2(64);
 g_null     CHAR(1);
BEGIN
  BEGIN
    SELECT null INTO g_null FROM obj$ o, user$ u
    WHERE o.owner#=u.user# AND u.name = 'PUBLIC'
    AND o.name='GV$GES_STATISTICS';
    -- valid if gv$ges_statistics exists;
    SELECT value INTO option_val FROM v$option
    WHERE parameter = 'Real Application Clusters';
    -- check if RAC option has been linked in
    IF option_val = 'TRUE' THEN
      dbms_registry.valid('RAC');
    ELSE
      update registry$ set status = 9 where cid='RAC';
      commit;
    END IF;
  EXCEPTION
    WHEN NO_DATA_FOUND THEN
      dbms_registry.invalid('RAC');
  END;
END validate;

END dbms_clustdb;
/
 
VALIDATE
Validate cluster database dbms_clustdb.validate;
exec dbms_clustdb.validate;

Related Topics
Built-in Functions
Built-in Packages
DBMS_REGISTRY
RAC
What's New In 21c
What's New In 23c

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-2023 Daniel A. Morgan All Rights Reserved
  DBSecWorx