Monday, December 15, 2014

Rebuilding Standby Database Manually (11g and up)

One of my remote customers has been facing severe network outages between Production and DR sites to reasons unknown and challenges with certain geographic limitations, the bandwidth between sites is limited to 2MBPS and the replication between sites is aching slow. So, Customer has had tentative requirements to rebuild Standby more often between sites until the network issue is fully resolved.

This paper outlines the procedure to rebuild the STANDBY manually provided we have following things in place already between/on sites. And this procedure has a special case for One node RAC, Oracle dynamically applies SID naming convention in case of an online relocation. Due to this fact, I have to mention which SID to export before logging to the Database via SQLPLUS/RMAN/ASMCMD
(PR refers to - Production/Primary and PR1/PR2 are two nodes in RAC,  DR refers to - Disaster Recovery/Standby and DR1/DR2 are two nodes in RAC at DR Site)

  • A working Dataguard Configuration between Sites (All Parameters on both PR and DR)
  • A working Oracle Networking Configuration between sites (including Listener  and TNS)
  • A working RMAN backup
  • A RAC/One Node RAC/Single Node Oracle setup in place
  • ASM
  • Level 1 Skillset Oracle DBA Resource

In case if you would like to know how to configure Dataguard, Please refer to my post


On Production/Primary/PR1/PR2 (oracle os user prompt)

Find which SID is running
$ps -ef|grep pmon

Get the SID name and export it
$export ORACLE_SID=PRDB_1/PRDB_2

Create a directory (create this on DR too and create this on all nodes PR2/DR1/DR2)
$mkdir -p /backup/rman/4standby

Login to RMAN and take the copy of controlfile for STANDBY
$rman target /

Do log switches
RMAN>sql 'alter system switch logfile';
RMAN> sql 'alter system switch logfile';

Take the backup of controlfile for standby and full Database
RMAN>configure device type disk parallelism 10 backup type to backupset;
RMAN>configure channel device type disk format '/backup/rman/4standby/%d_% s_%p_%t';
RMAN>copy current controlfile for standby to '/backup/rman/4standby/standby_PR.ctl';
the above command dumps the controlfile to /backup/rman/4standby, SCP it to DR site to the same location '/backup/rman/4standby/'
RMAN>backup section size 500m as compressed backupset database;
RMAN>exit;

Disable the destination if it's running
$sqlplus / as sysdba
SQL>ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=DEFER SID='*';

Now take a copy of this backup to DR and keep it in the same location '/backup/rman/4standby'


Now we are on DR (DR/Standby/DR1/DR2)(oracle os user prompt)

Start the DR instance (on DR1/DR2)
$srvctl start database -d PRDB -o nomount

Find which SID is running
$ps -ef|grep pmon

Get the SID name and export it
$export ORACLE_SID=PRDBDR_1/PRDBDR_2

Login to RMAN and restore the controlfile and backup
$rman target /
RMAN>restore controlfile from '/backup/rman/4standby/standby_PR.ctl';
RMAN>sql 'alter database mount standby database';
RMAN>catalog start with '/backup/rman/4standby' noprompt';
RMAN>restore database;
RMAN>exit;


On PR at this time(oracle os user prompt)

Enable the destination to ship archivelogs
$sqlplus / as sysdba
SQL>ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SID='*';


On DR at this time (grid os user prompt)

Remove existing STANDBY Logfiles
Login as grid user
Find which ASM instance is running
$ps -ef|grep pmon

Get the ASM instance name and export it
export ORACLE_SID=+ASM1/+ASM2

Login to asmcmd” prompt
asmcmd>cd +PRREDO1/PRDB
asmcmd>rm sr* (Choose “y” on prompt)
asmcmd>cd +PRREDO2/PRDB
asmcmd>rm sr* (Choose “y” on prompt)
asmcmd>exit;

Back to oracle user prompt(oracle os user prompt)
Login to SQLPLUS prompt as SYSDBA
$sqlplus / as sysdba

Recreate Standby Logfiles
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO1/PRDB/srl1.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO2/PRDB/srl2.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO1/PRDB/srl3.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO2/PRDB/srl4.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO1/PRDB/srl5.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO2/PRDB/srl6.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO1/PRDB/srl7.f' SIZE 536870912;
SQL>ALTER DATABASE ADD STANDBY LOGFILE '+PRREDO2/PRDB/srl8.f' SIZE 536870912;

Open the Database in Managed Recovery mode
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;


 Monitor the shipping and logs apply status
SQL>SELECT SEQUENCE#,BLOCK#,PROCESS,STATUS FROM V$MANAGED_STANDBY;


On PR at this time(oracle os user prompt)

Keep monitoring the logs apply status until the the previous sequence to current sequence updated with status "YES" under applied column from the below query
$sqlplus / as sysdba
SQL>SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG WHERE SEQUENCE#=(SELECT MAX(SEQUENCE#) FROM V$ARCHIVED_LOG);

The updated status "YES" for the current log sequence at PR confirms the synchronisation with its DR peer.


On DR at the time(oracle os user prompt)

Enable Active Dataguard mode
$sqlplus / as sysdba
SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL>ALTER DATABASE OPEN READ ONLY;
SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
SQL><Query any application table to monitor the Active transactional SYNC which should match with PR transaction output>

If this has helped you, please do not forget share it and help others.

Good Luck!

Tuesday, February 11, 2014

Oracle Database 12c - Far Sync Instance



A New Standby destination type is allowed in 12c Active Dataguard environment that ensures zero data loss failover and zero performance impact on Primary Database by a new concept called "Far Sync Instance". 


What is Far Sync Instance?
As we knew so far (until 11g), A SYNCHRONOUS redo transport Dataguard configuration impacts the availability and performance of Primary Database in order to protect data loss that happens due to network outages with its Standby Site. To avoid such issues and give benefit of the same zero Data loss to customers at additional cost, Oracle has introduced a new type of Instance called Far Sync Instance.  A Far Sync Instance usually is very close in distance to its Primary Database Network receives the redo synchronously from its Primary partner and then pushes it to its remote Standby Partner, plays a dummy physical standby role that actually fakes its Primary Partner to forget network outages as it takes the responsibility of managing redo to actual Standby targets. As a result of it, It minimises the unplanned downtime and performance issues due to Wider Area Network latencies or simply Network latencies. 


What does it contain?
This destination contains parameterfile, controlfile, and standby redo logs (SRLs), it receives the redo from Primary Database, and archives it to local destination through Standby Redo Logs. There are no Datafiles here. As a result of it, it consumes very little disk and processing resources, yet provides the ability to failover to a terminal destination with zero data loss, as well as offload the primary database of other types of overhead (for example, redo transport).

How to configure?
(Same as configuring Dataguard except backup/restore operations of the Primary Database)
1)Create pfile from spfile of the Primary, and copy to to Far Sync Server, and start the Instance
2)Add the Far Sync Destination, EX: "CDBFS"(Net Service Name/DB_UNIQUE_NAME), to Dataguard configuration (under LOG_ARCHVE_CONFIG=DG_CONFIG)
3)Set a new destination parameter to enable Log Transport Services, EX: LOG_ARCHIVE_DEST_3 & LOG_ARCHIVE_DEST_STATE_3
4)Create the Far Sync Instance Control file, copy it to FSI Server, and mount
SYS@CDB AS SYSDBA 28-OCT-13> ALTER DATABASE CREATE FAR SYNC INSTANCE CONTROLFILE AS '/fra/fsi_control01.ctl';
Database altered.

5)Enable the destination to FSI on Primary

FSI now receives the redo by establishing RFS connections to its primary

Hope it helps, your feedback is appreciated, and thanks for reading..

Monday, October 28, 2013

Oracle Database 12c - What's new with Oracle Dataguard for Physical Standbys? (New Features)

We know Dataguard by far is the industry's utmost reliable DR solution to protect the enterprise data for Oracle Databases. Let me share some of the new features I have learned so far,

Following points to be noted
=>SYSDG Privilege
A special privilege "SYSDG" has been introduced to simplify Dataguard operations.

=>Far Sync Instance
A New Standby destination type is allowed in Active Dataguard environment that ensures zero data loss failover and zero performance impact on Primary Database, is called "Far Sync Instance". This destination contains parameterfile, controlfile, and standby redo logs (SRLs), it receives the redo from Primary Database, and archives it to local destination through Standby Redo Logs. There are no Datafiles here. Technically, A Standby Database Instance without Datafiles is called Far Sync Instance. A far sync instance consumes very little disk and processing resources, yet provides the ability to failover to a terminal destination with zero data loss, as well as offload the primary database of other types of overhead (for example, redo transport).
To setup Far Sync Instance: 
(Same as configuring Dataguard except backup/restore operations of the Primary Database)
1)Create pfile from spfile of the Primary, and copy to to Far Sync Server, and start the Instance
2)Add the Far Sync Destination, EX: "CDBFS"(Net Service Name/DB_UNIQUE_NAME), to Dataguard configuration (under LOG_ARCHVE_CONFIG=DG_CONFIG)
3)Set a new destination parameter to enable Log Transport Services, EX: LOG_ARCHIVE_DEST_3 & LOG_ARCHIVE_DEST_STATE_3
4)Create the Far Sync Instance Control file, copy it to FSI Server, and mount
SYS@CDB AS SYSDBA 28-OCT-13> ALTER DATABASE CREATE FAR SYNC INSTANCE CONTROLFILE AS '/fra/control01.ctl';
Database altered.
5)FSI can now receive the redo by enabling its destination on primary

=>Maximum Availability mode now allows SYNC mode with "NOAFFIRM" transport, i.e., A redo reception only acknowledgment is delivered by Standby to Primary in order to receive the next synchronous redo, but no longer requires an acknowledgement for redo commit on Standby thus reduces the performance overhead on Primary Database but maybe at the cost of some data loss.
=>There is no difference in configuring Dataguard and creating a Physical Standby for a Multitenant hosted CDB Database, which is same as Non CDB Database. We require to login to the root container and backup the whole Database that includes ROOT, SEED, and all PLUGGABLE Databases.

=>All DDL SQL's for recovery, role transitions etc.. can only be executed on ROOT Container.
For Example:
SYS@CDBDR AS SYSDBA 28-OCT-13> ALTER SESSION SET CONTAINER=PDB;
Session altered.
SYS@CDBDR AS SYSDBA 28-OCT-13> SELECT SYS_CONTEXT ('USERENV', 'CON_NAME') FROM DUAL;
SYS_CONTEXT('USERENV','CON_NAME')
--------------------------------------------------------------------------------
PDB
SYS@CDBDR AS SYSDBA 28-OCT-13> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database

=>A Role transition(Switchover/Failover/Snapshots Standby etc..) is applicable to the entire CDB.

=>A PDB can also be opened in READ ONLY mode on Standby irrespective of its state on Primary.

For Example:
On Primary (CDB):
SYS@CDB AS SYSDBA 28-OCT-13>  select name,open_mode from v$pdbs;
NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB             MOUNTED
SYS@CDB AS SYSDBA 28-OCT-13> alter pluggable database pdb open;
Pluggable database altered.
SYS@CDB AS SYSDBA 28-OCT-13> select name,open_mode from v$pdbs;
NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB       READ WRITE

On Standby (CDBDR):
SYS@CDBDR AS SYSDBA 28-OCT-13>  select name,open_mode from v$pdbs;
NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB       READ ONLY
SYS@CDBDR AS SYSDBA 28-OCT-13> alter pluggable database pdb close;
Pluggable database altered.
SYS@CDBDR AS SYSDBA 28-OCT-13> select name,open_mode from v$pdbs;
NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB       MOUNTED

=>Now switchover possibility can be verified by means of ALTER command.
For Example:
SYS@CDB AS SYSDBA 28-OCT-13> ALTER DATABASE SWITCHOVER TO CDBDR VERIFY;
Database altered.
In Alert log:
SWITCHOVER VERIFY: Send VERIFY request to switchover target CDBDR
SWITCHOVER VERIFY COMPLETE
If it returns "Database altered" message, it means switchover target is available to take over the desired role.
Let's cancel the redo apply on Standby and verify on Primary what it returns
On Standby:
SYS@CDBDR AS SYSDBA 28-OCT-13> alter database recover managed standby database cancel;
Database altered.
On Primary:
SYS@CDB AS SYSDBA 28-OCT-13>  ALTER DATABASE SWITCHOVER TO CDBDR VERIFY;
 ALTER DATABASE SWITCHOVER TO CDBDR VERIFY
*
ERROR at line 1:
ORA-16470: Redo Apply is not running on switchover target
It means Switchover target is not ready to takeover

=>Now Switchover operation is more simplified.
To Switchover
1)Verify the Switchover possibility as explained above
2)Switchover
On Primary (Make it Physical Standby)
SYS@CDB AS SYSDBA 28-OCT-13> ALTER DATABASE SWITCHOVER TO CDBDR;
Database altered.
On Standby
SYS@CDBDR AS SYSDBA 28-OCT-13> ALTER DATABASE OPEN;
Database altered.
On Primary
SYS@CDB AS SYSDBA 28-OCT-13> STARTUP
ORACLE instance started.
Total System Global Area  417546240 bytes
Fixed Size     2289064 bytes
Variable Size   255853144 bytes
Database Buffers   155189248 bytes
Redo Buffers     4214784 bytes
Database mounted.
Database opened.
SYS@CDB AS SYSDBA 28-OCT-13>  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.
On Standby
SYS@CDBDR AS SYSDBA 28-OCT-13> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;
System altered.

=>DML operations on Temporary tables now permitted on Standby Database in Active Dataguard mode and also use of sequences.

I will keep this updated as I keep learning myself, please feel free to leave the feedback or ask any questions.

Monday, July 1, 2013

Oracle Database 12c New Features Explained - RMAN with Multitenant Architecture

RMAN is the beauty of Oracle Backup and Recovery architecture, has changed completely the way backups work and unlimited so many possibilities. We saw so many enhancements by Oracle with each version from Compression of Backups to Handling block corruption. And, 12c is no exception for that. 

In this post, I would like to discuss about new enhancements made to RMAN as part of changes influenced by the Oracle Database Architecture like Multitenant Architecture.

Let's start with Multitenant Architecture, Please refer to my blog post to know more about it.

Backup and Recovery of Pluggable Databases

  • "SYSBACKUP" is the new privilege or user that has been introduced in 12c to perform RMAN Backup and Recovery Operations, no more SYSDBA privilege is required for a specific user to perform Backup operations. "SYSBACKUP" has two roles assigned "SELECT_CATALOG_ROLE" and "HS_ADMIN_SELECT_ROLE"
  • "BACKUP PLUGGABLE DATABASE" is the new command introduced to backup PDBs, it works the same way as "BACKUP DATABASE". It backs up all specified PDB Database files, Control File, and SPFILE of the CDB
  • "BACKUP DATABASE" command can also be used when we make a direct connection to PDB instead of ROOT Container. When we supply "RMAN TARGET /", Oracle makes connection to ROOT Container with SYS user. As we knew, It requires an exclusive service name to establish a connection to a PDB via SQL* Net services such as TNS based applications or Oracle Protocol Adapters or TCP/IP. 
  • "BACKUP DATABASE ROOT;" backs up the ROOT Container. "BACKUP DATABASE 'PDB$SEED';" backs up SEED Database
  • To backup Multiple PDBs, "BACKUP PLUGGABLE DATABASE <PDB1>,<PDB2>.....;"
  • Backing up TABLESPACES and DATAFILES in a CDB environment is similar to Non CDB. "BACKUP TABLESPACE and BACKUP DATAFILE" commands are used to accomplish the task, we just need to make sure that we have connected to the specific Container to which the tablespace or datafile belongs to
  • "RESTORE PLUGGABLE DATABASE" and "RECOVER PLUGGABLE DATABASE" are used to perform a Complete/Incomplete PDB Recovery [or] "RESTORE DATABASE" and "RECOVER DATABASE" are used when connected to PDB
  • "RESTORE TABLESPACE" and "RECOVER TABLESPACE" or "RESTORE DATAFILE" and "RECOVER DATAFILE" can also be used to perform a specific tablespace or datafile recovery of a PDB
  • Cross platform Transport of a Non CDB or Pluggable Database (PDB) or the whole CDB is possible by means of RMAN Cross platform BACKUP and RESTORE, "BACKUP FOR TRANSPORT PLUGGABLE DATABASE PDB;" or "BACKUP TO PLATFORM "platforn name" DATABASE;"  is used to backup the whole database to transport to a different platform of same endian format(Big, little etc...).  Please check  V$TRANSPORTABLE_PLATFORM for more information. The PDB or the Whole CDB to be transported for backup must be in "OPEN READ ONLY" mode. Restoring the backup of Cross platform Database is similar to Standard Restore
  • Duplicating a Pluggable Database and the Whole Container Database is supported by RMAN by adding PLUGGABLE DATABASE Clause to the DUPLICATE Syntax. Example demonstrated in this post is a Container to Container Database Duplication in which Oracle restores the ROOT, SEED, and specified PDB to the AUXILIARY DESTINATION. Please refer to the example for more information

Note : "BACKUP DATABASE;" on root container backs up the whole container includes SEED Container and PDBs

Examples

1) Authenticating with "SYSBACKUP":

Direct SYSBACKUP Authentication

[oracle@ora12c ~]$ rman target '"/ as sysbackup"'
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jul 1 22:52:29 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
connected to target database: CONDB (DBID=1075048777)

RMAN> BACKUP DATAFILE 1;

Starting backup at 01-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
.............................................................................................
.............................................................................................
.............................................................................................
Starting Control File and SPFILE Autobackup at 01-JUL-13
piece handle=/backup/CONDB/c-1075048777-20130701-0e comment=NONE
Finished Control File and SPFILE Autobackup at 01-JUL-13

Authenticating with SYSBACKUP Privileged user
[oracle@ora12c CONDB]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 1 22:37:32 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> CREATE USER C##BACKUPADMIN IDENTIFIED BY 123;
User created.

SQL> GRANT SYSBACKUP TO C##BACKUPADMIN;
Grant succeeded.

SQL> !rman target C##BACKUPADMIN 
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jul 1 22:38:07 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
target database Password: 
connected to target database: CONDB (DBID=1075048777)
RMAN> BACKUP DATAFILE 8;
Starting backup at 01-JUL-13
using target database control file instead of recovery catalog
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 01-JUL-13
............................................................................................
.............................................................................................
.............................................................................................
Starting Control File and SPFILE Autobackup at 01-JUL-13
piece handle=/backup/CONDB/c-1075048777-20130701-0d comment=NONE
Finished Control File and SPFILE Autobackup at 01-JUL-13

2) Backup of Pluggable Database (PDB)

On ROOT Container connection, Using "BACKUP PLUGGABLE DATABASE" 
[oracle@ora12c ~]$ rman target /
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jul 1 17:11:07 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
connected to target database: CONDB (DBID=1075048777)

RMAN> BACKUP PLUGGABLE DATABASE PDB PLUS ARCHIVELOG;

OR

On PDB Connection itself, Using "BACKUP DATABASE" on PDB
[oracle@ora12c ~]$ rman target sys@PDB
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jul 1 17:35:59 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
target database Password: 
connected to target database: CONDB (DBID=1075048777)
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Output
Starting backup at 01-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=58 device type=DISK
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 01-JUL-13
Starting backup at 01-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/dbs/CONDB/PDB/sysaux01.dbf
input datafile file number=00011 name=/dbs/CONDB/PDB/example01.dbf
input datafile file number=00008 name=/dbs/CONDB/PDB/system01.dbf
input datafile file number=00019 name=/dbs/CONDB/PDB/root_cdb_01.dbf
input datafile file number=00022 name=/dbs/CONDB/PDB/ts_pdb_01.dbf
input datafile file number=00010 name=/dbs/CONDB/PDB/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: starting piece 1 at 01-JUL-13
channel ORA_DISK_1: finished piece 1 at 01-JUL-13
piece handle=/backup/CONDB/CONDB_47_819653777_CONDB tag=TAG20130701T173617 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 01-JUL-13
Starting backup at 01-JUL-13
using channel ORA_DISK_1
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 01-JUL-13
Starting Control File and SPFILE Autobackup at 01-JUL-13
piece handle=/backup/CONDB/c-1075048777-20130701-03 comment=NONE

Finished Control File and SPFILE Autobackup at 01-JUL-13

3) Restore and Recovery of Pluggable Database (PDBs)

Recover one of the PDBs System Datafile
I have deliberately removed system datafile for testing the recovery of a pluggable database 'PDB'. Below errors occur when trying to make a connection to PDB and "Checker run found 1 new persistent data failures" can be seen in the alert log

SQL> ALTER SESSION SET CONTAINER=PDB;
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 8
ORA-01110: data file 8: '/dbs/CONDB/PDB/system01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

[oracle@ora12c PDB]$ rman target /
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jul 1 20:59:44 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
connected to target database: CONDB (DBID=1075048777)

RMAN> SHUTDOWN ABORT;
using target database control file instead of recovery catalog
Oracle instance shut down

RMAN> STARTUP NOMOUNT;
connected to target database (not started)
Oracle instance started
Total System Global Area    1269366784 bytes
Fixed Size                     2287912 bytes
Variable Size                452986584 bytes
Database Buffers             805306368 bytes
Redo Buffers                   8785920 bytes

RMAN> ALTER DATABASE MOUNT;
Statement processed

RMAN> REPORT SCHEMA;
Report of database schema for database with db_unique_name CONDB
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    790      SYSTEM               ***     /dbs/CONDB/system01.dbf
3    740      SYSAUX               ***     /dbs/CONDB/sysaux01.dbf
4    760      UNDOTBS1             ***     /dbs/CONDB/undotbs01.dbf
5    250      PDB$SEED:SYSTEM      ***     /dbs/CONDB/pdbseed/system01.dbf
6    5        USERS                ***     /dbs/CONDB/users01.dbf
7    590      PDB$SEED:SYSAUX      ***     /dbs/CONDB/pdbseed/sysaux01.dbf
8    0        PDB:SYSTEM           ***     /dbs/CONDB/PDB/system01.dbf
9    630      PDB:SYSAUX           ***     /dbs/CONDB/PDB/sysaux01.dbf
10   5        PDB:USERS            ***     /dbs/CONDB/PDB/SAMPLE_SCHEMA_users01.dbf
11   357      PDB:EXAMPLE          ***     /dbs/CONDB/PDB/example01.dbf
15   260      SALESPDB:SYSTEM      ***     /dbs/CONDB/salespdb/system01.dbf
16   620      SALESPDB:SYSAUX      ***     /dbs/CONDB/salespdb/sysaux01.dbf
17   250      SALESPDB:SALES       ***     /dbs/CONDB/salespdb/sales01.dbf
19   50       PDB:ROOT_CDB         ***     /dbs/CONDB/PDB/root_cdb_01.dbf
22   10       PDB:TS_PDB           ***     /dbs/CONDB/PDB/ts_pdb_01.dbf
23   260      PDB1:SYSTEM          ***     /dbs/CONDB/PDB1/system01.dbf
24   620      PDB1:SYSAUX          ***     /dbs/CONDB/PDB1/sysaux01.dbf
25   250      PDB1:PDB1            ***     /dbs/CONDB/PDB1/PDB01.dbf
38   790      ORA12C:SYSTEM        ***     /dbs/CONDB/ORA12C/system01.dbf
39   700      ORA12C:SYSAUX        ***     /dbs/CONDB/ORA12C/sysaux01.dbf
40   5        ORA12C:USERS         ***     /dbs/CONDB/ORA12C/users01.dbf
41   358      ORA12C:EXAMPLE       ***     /dbs/CONDB/ORA12C/example01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    60       TEMP                 32767       /dbs/CONDB/temp01.dbf
2    20       PDB$SEED:TEMP        32767       /dbs/CONDB/pdbseed/pdbseed_temp01.dbf
3    28       PDB:TEMP             32767       /dbs/CONDB/PDB/PDB_temp01.dbf
4    20       SALESPDB:TEMP        32767       /dbs/CONDB/salespdb/pdbseed_temp01.dbf
5    20       PDB1:TEMP            32767       /dbs/CONDB/PDB1/pdbseed_temp01.dbf
6    60       ORA12C:TEMP          32767       /dbs/CONDB/ORA12C/temp01.dbf

RMAN> RESTORE DATAFILE 8;
Starting restore at 01-JUL-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00008 to /dbs/CONDB/PDB/system01.dbf
channel ORA_DISK_1: reading from backup piece /backup/CONDB/CONDB_88_819662940_CONDB
channel ORA_DISK_1: piece handle=/backup/CONDB/CONDB_88_819662940_CONDB tag=TAG20130701T200740
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 01-JUL-13

RMAN> RECOVER DATAFILE 8;
Starting recover at 01-JUL-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 01-JUL-13

RMAN> SQL 'ALTER DATABASE OPEN';
sql statement: ALTER DATABASE OPEN

RMAN> SQL 'ALTER PLUGGABLE DATABASE PDB OPEN';
sql statement: ALTER PLUGGABLE DATABASE PDB OPEN

4) Backup for Transporting Pluggable Database

On PDB Container
[oracle@ora12c ~]$ rman target sys@PDB
Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jul 1 23:13:11 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
target database Password: 
connected to target database: CONDB (DBID=1075048777)

RMAN> BACKUP TO PLATFORM "Solaris Operating System (x86-64)";

On ROOT Container
[oracle@ora12c ~]$ rman target /
RMAN> BACKUP TO PLATFORM "Solaris Operating System (x86-64)" PLUGGABLE DATABASE;

Output
Starting backup at 01-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=70 device type=DISK
............................................................................................
.............................................................................................
.............................................................................................
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
Finished backup at 01-JUL-13


5) Duplicating a Pluggable Database

CONDB - SOURCE Database (TARGET)
AUXDB - DESTINATION Database (AUXILIARY)


[oracle@ora12c AUXDB]$ rman target sys@CONDB auxiliary sys@AUXDB
Recovery Manager: Release 12.1.0.1.0 - Production on Tue Jul 2 01:40:28 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
target database Password: 
connected to target database: CONDB (DBID=1075048777)
auxiliary database Password: 
connected to auxiliary database: AUXDB (not mounted)

RMAN> RUN
{
SET NEWNAME FOR DATABASE TO '/dbs/AUXDB/%U';
DUPLICATE TARGET DATABASE TO AUXDB PLUGGABLE DATABASE PDB FROM ACTIVE DATABASE NOFILENAMECHECK;
}2> 3> 4> 5> 

executing command: SET NEWNAME

Starting Duplicate Db at 02-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
current log archived

contents of Memory Script:
{
   sql clone "alter system set  db_name = 
 ''CONDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''AUXDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone from service  'CONDB' primary controlfile;
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''CONDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''AUXDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     417546240 bytes

Fixed Size                     2289064 bytes
Variable Size                255853144 bytes
Database Buffers             155189248 bytes
Redo Buffers                   4214784 bytes

Starting restore at 02-JUL-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/dbs/AUXDB/control01.ctl
output file name=/fra/AUXDB/control02.ctl
Finished restore at 02-JUL-13

database mounted
Skipping pluggable database SALESPDB
Skipping pluggable database PDB1
Skipping pluggable database ORA12C
Automatically adding tablespace SYSTEM
Automatically adding tablespace SYSAUX
Automatically adding tablespace PDB$SEED:SYSTEM
Automatically adding tablespace PDB$SEED:SYSAUX
Automatically adding tablespace UNDOTBS1
Skipping tablespace USERS

contents of Memory Script:
{
   set newname for datafile  1 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1";
   set newname for datafile  3 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3";
   set newname for datafile  4 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4";
   set newname for datafile  5 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5";
   set newname for datafile  7 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7";
   set newname for datafile  8 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8";
   set newname for datafile  9 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9";
   set newname for datafile  10 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10";
   set newname for datafile  11 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11";
   set newname for datafile  19 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19";
   set newname for datafile  22 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22";
   restore
   from service  'CONDB'   clone database
   skip forever tablespace  "USERS",
 "SALESPDB":"SYSTEM",
 "SALESPDB":"SYSAUX",
 "SALESPDB":"SALES",
 "PDB1":"SYSTEM",
 "PDB1":"SYSAUX",
 "PDB1":"PDB1",
 "ORA12C":"USERS",
 "ORA12C":"SYSTEM",
 "ORA12C":"SYSAUX",
 "ORA12C":"EXAMPLE"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 02-JUL-13
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to /dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00008 to /dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00009 to /dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00010 to /dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00011 to /dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00019 to /dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00022 to /dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 02-JUL-13

sql statement: alter system archive log current
current log archived

contents of Memory Script:
{
   restore clone force from service  'CONDB' 
           archivelog from scn  2616072;
   switch clone datafile all;
}
executing Memory Script

Starting restore at 02-JUL-13
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=21
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=22
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 02-JUL-13

datafile 1 switched to datafile copy
input datafile copy RECID=18 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1
datafile 3 switched to datafile copy
input datafile copy RECID=19 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3
datafile 4 switched to datafile copy
input datafile copy RECID=20 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4
datafile 5 switched to datafile copy
input datafile copy RECID=21 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5
datafile 7 switched to datafile copy
input datafile copy RECID=22 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7
datafile 8 switched to datafile copy
input datafile copy RECID=23 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8
datafile 9 switched to datafile copy
input datafile copy RECID=24 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9
datafile 10 switched to datafile copy
input datafile copy RECID=25 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10
datafile 11 switched to datafile copy
input datafile copy RECID=26 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11
datafile 19 switched to datafile copy
input datafile copy RECID=27 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19
datafile 22 switched to datafile copy
input datafile copy RECID=28 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22

contents of Memory Script:
{
   set until scn  2616267;
   recover
   clone database
   skip forever tablespace  "USERS",
 "SALESPDB":"SYSTEM",
 "SALESPDB":"SYSAUX",
 "SALESPDB":"SALES",
 "PDB1":"SYSTEM",
 "PDB1":"SYSAUX",
 "PDB1":"PDB1",
 "ORA12C":"USERS",
 "ORA12C":"SYSTEM",
 "ORA12C":"SYSAUX",
 "ORA12C":"EXAMPLE"    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 02-JUL-13
using channel ORA_AUX_DISK_1

Executing: alter database datafile 6 offline drop
Executing: alter database datafile 15 offline drop
Executing: alter database datafile 16 offline drop
Executing: alter database datafile 17 offline drop
Executing: alter database datafile 23 offline drop
Executing: alter database datafile 24 offline drop
Executing: alter database datafile 25 offline drop
Executing: alter database datafile 40 offline drop
Executing: alter database datafile 38 offline drop
Executing: alter database datafile 39 offline drop
Executing: alter database datafile 41 offline drop
starting media recovery

archived log for thread 1 with sequence 21 is already on disk as file /fra/AUXDB/archivelog/2013_07_02/o1_mf_1_21_8x3rpf5j_.arc
archived log for thread 1 with sequence 22 is already on disk as file /fra/AUXDB/archivelog/2013_07_02/o1_mf_1_22_8x3rpg7h_.arc
archived log file name=/fra/AUXDB/archivelog/2013_07_02/o1_mf_1_21_8x3rpf5j_.arc thread=1 sequence=21
archived log file name=/fra/AUXDB/archivelog/2013_07_02/o1_mf_1_22_8x3rpg7h_.arc thread=1 sequence=22
media recovery complete, elapsed time: 00:00:00
Finished recover at 02-JUL-13
Oracle instance started

Total System Global Area     417546240 bytes

Fixed Size                     2289064 bytes
Variable Size                255853144 bytes
Database Buffers             155189248 bytes
Redo Buffers                   4214784 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name = 
 ''AUXDB'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
}
executing Memory Script

sql statement: alter system set  db_name =  ''AUXDB'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance started

Total System Global Area     417546240 bytes

Fixed Size                     2289064 bytes
Variable Size                255853144 bytes
Database Buffers             155189248 bytes
Redo Buffers                   4214784 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUXDB" RESETLOGS ARCHIVELOG 
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES     1024
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   1  SIZE 50 M ,
  GROUP   2  SIZE 50 M ,
  GROUP   3  SIZE 50 M 
 DATAFILE
  '/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1',
  '/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5',
  '/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8'
 CHARACTER SET WE8MSWIN1252


contents of Memory Script:
{
   set newname for tempfile  1 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-1";
   set newname for tempfile  2 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-2";
   set newname for tempfile  3 to 
 "/dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-3";
   switch clone tempfile all;
   catalog clone datafilecopy  "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3", 
 "/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4", 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7", 
 "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9", 
 "/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10", 
 "/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11", 
 "/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19", 
 "/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-1 in control file
renamed tempfile 2 to /dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-2 in control file
renamed tempfile 3 to /dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-3 in control file

cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3 RECID=1 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4 RECID=2 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7 RECID=3 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9 RECID=4 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10 RECID=5 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11 RECID=6 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19 RECID=7 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22 RECID=8 STAMP=819682999

datafile 3 switched to datafile copy
input datafile copy RECID=1 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3
datafile 4 switched to datafile copy
input datafile copy RECID=2 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4
datafile 7 switched to datafile copy
input datafile copy RECID=3 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7
datafile 9 switched to datafile copy
input datafile copy RECID=4 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9
datafile 10 switched to datafile copy
input datafile copy RECID=5 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10
datafile 11 switched to datafile copy
input datafile copy RECID=6 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11
datafile 19 switched to datafile copy
input datafile copy RECID=7 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19
datafile 22 switched to datafile copy
input datafile copy RECID=8 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Executing: drop pluggable database "SALESPDB"
Executing: drop pluggable database "PDB1"
Executing: drop pluggable database "ORA12C"

contents of Memory Script:
{
   sql clone "alter pluggable database all open";
}
executing Memory Script

sql statement: alter pluggable database all open
Dropping offline and skipped tablespaces
Executing: alter database default tablespace system
Executing: drop tablespace "USERS" including contents cascade constraints
Finished Duplicate Db at 02-JUL-13

To verify:
SQL> SELECT NAME,CDB,OPEN_MODE FROM V$DATABASE;

NAME  CDB OPEN_MODE
--------- --- --------------------
AUXDB  YES READ WRITE

SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME       OPEN_MODE
------------------------------ ----------
PDB$SEED       READ ONLY
PDB       READ WRITE



Thanks for checking my blog, Hope it helps. Please stay tuned for more articles on 12c in coming weeks, add me to your G+ Circles!! Your feedback always helps me and motivates me to blog more, please leave your valuable comment that is always a pleasure to read.

Regards