본문 바로가기

Database/Oracle

19 - [Oracle 19C] Oracle Data Dictionary

 

Oracle data dictionary is the metadata about the database .

The data dictionary is structured in tables and views.

Is maintained by oracle database server .

Is owned by SYS user.

Should never modified direct using SQL .

 

 

 

CDB_ & DBA_
Restricted to DBA accounts Users that have :
	Sysdba privileg	
	Select any dictionary privilege
	SELECT_CATALOG_ROLE role


ALL_ & USER_
	available to any user

 

 

 

 

show con_name

select con_id,name,open_mode from v$pdbs;

--make sure that the pluggable database is open
alter pluggable database ORCLPDB open;

--this will show all the tables in the CDB and PDBS
select owner,table_name,con_id from cdb_tables
order by 1,2

--count of tables per container
SELECT con_id, COUNT(table_name)
FROM cdb_tables
GROUP BY con_id


SELECT  COUNT(table_name)
FROM DBA_tables

ALTER session set container=ORCLPDB

show con_name

SELECT  COUNT(table_name)
FROM DBA_tables --2184/2179

alter session set container=cdb$root

show con_name