分享更有价值
被信任是一种快乐

Oracle 12c如何查看CDB&PDBs信息

文章页正文上

这篇文章给大家分享的是有关Oracle 12c如何查看CDB&PDBs信息的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。V$GV$CDB_CONTAINER_DATA的属性决定了对哪些PDB可见;每个容器数据对象都有CON_ID列,列值代表整个CDB可见,1代表root对象,2代表seed对象,3~254代表PDB对象;以下视图的行为不同于其他[G]V$视图:
[G]V$SYSSTAT
[G]V$SYS_TIME_MODEL
[G]V$SYSTEM_EVENT
[G]V$SYSTEM_WAIT_CLASS从root查询时,这些视图返回实例范围的数据,返回的每一行CON_ID列中都有。但是,您可以查询与其他容器数据对象行为相同的等效视图。以下视图可以为CDB中的每个容器返回特定的数据:[G]V$CON_SYSSTAT、[G]V$CON_SYS_TIME_MODEL、[G]V$CON_SYSTEM_EVENT和[G]V$CON_SYSTEM_WAIT_CLASS。Table 43-2 Views for a CDBViewDescriptionContainer data objects, including:l
V$viewsl
GV$viewsl
CDB_viewsl
DBA_HIST*viewsContainer data objects can display information about multiple PDBs. Each container data object includes aCON_IDcolumn to identify containers.There is aCDB_view for each correspondingDBA_view.{CDB|DBA}_PDBSDisplays information about the PDBs associated with the CDB, including the status of each PDB.CDB_PROPERTIESDisplays the permanent properties of each container in a CDB.{CDB|DBA}_PDB_HISTORYDisplays the history of each PDB.{CDB|DBA}_CONTAINER_DATADisplays inform免费主机域名ation about the user-level and object-levelCONTAINER_DATAattributes specified in the CDB.{CDB|DBA}_HIST_PDB_INSTANCEDisplays the PDBs and instances in the Workload Repository.{CDB|DBA}_PDB_SAVED_STATESDisplays information about the current saved PDB states in the CDB.{CDB|DBA}_CDB_RSRC_PLANSDisplays information about all the CDB resource plans.{CDB|DBA}_CDB_RSRC_PLAN_DIRECTIVESDisplays information about all the CDB resource plan directives.PDB_ALERTSContains descriptions of reasons for PDB alerts.PDB_PLUG_IN_VIOLATIONSDisplays information about incompatibilities between a PDB and the CDB to which it belongs. This view is also used to display information generated by executingDBMS_PDB.CHECK_PLUG_COMPATIBILITY.{USER|ALL|DBA|CDB}_OBJECTSDisplays information about database objects, and theSHARINGcolumn shows whether a database object is a metadata-linked object, an object-linked object, or a standalone object that is not linked to another object.{ALL|DBA|CDB}_SERVICESDisplays information about database services, and thePDBcolumn shows the name of the PDB associated with each service.{USER|ALL|DBA|CDB}_VIEWS{USER|ALL|DBA|CDB}_TABLESTheCONTAINER_DATAcolumn shows whether the view or table is a container data object.{USER|ALL|DBA|CDB}_USERSTheCOMMONcolumn shows whether a user is a common user or a local user.{USER|ALL|DBA|CDB}_ROLES{USER|ALL|DBA|CDB}_COL_PRIVS{USER|ALL}_COL_PRIVS_MADE{USER|ALL}_COL_PRIVS_RECD{USER|ALL}_TAB_PRIVS_MADE{USER|ALL}_TAB_PRIVS_RECD{USER|DBA|CDB}_SYS_PRIVS{USER|DBA|CDB}_ROLE_PRIVSROLE_TAB_PRIVSROLE_SYS_PRIVSTheCOMMONcolumn shows whether a role or privilege is commonly granted or locally granted.{USER|ALL|DBA|CDB}_ARGUMENTS{USER|ALL|DBA|CDB}_CLUSTERS{USER|ALL|DBA|CDB}_CONSTRAINTS{ALL|DBA|CDB}_DIRECTORIES{USER|ALL|DBA|CDB}_IDENTIFIERS{USER|ALL|DBA|CDB}_LIBRARIES{USER|ALL|DBA|CDB}_PROCEDURES{USER|ALL|DBA|CDB}_SOURCE{USER|ALL|DBA|CDB}_SYNONYMS{USER|ALL|DBA|CDB}_VIEWSTheORIGIN_CON_IDcolumn shows the ID of the container from which the row originates.[G]V$DATABASEDisplays information about the database from the control file. If the database is a CDB, then CDB-related information is included.[G]V$CONTAINERSDisplays information about the containers associated with the current CDB, including the root and all PDBs.[G]V$PDBSDisplays information about the PDBs associated with the current CDB, including the open mode of each PDB.[G]V$PDB_INCARNATIONDisplays displays information about all PDB incarnations. Oracle creates a new PDB incarnation whenever a PDB is opened with theRESETLOGSoption.[G]V$SYSTEM_PARAMETER[G]V$PARAMETERDisplays information about initialization parameters, and theISPDB_MODIFIABLEcolumn shows whether a parameter can be modified for a PDB.SELECT CDB FROM V$DATABASE;Example 43-2 Viewing Identifying Information About Each Container in a CDBCOLUMN NAME FORMAT A8SELECT NAME, CON_ID, DBID, CON_UID, GUID FROM
V$CONTAINERS
ORDER BY CON_ID;Example 43-3 Viewing Container ID, Name, and Status of Each PDBCOLUMN PDB_NAME FOR免费主机域名MAT A15SELECT PDB_ID, PDB_NAME, STATUS FROM
DBA_PDBS
ORDER BY PDB_ID;COLUMN NAME FORMAT A15COLUMN RESTRICTED FORMAT A10COLUMN OPEN_TIME FORMAT A30SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM
V$PDBS;Example 43-5 Showing the Tables Owned by Specific Schemas in Multiple PDBsCOLUMN PDB_NAME FORMAT A15COLUMN OWNER FORMAT A15COLUMN TABLE_NAME FORMAT A30SELECT p.PDB_ID, p.PDB_NAME, t.OWNER, t.TABLE_NAME FROM
DBA_PDBS
p,
CDB_TABLES
t WHERE p.PDB_ID > 2 AND t.OWNER IN(‘HR’,’OE’) AND p.PDB_ID = t.CON_ID ORDER BY p.PDB_ID;Example 43-6 Showing the Users in Multiple PDBsCOLUMN PDB_NAME FORMAT A15COLUMN USERNAME FORMAT A30SELECT p.PDB_ID, p.PDB_NAME, u.USERNAME FROM
DBA_PDBS
p,
CDB_USERS
u WHERE p.PDB_ID > 2 AND p.PDB_ID = u.CON_ID ORDER BY p.PDB_ID;Example 43-7 Showing the Data Files for Each PDB in a CDBCOLUMN PDB_ID FORMAT 999COLUMN PDB_NAME FORMAT A8COLUMN FILE_ID FORMAT 9999COLUMN TABLESPACE_NAME FORMAT A10COLUMN FILE_NAME FORMAT A45SELECT p.PDB_ID, p.PDB_NAME, d.FILE_ID, d.TABLESPACE_NAME, d.FILE_NAME FROM
DBA_PDBS
p,
CDB_DATA_FILES
d WHERE p.PDB_ID = d.CON_ID ORDER BY p.PDB_ID;Example 43-8 Showing the Temp Files in a CDBCOLUMN CON_ID FORMAT 999COLUMN FILE_ID FORMAT 9999COLUMN TABLESPACE_NAME FORMAT A15COLUMN FILE_NAME FORMAT A45SELECT CON_ID, FILE_ID, TABLESPACE_NAME, FILE_NAME FROM
CDB_TEMP_FILES ORDER BY CON_ID;Example 43-9 Showing the Services Associated with PDBsCOLUMN NETWORK_NAME FORMAT A30COLUMN PDB FORMAT A15COLUMN CON_ID FORMAT 999SELECT PDB, NETWORK_NAME, CON_ID FROM
CDB_SERVICES WHERE PDB IS NOT NULL AND CON_ID > 2 ORDER BY PDB;Example 43-10 Querying a Table Owned by a Common User Across All PDBsExample 43-11 Querying a Table Owned by Local Users Across All PDBsExample 43-12 Returning the Container ID Based on the Container NameExample 43-13 Returning the Container ID Based on the Container DBIDFunctionDescriptionCON_NAME_TO_ID(‘container_name‘)Returns the container ID based on the container’s name.CON_DBID_TO_ID(container_dbid)Returns the container ID based on the container’s DBID.CON_UID_TO_ID(container_uid)Returns the container ID based on the container’s unique identifier (UID).CON_GUID_TO_ID(container_guid)Returns the container ID based on the container’s globally unique identifier (GUID).感谢各位的阅读!关于“Oracle 12c如何查看CDB&PDBs信息”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

相关推荐: 如何绘制好看的数据库基本流程图

这篇文章主要讲解了“如何绘制好看的数据库基本流程图”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“如何绘制好看的数据库基本流程图”吧!创建流程图的方式有很多,若选择用电脑绘制流程图,推荐使用亿图图示软件( Edr…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册