CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle DBMS_CLUSTDB

Version 11.1
 
General Information
Purpose RAC cluster validation
Source {ORACLE_HOME}/rdbms/admin/catclust.sql
Dependencies
DBMS_REGISTRY GV$OPTION OBJ$

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$ 
    WHERE owner#=0 AND name='V$CACHE_TRANSFER';

    -- valid if v$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
      dbms_registry.invalid('RAC');
    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
DBMS_REGISTRY
RAC
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [57 users online]    © 2010 psoug.org