Visit Counter

Wednesday, December 4, 2013

Oracle 12c: Control,Data,Redo log and Temp files in CDB and PDB




[oracle@oracle12c bin]$ ./sqlplus /nolog

SQL*Plus: Release 12.1.0.1.0 Production on Fri Oct 4 01:36:08 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


SQL> conn / as sysdba
Connected.
SQL>    
SQL>
SQL> show con_name



CON_NAME
------------------------------
CDB$ROOT
SQL>
SQL>
SQL> show con_id



CON_ID
------------------------------
1


SQL>
SQL>
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/ora/oracle/app/oracle/oradata/cdb1/system01.dbf
/ora/oracle/app/oracle/oradata/cdb1/sysaux01.dbf
/ora/oracle/app/oracle/oradata/cdb1/undotbs01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdbseed/system01.dbf
/ora/oracle/app/oracle/oradata/cdb1/users01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb2/system01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb2/sysaux01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb2/pdb2_users01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb1/system01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb1/sysaux01.dbf

NAME
--------------------------------------------------------------------------------
/ora/oracle/app/oracle/oradata/cdb1/pdb1/pdb1_users01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb3/system01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb3/sysaux01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb3/pdb3_users01.dbf
/ora/oracle/app/oracle/oradata/cdb1/movefile/userdat.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb1copy/system01.dbf.clone
/ora/oracle/app/oracle/oradata/cdb1/pdb1copy/sysaux01.dbf.clone
/ora/oracle/app/oracle/oradata/cdb1/pdb1copy/pdb1_users01.dbf.clone
/ora/oracle/app/oracle/oradata/cdb1/pdb1copy/userdat.dbf.Clone

20 rows selected.




SQL>
SQL>
SQL> select con_id,name from v$tempfile;

    CON_ID   NAME
--------------------------------------------------------------------------------
1           /ora/oracle/app/oracle/oradata/cdb1/temp01.dbf

2          /ora/oracle/app/oracle/oradata/cdb1/pdbseed/pdbseed_temp01.dbf
   
 3          /ora/oracle/app/oracle/oradata/cdb1/pdb1/temp01.dbf

4         /ora/oracle/app/oracle/oradata/cdb1/pdb2/temp01.dbf

5         /ora/oracle/app/oracle/oradata/cdb1/pdb3/temp01.dbf

6        /ora/oracle/app/oracle/oradata/cdb1/pdb1copy/temp01.dbf.Clone


6 rows selected.

SQL>      
SQL>


SQL> select * from v$controlfile;

STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS  CON_ID
--- ---------- -------------- ----------

/ora/oracle/app/oracle/oradata/cdb1/control01.ctl
NO 16384 1096       0


/ora/oracle/app/oracle/fast_recovery_area/cdb1/control02.ctl
NO 16384 1096       0

STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS  CON_ID
--- ---------- -------------- ----------


SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/ora/oracle/app/oracle/oradata/cdb1/redo03.log
/ora/oracle/app/oracle/oradata/cdb1/redo02.log
/ora/oracle/app/oracle/oradata/cdb1/redo01.log

SQL> alter session set container = pdb1;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
PDB1
SQL> show con_id

CON_ID
------------------------------
3
SQL>
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/ora/oracle/app/oracle/oradata/cdb1/undotbs01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb1/system01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb1/sysaux01.dbf
/ora/oracle/app/oracle/oradata/cdb1/pdb1/pdb1_users01.dbf
/ora/oracle/app/oracle/oradata/cdb1/movefile/userdat.dbf

SQL> select con_id,name from v$tempfile;

    CON_ID
----------
NAME
--------------------------------------------------------------------------------
3
/ora/oracle/app/oracle/oradata/cdb1/pdb1/temp01.dbf


SQL> select * from v$controlfile;

STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS  CON_ID
--- ---------- -------------- ----------

/ora/oracle/app/oracle/oradata/cdb1/control01.ctl
NO 16384 1096       0


/ora/oracle/app/oracle/fast_recovery_area/cdb1/control02.ctl
NO 16384 1096       0

STATUS
-------
NAME
--------------------------------------------------------------------------------
IS_ BLOCK_SIZE FILE_SIZE_BLKS  CON_ID
--- ---------- -------------- ----------


SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/ora/oracle/app/oracle/oradata/cdb1/redo03.log
/ora/oracle/app/oracle/oradata/cdb1/redo02.log
/ora/oracle/app/oracle/oradata/cdb1/redo01.log

SQL>

No comments:

Post a Comment