Oracle DBMS_PDB
Version 21c

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 Provides an interface to examine and manipulate data about pluggable databases.
AUTHID CURRENT_USER
Constants
Name Data Type Value
Rule ID
V_FEAT_INV NUMBER 0
V_FEAT_ALL NUMBER 1
V_FEAT_NETWORK_ACCESS NUMBER 2
V_FEAT_COMMON_SCHEMA_ACCESS NUMBER 3
V_FEAT_TCP NUMBER 4
V_FEAT_HTTP NUMBER 5
V_FEAT_SMTP NUMBER 6
V_FEAT_INADDR NUMBER 7
V_FEAT_JDWP NUMBER 8
V_FEAT_XDB_PROTOCOLS NUMBER 9
V_FEAT_JAVA NUMBER 10
V_FEAT_CTX_PROTOCOLS NUMBER 11
V_FEAT_OS_ACCESS NUMBER 12
V_FEAT_FILE NUMBER 13
V_FEAT_EXTPROC NUMBER 14
V_FEAT_JAVA_OS_ACCESS NUMBER 15
V_FEAT_JAVA_RUNTIME NUMBER 16
V_FEAT_TRACE_VIEWS NUMBER 17
V_FEAT_AQ_PROTOCOLS NUMBER 18
V_FEAT_EXT_GLB_AUTH NUMBER 19
V_FEAT_SECURITY_POLICIES NUMBER 20
V_FEAT_CONNECTIONS NUMBER 21
V_FEAT_LOCSYSOPERRESMOD NUMBER 22
V_FEAT_COMUSERCONN NUMBER 23
V_FEAT_AWR_ACCESS NUMBER 24
V_FEAT_LUSER_CSCHEMA_ACCESS NUMBER 25
V_FEAT_CUSER_LSCHEMA_ACCESS NUMBER 26
V_FEAT_DROP_TS_KEEP_DATAFILES NUMBER 27
V_FEAT_EXT_FILE_ACCESS NUMBER 28
V_FEAT_CTX_LOGGING NUMBER 29
V_FEAT_LOB_FILE NUMBER 30
V_FEAT_ADR_ACCESS NUMBER 31
V_FEAT_FILE_TRANSFER NUMBER 32
V_FEAT_XDB_DEPRECATED NUMBER 33
V_FEAT_SYSDATA NUMBER 34
V_FEAT_COMUSERCONN_LOCALSVC NUMBER 35
V_FEAT_USR_PASS_VERIFIER NUMBER 36
V_FEAT_XDB_REPOSITORY NUMBER 37
V_FEAT_PROTECTED_SCHEMA_ACCESS NUMBER 38
V_FEAT_USER_PROFILE_SENSITIVE NUMBER 39
V_FEAT_MAX NUMBER 40
V_ALTER_SESSION NUMBER 42
V_ALTER_SYSTEM NUMBER 49
Rule Type
V_STATEMENT NUMBER 1
V_OPTION NUMBER 2
V_FEATURE NUMBER 3
Dependencies
DBMS_PDB_ALTER_SHARING DBMS_PDB_LIB DBMS_SQLDIAG
DBMS_PDB_CHECK_LOCKDOWN DBMS_PLUGTS DBMS_STATS_INTERNAL
DBMS_PDB_EXEC_SQL DBMS_PREPLUGIN_BACKUP SDO_GEOR_DEF
DBMS_PDB_IS_VALID_PATH    
Documented Yes: Packages and Types Reference
Exceptions
Error Code Reason
ORA-65026 XML metadata file error : LPX-00202: could not open "<pdb_describe_file_location.xml" (error 0)
ORA-65046 Operation not allowed from outside a pluggable database
ORA-65160 Invalid cleanup task ID
First Available 12.1
Security Model Owned by SYS with EXECUTE granted to MDSYS and EXECUTE_CATALOG_ROLE role. The script catqm_int.sql can grant EXECUTE to XDB if run.
Source {ORACLE_HOME}/rdbms/admin/dbmspdb.sql
Subprograms
 
CHECK_LOCKDOWN
Checks if the operation is lockdown or not and returns the corresponding BOOLEAN value dbms_pdb.check_lockdown(
rule_type      IN NUMBER,
rule_id        IN NUMBER,
raise_error    IN BOOLEAN,
init_parameter IN NUMBER,
events         IN BOOLEAN)
RETURN BOOLEAN;
TBD
 
CHECK_NFT
Checks and warns if a PDB has nofile tablespaces. This procedure is intended for internal not customer use. dbms_pdb.check_nft;
exec dbms_pdb.check_nft;

PL/SQL procedure successfully completed.
 
CHECK_PLUG_COMPATIBILITY
Determines whether a pluggable database described by file pdb_descr_file is compatible with the current CDB dbms_pdb.check_plug_compatibility(
pdb_descr_file IN VARCHAR2,
pdb_name       IN VARCHAR2 DEFAULT NULL,
fatal_only     IN BOOLEAN  DEFAULT FALSE)
RETURN BOOLEAN;
conn / as sysdba

ALTER PLUGGABLE DATABASE pdbdev CLOSE;

ALTER PLUGGABLE DATABASE pdbdev OPEN READ ONLY;

exec dbms_pdb.describe('/home/oracle/pdbdev.xml', 'PDBDEV');

BEGIN
  IF dbms_pdb.check_plug_compatibility('/home/oracle/pdbdev.xml', 'PDBDEV') THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

col time format a30
col name format a12
col cause format a10
col type format a8
col action format a50
col message format a95
col con_id format 999

SELECT time, name, type, message
FROM pdb_plug_in_violations;

TIME                           NAME      TYPE     MESSAGE
------------------------------ --------- -------- -----------------------------------------------------
11-DEC-20 06.16.54.684970 PM   PDB$SEED  ERROR    Database option APS mismatch: PDB installed version
                                                  21.0.0.0.0. CDB installed version NULL.
11-DEC-20 06.16.54.684970 PM   PDB$SEED  ERROR    Database option XOQ mismatch: PDB installed version
                                                  21.0.0.0.0. CDB installed version NULL.
17-JAN-21 02.22.09.504732 AM   PDB$SEED  WARNING  Database option RAC mismatch: PDB installed version NULL.
                                                  CDB installed version 21.0.0.0.0.
17-JAN-21 02.22.13.427033 AM   TEST21P1  WARNING  Database option RAC mismatch: PDB installed version NULL.
                                                  CDB installed version 21.0.0.0.0.
17-JAN-21 02.22.13.724639 AM   TEST21P1  WARNING  Tablespace SYSTEM is not encrypted.
                                                  Oracle Cloud mandates all tablespaces should be encrypted.
17-JAN-21 02.22.13.727556 AM   TEST21P1  WARNING  Tablespace SYSAUX is not encrypted.
                                                  Oracle Cloud mandates all tablespaces should be encrypted.

SELECT time, name, type, status, action
FROM pdb_plug_in_violations;

TIME                           NAME      TYPE     STATUS    ACTION
------------------------------ --------- -------- --------- --------------------------------------------
11-DEC-20 06.16.54.684970 PM   PDB$SEED  ERROR    RESOLVED  Fix the database option in the PDB or the CDB
11-DEC-20 06.16.54.684970 PM   PDB$SEED  ERROR    RESOLVED  Fix the database option in the PDB or the CDB
17-JAN-21 02.22.09.504732 AM   PDB$SEED  WARNING  PENDING   Fix the database option in the PDB or the CDB
17-JAN-21 02.22.13.427033 AM   TEST21P1  WARNING  PENDING   Fix the database option in the PDB or the CDB
17-JAN-21 02.22.13.724639 AM   TEST21P1  WARNING  PENDING   Encrypt the tablespace.
17-JAN-21 02.22.13.727556 AM   TEST21P1  WARNING  PENDING   Encrypt the tablespace.
 
CLEANUP_TASK
Performs cleanup task previously performed by SMON -- returns 0 if the next scheduled time for the job does not need to be changed. N if the next schedule job should be N seconds from now (not my experience as shown below)

dbms_pdb.cleanup_task(task_id IN NUMBER) RETURN NUMBER;
SELECT dbms_pdb.cleanup_task(153)
FROM dual;
       *
ERROR at line 1:
ORA-65160: invalid cleanup task ID
ORA-06512: at "SYS.DBMS_PDB", line 85
 
CLEAR_PLUGIN_VIOLATIONS
Cleans up resolved plugin violations dbms_pdb.clear_plugin_violations(pdb_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb.clear_plugin_violations('PDBDEV');

PL/SQL procedure successfully completed.
 
CONVERT_TO_LOCAL
Convert a common object to local object dbms_pdb.convert_to_local(
schema_name    IN VARCHAR2,
object_name    IN VARCHAR2,
namespace      IN NUMBER,
object_subname IN VARCHAR2 DEFAULT NULL,
sig_mismatch   IN BOOLEAN  DEFAULT FALSE);
exec dbms_pdb.convert_to_local('UWCLASS', 'TESTPROC', 1);
 
CONVERT_TO_ORACLE_MAINTAINED (new 21c)
Use only in the ADW cloud where some users/roles, which should have been Oracle maintained, was not and needs to be converted in an existing PDB Note: This could be extraordinarily dangerous with patching. Do not use this procedure.
dbms_pdb.convert_to_oracle_maintained(user_name IN VARCHAR2);
CREATE USER c##convert NO AUTHENTICATION;

User created.

SELECT oracle_maintained
FROM dba_users
WHERE username = 'C##CONVERT';

O
-
N


exec dbms_pdb.convert_to_oracle_maintained('C##CONVERT');
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_PDB", line 575
ORA-06512: at line 1


-- A decision has been made not to publish the workaround
 
CREATEX$PERMANENTTABLES
Create permanent tables corresponding to controlfile related Fixed Tables. It should be invoked in ROOT. dbms_pdb.dropx$permanettables;
exec dbms_pdb.createx$permanttables;
 
DESCRIBE
Generates XML that describes tablespaces and datafiles belonging to a pluggable database dbms_pdb.describe(
pdb_descr_file IN VARCHAR2,
pdb_name       IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb.describe('/home/oracle/orabase21_desc.xml', 'TEST21P1');

PL/SQL procedure successfully completed.

host
[oracle@test21 dbhome_1]$ cd /home/oracle
[oracle@test21 ~]$ ls -l *.xml
-rw-r--r-- 1 oracle asmadmin 12273 Mar 27 16:41 orabase21_desc.xml

-- file sample

<?xml version="1.0" encoding="UTF-8"?>
<PDB>
  <xmlversion>1</xmlversion>
  <pdbname>TEST21P1</pdbname>
  <cid>3</cid>
  <byteorder>1</byteorder>
  <vsn>352321536</vsn>
  <vsns>
    <vsnnum>21.0.0.0.0</vsnnum>
    <cdbcompt>21.0.0.0.0</cdbcompt>
    <pdbcompt>21.0.0.0.0</pdbcompt>
    <vsnlibnum>0.0.0.0.25</vsnlibnum>
    <vsnsql>25</vsnsql>
    <vsnbsv>8.0.0.0.0</vsnbsv>
  </vsns>
  <dbid>1823093744</dbid>
  <ncdb2pdb>0</ncdb2pdb>
  <cdbid>2140826538</cdbid>
  <guid>B6355315C77F2BECE0531000000A714D</guid>
  <uscnbas>24580704</uscnbas>
  <uscnwrp>0</uscnwrp>
  <undoscn>293</undoscn>
  <rdba>4194824</rdba>
  <tablespace>
    <name>SYSTEM</name>
    <type>0</type>
    <tsn>0</tsn>
    <status>1</status>
    <issft>0</issft>
    <isnft>0</isnft>
    <encts>0</encts>
    <flags>0</flags>
    <bmunitsize>8</bmunitsize>
    <file>
      <path>+DATA/TEST21DB_IAD25G/B6355315C77F2BECE0531000000A714D/DATAFILE/ system.273.1058897933</path>
      <afn>9</afn>
      <rfn>1</rfn>
      <createscnbas>2059592</createscnbas>
      <createscnwrp>0</createscnwrp>
      <status>1</status>
      <fileblocks>43520</fileblocks>
      <blocksize>8192</blocksize>
      <vsn>352321536</vsn>
      <fdbid>1823093744</fdbid>
      <fcpsb>24283717</fcpsb>
      <fcpsw>0</fcpsw>
      <frlsb>1974499</frlsb>
      <frlsw>0</frlsw>
      <frlt>1058897197</frlt>
      <autoext>129</autoext>
      <maxsize>4194302</maxsize>
      <incsize>1280</incsize>
      <plugscn>0</plugscn>
      <plugafn>0</plugafn>
      <plugdbid>0</plugdbid>
      <dfflags>129</dfflags>
    </file>
  </tablespace>
...
  other tablespaces here
...
  <recover>0</recover>
  <optional>
    <ncdb2pdb>0</ncdb2pdb>
    <csid>873</csid>
    <ncsid>2000</ncsid>
    <options>
      <option>CATALOG=21.0.0.0.0</option>
      <option>CATJAVA=21.0.0.0.0</option>
      <option>CATPROC=21.0.0.0.0</option>
      <option>CONTEXT=21.0.0.0.0</option>
      <option>DV=21.0.0.0.0</option>
      <option>JAVAVM=21.0.0.0.0</option>
      <option>LCTR=21.0.0.0.0</option>
      <option>OLS=21.0.0.0.0</option>
      <option>ORDIM=21.0.0.0.0</option>
      <option>OWM=21.0.0.0.0</option>
      <option>SDO=21.0.0.0.0</option>
      <option>XDB=21.0.0.0.0</option>
      <option>XML=21.0.0.0.0</option>
    </options>
    <olsoid>0</olsoid>
    <dv>0</dv>
    <APEX>NULL</APEX>
    <parameters>
      <parameter>processes=200</parameter>
      <parameter>cpu_count=2</parameter>
      <parameter>_enable_numa_support=FALSE</parameter>
      <parameter>use_large_pages='only'</parameter>
      <parameter>pga_aggregate_limit=3221225472</parameter>
      <parameter>nls_language='AMERICAN'</parameter>
      <parameter>nls_territory='AMERICA'</parameter>
      <parameter>nls_sort='BINARY'</parameter>
      <parameter>filesystemio_options='setall'</parameter>
      <parameter>_file_size_increase_increment=2143289344</parameter>
      <parameter>_disable_interface_checking=TRUE</parameter>
      <parameter>_exadata_feature_on=TRUE</parameter>
      <parameter>db_block_checksum='FULL'</parameter>
      <parameter>db_block_size=8192</parameter>
      <parameter>db_keep_cache_size=33554432</parameter>
      <parameter>db_recycle_cache_size=50331648</parameter>
      <parameter>encrypt_new_tablespaces='ALWAYS'</parameter>
      <parameter>_db_writer_coalesce_area_size=16777216</parameter>
      <parameter>compatible='21.0.0.0'</parameter>
      <parameter>db_files=1024</parameter>
      <parameter>_gc_undo_affinity=TRUE</parameter>
      <parameter>_gc_policy_time=20</parameter>
      <parameter>db_lost_write_protect='TYPICAL'</parameter>
      <parameter>_datafile_write_errors_crash_instance=FALSE</parameter>
      <parameter>db_block_checking='FULL'</parameter>
      <parameter>global_names=TRUE</parameter>
      <parameter>session_cached_cursors=100</parameter>
      <parameter>plsql_code_type='NATIVE'</parameter>
      <parameter>cursor_sharing='EXACT'</parameter>
      <parameter>parallel_execution_message_size=16384</parameter>
      <parameter>_fix_control='18960760:on'</parameter>
      <parameter>sort_area_size=5120</parameter>
      <parameter>open_cursors=1000</parameter>
      <parameter>sql92_security=TRUE</parameter>
      <parameter>parallel_threads_per_cpu=2</parameter>
      <parameter>pga_aggregate_target=1610612736</parameter>
      <parameter>enable_ddl_logging=FALSE</parameter>
      <parameter>enable_pluggable_database=TRUE</parameter>
    </parameters>
    <sqlpatches/>
    <tzvers>
      <tzver>primary version:35</tzver>
      <tzver>secondary version:0</tzver>
    </tzvers>
    <walletkey>0</walletkey>
    <services/>
    <opatches/>
    <hasclob>1</hasclob>
    <awr>
      <loadprofile>CPU used by this session=35.206113</loadprofile>
      <loadprofile>DB time=64.061597</loadprofile>
      <loadprofile>db block changes=503.726802</loadprofile>
      <loadprofile>execute count=532.817181</loadprofile>
      <loadprofile>logons cumulative=0.419969</loadprofile>
      <loadprofile>parse count (hard)=45.575332</loadprofile>
      <loadprofile>parse count (total)=190.241623</loadprofile>
      <loadprofile>physical reads=129.731827</loadprofile>
      <loadprofile>physical writes=0.120331</loadprofile>
      <loadprofile>redo size=96649.039226</loadprofile>
      <loadprofile>session logical reads=5050.117305</loadprofile>
      <loadprofile>user calls=3.118264</loadprofile>
      <loadprofile>user commits=0.642918</loadprofile>
      <loadprofile>user logons cumulative=0.000001</loadprofile>
      <loadprofile>user rollbacks=0.031479</loadprofile>
    </awr>
    <hardvsnchk>0</hardvsnchk>
    <localundo>1</localundo>
    <apps/>
    <dbedition>8</dbedition>
    <dvopsctl>2</dvopsctl>
    <clnupsrcpal>1</clnupsrcpal>
    <getarclog2>1</getarclog2>
    <source_fix_compatibility>3</source_fix_compatibility>
  </optional>
</PDB>
 
DISABLE_MANDPROF_COMPLIANCE (new 21c)
Disables mandatory profile compliance dbms_pdb.disable_mandprof_compliance;
conn sys@pdbdev as sysdba
Password:

exec dbms_pdb.disable_mandprof_compliance;

PL/SQL procedure successfully completed.
 
DROPX$PERMANENTTABLES
Drop permanent tables corresponding to controlfile related Fixed Tables. It should be invoked in ROOT. dbms_pdb.dropx$permanettables;
conn / as sysdba

exec dbms_pdb.dreatex$permanttables;

PL/SQL procedure successfully completed.
 
ENABLE_MANDPROF_COMPLIANCE (new 21c)
Enables mandatory profile compliance dbms_pdb.enable_mandprof_compliance;
conn sys@pdbdev as sysdba
Password:

exec dbms_pdb.enable_mandprof_compliance;

PL/SQL procedure successfully completed.
 
EXEC_AS_ORACLE_SCRIPT
This procedure enables execution of certain restricted statements (most DDLs) on metadata-linked objects, from within a PDB Note: This procedure is called by the package initialization section. This is accomplished by running the statement as an oracle script (i.e. with the parameter _oracle_script set to TRUE). This is for use by Oracle internal packages only.

dbms_pdb.exec_as_oracle_script(sql_stmt IN VARCHAR2);
TBD
 
EXPORT_RMAN_BACKUP
Exports RMAN backup information that belong to the pluggable database to its dictionary before unplug so that pre-plugin backups can be used. The pluggable database has to be opened in read write mode. If the database is non-cdb, then pdb_name must be omitted. If the pdb_name is omitted, then the pluggable database to which the session is connected will be exported. If the pdb_name is omitted, and the session is connected to the Root, an error is returned. dbms_pdb.exportRMANbackup(pdb_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb.exportRMANbackup('TEST21P1');

PL/SQL procedure successfully completed.
 
GENERATE_PARTIAL_LOGS (new 21c)
Generates Partial Archive Logs for all non-spooled online logs dbms_pdb.generate_partial_logs(
partial_log_dest IN VARCHAR2,
remote_dblink    IN VARCHAR2 DEFAULT NULL,
include_fralogs  IN BOOLEAN  DEFAULT FALSE,
copy_fralogs     IN BOOLEAN  DEFAULT TRUE,
copy_dop         IN NUMBER   DEFAULT 16,
force_copy_logs  IN BOOLEAN  DEFAULT FALSE);
TBD
 
IS_VALID_PATH
Checks whether given path_name is corresponding to the path_prefix property dbms_pdb.is_valid_path(path_name IN VARCHAR2) RETURN BOOLEAN;
BEGIN
  IF dbms_pdb.is_valid_path('/u04/app/oracle/oradata/orabase/orabase/uwapp/') THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F
 
NONCDB_TO_PDB
Helper procedure for noncdb_to_pdb.sql dbms_pdb.noncdb_to_pdb(phase IN NUMBER);
exec dbms_pdb.noncdb_to_pdb(1);
exec dbms_pdb.noncdb_to_pdb(1);
 
POPULATESYNCTABLE
Populates pdbsync$ on upgrade from 12.1.0.1. This procedure is intended for use only by internal Oracle scripts dbms_pdb.populatesynctable;
exec dbms_pdb.populatesynctable;

PL/SQL procedure successfully completed.
 
RECOVER
Generates an XML file describing a pluggable database by using data files belonging to the database. The XML file can be used to plug the PDB into a CDB using CREATE PLUGGABLE DATABASE. dbms_pdb.recover(
pdb_descr_file IN VARCHAR2,
pdb_name       IN VARCHAR2,
filenames      IN VARCHAR2);
exec dbms_pdb.recover('/home/oracle/tmp/orabase21_desc.xml', 'ORABASE21', '/u02/app/oracle/oradata/orabase/orabase21/orabase21_temp.dbf');

SQL> exec dbms_pdb.recover('c:\tmp\orabase_desc.xml', 'ORABASE1', 'c\app\oracle\oradata\orabase\orabase1\orabase1_temp.dbf');
BEGIN dbms_pdb.recover('c:\tmp\orabase_desc.xml', 'ORABASE1', 'c\app\oracle\oradata\orabase\orabase1\orabase1_temp.dbf'); END;
      *
ERROR at line 1:
ORA-65128: PDB recover data file name not specified
ORA-06512: at "SYS.DBMS_PDB", line 104
ORA-06512: at line 1
 
SET_DATA_LINKED
Used to mark an object as Data linked in an App Root. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, where there was no support for application containers. dbms_pdb.set_data_linked(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN NUMBER,
edition_name IN VARCHAR2 DEFAULT NULL);
TBD
 
SET_EXT_DATA_LINKED
Use to mark an object as Extended Data linked in an App Root. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, and where there was no support for application containers dbms_pdb.set_ext_data_linked(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN NUMBER,
edition_name IN VARCHAR2 DEFAULT NULL);
TBD
 
SET_METADATA_LINKED
Used to mark an object as Metadata linked in an App Root. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, where there was no support for application containers. dbms_pdb.set_metadata_linked(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN NUMBER,
edition_name IN VARCHAR2 DEFAULT NULL)
TBD
 
SET_PROFILE_EXPLICIT
Used to mark a profile as an explicit Application Common role. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, where there was no support for application containers. When such a PDB or non-CDB is converted into an Application Root via clone or plugin, the profiles would have been marked as implicit Application Common profile. dbms_pdb.set_profile_explicit(profile_name IN VARCHAR2);
BEGIN
  dbms_pdb.set_profile_explicit('MATRIX_PROFILE');
END;
/
 
SET_ROLE_EXPLICIT
Used to mark a role as an explicit Application Common role. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, where there was no support for application containers. When such a PDB or non-CDB is converted into an Application Root via clone or plugin, the roles would have been marked as implicit Application Common roles. dbms_pdb.set_role_explicit(role_name IN VARCHAR2);
BEGIN
  dbms_pdb.set_role_explicit('MATRIX_RO');
END;
/
 
SET_SHARING_NONE
Used to set SHARTING=NONE status on an object in an App Root. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, where there was no support for application containers. dbms_pdb.set_sharing_none(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN NUMBER,
edition_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb.set_sharing_none('UWCLASS', 'SSNONE', 1, 'ORA$BASE');
 
SET_USER_EXPLICIT
Used to mark a user as an explicit Application Common user. It is intended to be used in migration cases where an application was already installed in a PDB or a non-CDB, where there was no support for application containers. When such a PDB or non-CDB is converted into an Application Root via clone or plugin, the users would have been marked as implicit Application Common users. dbms_pdb.set_user_explicit(user_name IN VARCHAR2);
BEGIN
  dbms_pdb.set_user_explicit('MATRIX');
END;
/
 
SYNC_PDB
After plug, syncs the PDB with the CDB, so that it will be ready for use dbms_pdb.sync_pdb;
exec dbms_pdb.sync_pdb;
 
UPDATE_CDBVW_STATS
Updates CDB View Stats and returns 0 if the next scheduled job change time does not need to be changed: N if the next scheduled time should be N seconds from SYSDATE dbms_pdb.update_cdbvw_stats RETURN NUMBER;
set timing on

SELECT dbms_pdb.update_cdbvw_stats
FROM dual;

UPDATE_CDBVW_STATS
------------------
              3600

Elapsed: 00:04:27.10


set timing off
-- will appear to hang the system for a very long time while stats are collected
 
UPDATE_COMDATA_STATS
Update stats for common data views dbms_pdb.update_comdata_stats RETURN NUMBER;
set timing on

SELECT dbms_pdb.update_comdata_stats
FROM dual;

UPDATE_COMDATA_STATS
--------------------
                3600

Elapsed: 00:00:02.64


set timing off
 
UPDATE_DATALINK_STATS
Update Stats for Data Linked Views. Cannot be run from inside a PDB. dbms_pdb.update_datalink_stats RETURN NUMBER;
set timing on

SELECT dbms_pdb.update_datalink_stats
FROM dual;

UPDATE_DATALINK_STATS
---------------------
                 3600


set timing off
 
UPDATE_VERSION
Update PDB's VSN in container$ after upgrade dbms_pdb.update_version;
exec dbms_pdb.update_version;

PL/SQL procedure successfully completed.

Related Topics
Application Containers
Built-in Functions
Built-in Packages
CDBVIEW
Container Database
DBMS_APPLICATION
DBMS_PDB_ALTER_SHARING
DBMS_PDB_APP_CON
DBMS_PDB_EXEC_SQL
DBMS_PDB_IS_VALID_PATH
GET_AUD_PDB_LIST
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