Oracle DBMS_PDB_ALTER_SHARING
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.2 to 12.2.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.

Also important ... there are rumors on the web about SPARC and Solaris being discontinued. Welcome to the age of fake news. There is absolutely not a byte of truth to these irresponsible rumors.
Purpose This package can set a database object to one of the following types of common objects in a PDB: data-linked object, extended data-linked object, or metadata-linked object.

An application can be migrated to CDB$ROOT or to an application PDB. For example, an appllication can be migrated from an application installed in a PDB plugged into a 12.1 CDB to a PDB in a 12.2 CDB.
AUTHID CURRENT_USER
Data Types  
Dependencies
     
     
     
Documented Yes
Exceptions
Error Code Reason
   
First Available 12.2.0.1
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role
Source {ORACLE_HOME}/rdbms/admin/dbmspdb_altshr.sql
Subprograms
 
REMOVE_LINK (new 12.2)
Specifies that a database object is not an application common object. In a PDB, application common objects are shared between multiple containers. dbms_pdb_alter_sharing.remove_link(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN NUMBER,
edition_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb_alter_sharing.remove_link('C##UWCLASS', 'ACCOUNTS', 1, 'ORA$BASE');
 
SET_DATA_LINKED (new 12.2)
Sets a database object to a data-linked common object. In a PDB a data-linked common object stores data in the application root that can be accessed and modified by all of the application PDBs in the application container. dbms_pdb_alter_sharing.set_data_linked(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN VARCHAR2,
edition_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb_alter_sharing.set_data_linked('C##UWCLASS', 'ACCOUNTS', 1);
 
SET_EXT_DATA_LINKED (new 12.2)
Sets a database object to an extended data-linked common object. In a PDB extended data-linked object, each application PDB can create its own specific data while sharing the common data in the application root. Only the data stored in the application root is common for all application PDBs. dbms_pdb_alter_sharing.set_ext_data_linked(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN VARCHAR2,
edition_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb_alter_sharing.set_ext_data_linked('C##UWCLASS','ACCOUNTS', 1);
 
SET_METADATA_LINKED (new 12.2)
Sets a database object to a metadata-linked common object. In a PDB, metadata-linked common objects store the metadata for specific objects, such as tables, so that the containers that share the application common object have the same structure but different data. dbms_pdb_alter_sharing.set_metadata_linked(
schema_name  IN VARCHAR2,
object_name  IN VARCHAR2,
namespace    IN VARCHAR2,
edition_name IN VARCHAR2 DEFAULT NULL);
exec dbms_pdb_alter_sharing.set_metadata_linked('C##UWCLASS','ACCOUNTS', 1);
 
SET_PROFILE_EXPLICIT (new 12.2)
Sets a profile as an application common user in a PDB. This procedure is intended for migrating a user from a previous release to a PDB in the current release and must be invoked in an application install, patch, upgrade, or uninstall operation in an application root. dbms_pdb_alter_sharing.set_profile_explicit(profile_name IN VARCHAR2);
exec dbms_pdb_alter_sharing.set_profile_explicit('C##UWPROF');
 
SET_ROLE_EXPLICIT (new 12.2)
Sets a role as an application common user in a PDB. This procedure is intended for migrating a user from a previous release to a PDB in the current release and must be invoked in an application install, patch, upgrade, or uninstall operation in an application root. dbms_pdb_alter_sharing.set_role_explicit(role_name IN VARCHAR2);
exec dbms_pdb_alter_sharing.set_role_explicit('C##UWROLE');
 
SET_USER_EXPLICIT (new 12.2)
Sets a user as an application common user in a PDB. This procedure is intended for migrating a user from a previous release to a PDB in the current release and must be invoked in an application install, patch, upgrade, or uninstall operation in an application root. dbms_pdb_alter_sharing.set_user_explicit(user_name IN VARCHAR2);
exec dbms_pdb_alter_sharing.set_user_explicit('C##UWCLASS');

Related Topics
Container Database
DBMS_PDB
Edition Based Redefinition
Packages
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