본문 바로가기

Database/Oracle

28 - [Oracle 19C] V$TABLESPACE vs cdb_tablespaces

 

 

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 ORCLPDB			  MOUNTED


SQL> alter pluggable database orclpdb open;

Pluggable database altered.


SQL> select tablespace_name,block_size,status,contents,con_id from cdb_tablespaces;

TABLESPACE BLOCK_SIZE STATUS	CONTENTS		  CON_ID
---------- ---------- --------- --------------------- ----------
SYSTEM		 8192 ONLINE	PERMANENT		       1
SYSAUX		 8192 ONLINE	PERMANENT		       1
UNDOTBS1	 8192 ONLINE	UNDO			       1
TEMP		 8192 ONLINE	TEMPORARY		       1
USERS		 8192 ONLINE	PERMANENT		       1
SYSTEM		 8192 ONLINE	PERMANENT		       3
SYSAUX		 8192 ONLINE	PERMANENT		       3
UNDOTBS1	 8192 ONLINE	UNDO			       3
TEMP		 8192 ONLINE	TEMPORARY		       3
USERS		 8192 ONLINE	PERMANENT		       3

10 rows selected.


SQL> select * from V$TABLESPACE;

       TS# NAME 			  INC BIG FLA ENC     CON_ID
---------- ------------------------------ --- --- --- --- ----------
	 1 SYSAUX			  YES NO  YES		   1
	 0 SYSTEM			  YES NO  YES		   1
	 2 UNDOTBS1			  YES NO  YES		   1
	 4 USERS			  YES NO  YES		   1
	 3 TEMP 			  NO  NO  YES		   1
	 0 SYSTEM			  YES NO  YES		   2
	 1 SYSAUX			  YES NO  YES		   2
	 2 UNDOTBS1			  YES NO  YES		   2
	 3 TEMP 			  NO  NO  YES		   2
	 0 SYSTEM			  YES NO  YES		   3
	 1 SYSAUX			  YES NO  YES		   3
	 2 UNDOTBS1			  YES NO  YES		   3
	 3 TEMP 			  NO  NO  YES		   3
	 5 USERS			  YES NO  YES		   3

14 rows selected.


SQL> alter session set container=orclpdb;

Session altered.


SQL> select tablespace_name,block_size,status,contents,con_id from cdb_tablespaces;

TABLESPACE BLOCK_SIZE STATUS	CONTENTS		  CON_ID
---------- ---------- --------- --------------------- ----------
SYSTEM		 8192 ONLINE	PERMANENT		       3
SYSAUX		 8192 ONLINE	PERMANENT		       3
UNDOTBS1	 8192 ONLINE	UNDO			       3
TEMP		 8192 ONLINE	TEMPORARY		       3
USERS		 8192 ONLINE	PERMANENT		       3



SQL> select tablespace_name,block_size,status,contents from dba_tablespaces;

TABLESPACE BLOCK_SIZE STATUS	CONTENTS
---------- ---------- --------- ---------------------
SYSTEM		 8192 ONLINE	PERMANENT
SYSAUX		 8192 ONLINE	PERMANENT
UNDOTBS1	 8192 ONLINE	UNDO
TEMP		 8192 ONLINE	TEMPORARY
USERS		 8192 ONLINE	PERMANENT



SQL> select * from V$TABLESPACE;

       TS# NAME 			  INC BIG FLA ENC     CON_ID
---------- ------------------------------ --- --- --- --- ----------
	 0 SYSTEM			  YES NO  YES		   3
	 1 SYSAUX			  YES NO  YES		   3
	 2 UNDOTBS1			  YES NO  YES		   3
	 3 TEMP 			  NO  NO  YES		   3
	 5 USERS			  YES NO  YES		   3