Oracle DBMS_REGISTRY_SIMPLE
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
For how many years have you been working with physical servers? Software Defined Servers can improve performance and security while lowering complexity and cost. With Software Defined Servers you define servers with an optimum configuration to your environment rather than being memory starved and cpu over-provisioned. Find out how you can improve your computing environment with TidalScale. your friends.
Purpose Used with c scripts prior to upgrading the data dictionary.
AUTHID DEFINER
Dependencies
DBMS_REGISTRY DBMS_REGISTRY_SYS DUAL
Documented No
First Available 12.1.0.2
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/dbmscrs.sql
Subprograms
 
IS_DB_CONSOLIDATED
Returns TRUE if a database is a container DB dbms_registry_simple.is_db_consolidated RETURN BOOLEAN;
BEGIN
  IF dbms_registry_simple.is_db_consolidated THEN
    dbms_output.put_line('This is a Consolidated DB');
  ELSE
    dbms_output.put_line('Not a Consolidated DB');
  END IF;
END;
/
 
IS_DB_PDB
Returns TRUE if the current session is connected to a PDB dbms_registry_simple.is_db_pdb RETURN BOOLEAN;
conn / as sysdba

BEGIN
  IF dbms_registry_simple.is_db_pdb THEN
    dbms_output.put_line('This is a PDB');
  ELSE
    dbms_output.put_line('Not a PDB');
  END IF;
END;
/

ALTER SESSION SET CONTAINER = pdbdev;

BEGIN
  IF dbms_registry_simple.is_db_pdb THEN
    dbms_output.put_line('This is a PDB');
  ELSE
    dbms_output.put_line('Not a PDB');
  END IF;
END;
/
 
IS_DB_PDB_SEED
Returns TRUE if the current session is connected to the SEED PDB dbms_registry_simple.is_db_pdb_seed RETURN BOOLEAN;
conn / as sysdba

BEGIN
  IF dbms_registry_simple.is_db_pdb_seed THEN
    dbms_output.put_line('This is PDB$SEED');
  ELSE
    dbms_output.put_line('Not PDB$SEED');
  END IF;
END;
/

ALTER SESSION SET CONTAINER = pdb$seed;

BEGIN
  IF dbms_registry_simple.is_db_pdb_seed THEN
    dbms_output.put_line('This is PDB$SEED');
  ELSE
    dbms_output.put_line('Not PDB$SEED');
  END IF;
END;
/
 
IS_DB_ROOT
Returns TRUE if the current session is connected to the ROOT CONTAINER dbms_registry_simple.is_db_root RETURN BOOLEAN;
conn sys@pdbdev as sysdba

BEGIN
  IF dbms_registry_simple.is_db_root THEN
    dbms_output.put_line('This is CDB$ROOT);
  ELSE
    dbms_output.put_line('Not CDB$ROOT');
  END IF;
END;
/

ALTER SESSION SET CONTAINER = pdbdev;

BEGIN
  IF dbms_registry_simple.is_db_root THEN
    dbms_output.put_line('This is CDB$ROOT);
  ELSE
    dbms_output.put_line('Not CDB$ROOT');
  END IF;
END;
/

Related Topics
Built-in Functions
Built-in Packages
DBMS_REGISTRY
DBMS_REGISTRY_EXTENDED
DBMS_REGISTRY_SERVER
DBMS_REGISTRY_SYS
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