Monday, June 23, 2014

RMAN-05558: Must specify DB_UNIQUE_NAME with FOR STANDBY clause

[oracle@ol6-112-rac2 rman]$ rman target="sys/sys123@ol6rac1" auxiliary="sys/sys123@ol6rac2"

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jun 23 16:09:54 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NEW12CDB (DBID=3192639891)
connected to auxiliary database: NEW12CDB (not mounted)

RMAN> @ rman_dupicate_standby.cmd

RMAN> duplicate  database 'new12cdb' for standby
2> from active database
3> dorecover
4> spfile
5> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
6> set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
7> db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb';
Starting Duplicate Db at 23-JUN-14
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/23/2014 16:10:02
RMAN-05501: aborting duplication of target database
RMAN-05558: Must specify DB_UNIQUE_NAME with FOR STANDBY clause

RMAN> **end-of-file**

Resolution:-
Include db_unique_name in the set clause of duplicate statement

Script:-
duplicate  database 'new12cdb' for standby
from active database
dorecover
spfile
set db_unique_name='ol6rac2'
set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb';


Output of script execution:-

oracle@ol6-112-rac2 rman]$ rman target="sys/sys123@ol6rac1" auxiliary="sys/sys123@ol6rac2"

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jun 23 16:19:01 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NEW12CDB (DBID=3192639891)
connected to auxiliary database: NEW12CDB (not mounted)

RMAN> @ rman_dupicate_standby.cmd

RMAN> duplicate  database 'new12cdb' for standby
2> from active database
3> dorecover
4> spfile
5> set db_unique_name='ol6rac2'
6> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
7> set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
8> db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb';
Starting Duplicate Db at 23-JUN-14
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:
{
   backup as copy reuse
   targetfile  '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb' auxiliary format
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb_dup'   ;
   restore clone from service  'ol6rac1' spfile to
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora';
   sql clone "alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora''";
}
executing Memory Script

Starting backup at 23-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=57 device type=DISK
Finished backup at 23-JUN-14

No comments: