Oracle CDBVIEW
Version 23c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located anywhere in North America, EMEA, LATAM, or APAC that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Creates CDB views for all DBA views. Source code is all clear-text.
AUTHID CURRENT_USER
Dependencies
CDBVIEW_INTERNAL DBMS_STANDARD GETLONG
DBMS_APP_CONT_ADMIN    
Documented No
First Available 12.1
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role
Source {ORACLE_HOME}/rdbms/admin/catcdbviews.sql
Subprograms
 
CREATE_CDBVIEW
Creates, or recreates, the CDB Views cdbview.create_cdbview(
chk_upgrd    IN BOOLEAN,
owner        IN VARCHAR2,
oldview_name IN VARCHAR2,
newview_name IN VARCHAR2);

True indicates the call is part of an upgrade and the views are not recreated. False indicates the call is not part of an upgrade and all CDB views are (re)created.
-- Warning: do not run the following statements ... they are examples found in
-- {ORACLE_HOME}/rdbms/admin files and could be destructive

exec cdbview.create_cdbview(FALSE,'SYS','DBA_CONTEXT','XXX_CONTEXT');
                                  *
ERROR at line 1:
ORA-06550: line 1, column 37:
PLS-00103: Encountered the symbol "SYS" when expecting one of the following:
<an idnetifier> <a double-quoted delimited=identifier>
current delete exists prior
 
GETLONG
opcode = 1 accesses view$
opcode = 2 accesses cdef$
cdbview.getlong(
opcode  IN NUMBER,
p_rowid IN ROWID)
RETURN VARCHAR2;
SELECT sys.cdbview.getlong(1,'AAAABfAABAAAARhAAC') FROM dual;

SYS.CDBVIEW.GETLONG(1,'AAAABFAABAAAARHAAC')
--------------------------------------------------------------------------------------
select "LIB_IDX","LIB_NAME","VENDOR_NAME","PROTOCOL_NUM","VERSION_NUM","PATH_NAME", "MAP_FILE","FILE_CFGID","MAP_ELEM","ELEM_CFGID","MAP_SYNC","CON_ID" from v$map_library

Related Topics
Built-in Functions
Built-in Packages
CDBVIEW_INTERNAL
Container Database
DBMS_PDB
Pluggable Database
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