After creating the PDB as shown in the previous post, I created the Order Entry schema using Swingbench.
Below we will see the how the control files, data files, redo log files, and the temp files are used by the CDB (testdb) and the PDB (testdb1)
Next we change the session container to the PDB (testdb1).
Below we will see the how the control files, data files, redo log files, and the temp files are used by the CDB (testdb) and the PDB (testdb1)
-bash-3.2$ echo $ORACLE_SID testdb -bash-3.2$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Tue Oct 29 09:22:28 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> show con_id CON_ID ------------------------------ 1 SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u02/app/oracle/oradata/testdb/system01.dbf /u02/app/oracle/oradata/testdb/sysaux01.dbf /u02/app/oracle/oradata/testdb/undotbs01.dbf /u02/app/oracle/oradata/testdb/pdbseed/system01.dbf /u02/app/oracle/oradata/testdb/users01.dbf /u02/app/oracle/oradata/testdb/pdbseed/sysaux01.dbf /u02/app/oracle/oradata/testdb/testdb1/system01.dbf /u02/app/oracle/oradata/testdb/testdb1/sysaux01.dbf /u02/app/oracle/oradata/testdb/testdb1/testdb1_users01.dbf /u02/app/oracle/product/12.1.0/dbhome_1/dbs/soe.dbf 10 rows selected. SQL> select con_id,name from v$tempfile; CON_ID ---------- NAME -------------------------------------------------------------------------------- 1 /u02/app/oracle/oradata/testdb/temp01.dbf 2 /u02/app/oracle/oradata/testdb/pdbseed/pdbseed_temp01.dbf 3 /u02/app/oracle/oradata/testdb/testdb1/temp01.dbf SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- /u02/app/oracle/oradata/testdb/control01.ctl /u02/app/oracle/fast_recovery_area/testdb/control02.ctl SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- /u02/app/oracle/oradata/testdb/redo03.log /u02/app/oracle/oradata/testdb/redo02.log /u02/app/oracle/oradata/testdb/redo01.log SQL> |
Next we change the session container to the PDB (testdb1).
SQL> ALTER SESSION SET CONTAINER =testdb1; Session altered. SQL> show con_name CON_NAME ------------------------------ TESTDB1 SQL> show con_id CON_ID ------------------------------ 3 SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u02/app/oracle/oradata/testdb/undotbs01.dbf /u02/app/oracle/oradata/testdb/testdb1/system01.dbf /u02/app/oracle/oradata/testdb/testdb1/sysaux01.dbf /u02/app/oracle/oradata/testdb/testdb1/testdb1_users01.dbf /u02/app/oracle/product/12.1.0/dbhome_1/dbs/soe.dbf SQL> select con_id,name from v$tempfile; CON_ID ---------- NAME -------------------------------------------------------------------------------- 3 /u02/app/oracle/oradata/testdb/testdb1/temp01.dbf SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- /u02/app/oracle/oradata/testdb/control01.ctl /u02/app/oracle/fast_recovery_area/testdb/control02.ctl SQL> select member from v$logfile; MEMBER -------------------------------------------------------------------------------- /u02/app/oracle/oradata/testdb/redo03.log /u02/app/oracle/oradata/testdb/redo02.log /u02/app/oracle/oradata/testdb/redo01.log SQL> |
No comments:
Post a Comment