Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Application Containers Features of Oracle 12c R2 version (2)

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Yang Yuhang of Worldwide Technology

The creation of Application Root/PDBs and the maintenance of "Application" were explained in the previous Oracle 12c R2 version of Application Containers feature (1). This article will introduce "Application Common Objects", that is, common objects.

Public objects are shared objects created by users under the Application Container feature, and can only be created in Application Root and shared with Application PDB. There are three types of public objects to choose from: METADATA-LINKED, DATA-LINKED, and EXTENDED DATA-LINKED.

METADATA-LINKED: share the metadata of public objects to Application PDB. You cannot view the data stored by public objects in Application root. Local data can be inserted in Appliation PDB.

DATA-LINKED: share the metadata and data of common objects to Application PDB. In Appliation PDB, you can only query the data stored by public objects in Application root, and you cannot DML them or insert local data.

EXTENDED DATA-LINKED: share the metadata and data of common objects to Application PDB. You can query the data stored by public objects in Application root in Application PDB. You cannot perform DML operations on the data stored in Application root, but local data can be inserted in Application PDB. EXTENDED DATA-LIKED is more like a combination of METADATA-LIKED and DATA LIKED.

The following is a comparison table of metadata and data storage locations for different types of common objects:

There are two ways to specify shared properties, the first using the system parameter default_sharing, and the other by specifying a type clause of SHARING in the CREATE statement (which overrides the default_sharing parameter).

Here are the choices for shared properties:

METADATA

DATA

EXTENDED DATA

NONE

Objects in the following databases can be created as public objects:

Analytic views

Attribute dimensions

Directories

External procedure libraries

Hierarchies

Java classes, Java resources, Java sources

Packages

Object tables

Object types

Object views

Sequences

Stored functions

Stored procedures

Synonyms

Tables (including temporary tables)

Triggers

Views

For the objects listed above, you can specify METADATA or NONE options at creation time, while DATA/EXTENDED DATA can only be specified when the following objects are created:

Table (excluding object type tables): METADATA, DATA, EXTENDED DATA

Views (excluding object views): METADATA, DATA, EXTENDED DATA

Sequences:METADATA, DATA, NONE

The following tests will show the differences between different sharing methods through a table

Install Application:qd_reg1 in qdatacon1:

DATA-LINKED Typ

Create the table t _ data for sharing=data and end the installation of qd_reg1:

Synchronize QD _ reg1 in qdcpdb1:

Insert data into t_data in qdatacon1:

Query t_data within qdcpdb1:

View the execution plan information for querying t_data in qdcpdb1:

The above execution plan is based on DATA LINK FULL.

Delete/insert the table in qdcpdb1:

Object data of type data liked is stored in Application root and cannot be DML operated on within Application PDB.

Query the rowid information of the data within qdcpdb1:

METADATA LIKED Typ

Create a table of type sharing=metadata t_meta:

Synchronize qd_reg1 within qdcpdb1:

Insert data in qdatacon1:

Query within qdcpdb1:

The metadata liked type only shares metadata to the Application PDB, and cannot query the data stored in the Application Root by the shared object within the Application PDB.

Insert data into t_meta in qdcpdb1:

Query the rowid information of t_meta data within qdcpdb1:

The data is stored locally and ROWID is available.

View the execution plan:

The above execution plan goes to TABLE ACCESS FULL.

Delete data in qdcpdb1:

EXTENDED DATA Typ

Create a table of type sharing=extended data t_exte:

Synchronize within qdcpdb1:

Insert data in qdatacon1:

Query and delete data in qdcpdb1:

Data stored by public objects in Application root can be accessed in qdcpdb1, but DML cannot be performed on it.

Insert data in qdcpdb1:

0 QBackup is stored in Application root and 1 QMonitor is stored locally.

Query the rowid information of the data within qdcpdb1:

T_exte truncate the table in qdcpdb1:

Only the local data truncate is dropped here.

View the execution plan:

The above execution plan goes to EXTENDED DATA LINK.

Here is only a demonstration of TABLE, about the sharing of other objects in a similar way, not in the demonstration.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report