bash-4.1$ rman target /
Recovery Manager: Release 11.2.0.1.0 – Production on Wed Apr 29 05:54:19 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: MASTER (DBID=2934831228)
RMAN> CONNECT AUXILIARY sys/oracle@standby
connected to auxiliary database: WHATEVER (not mounted)
RMAN> run {
2> allocate channel prmy1 type disk;
3> allocate channel prmy2 type disk;
4> allocate channel prmy3 type disk;
5> allocate channel prmy4 type disk;
6> allocate channel prmy5 type disk;
7> allocate auxiliary channel stby1 type disk;
8> duplicate target database for standby from active database
9> spfile
10> parameter_value_convert ‘master’,’standby’
set ‘db_unique_name’=’standby’
11> 12> set control_files=’+FLASH/standby/controlfile/control.ctl’
13> set db_create_file_dest=’+DATA’
14> set db_create_online_log_dest_1=’+FLASH’
15> set db_create_online_log_dest_2=’+DATA’
16> set db_recovery_file_dest=’+FLASH’
17> set DB_RECOVERY_FILE_DEST_SIZE=’10G’
18> nofilenamecheck;
19> }
using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=149 device type=DISK
allocated channel: prmy2
channel prmy2: SID=19 device type=DISK
allocated channel: prmy3
channel prmy3: SID=151 device type=DISK
allocated channel: prmy4
channel prmy4: SID=10 device type=DISK
allocated channel: prmy5
channel prmy5: SID=147 device type=DISK
allocated channel: stby1
channel stby1: SID=96 device type=DISK
Starting Duplicate Db at 29-APR-15
contents of Memory Script:
{
backup as copy reuse
targetfile ‘/u01/app/oracle/product/11.2.0/db1/dbs/orapwmaster’ auxiliary format
‘/u01/app/oracle/product/11.2.0/db1/dbs/orapwstandby’ targetfile
‘/u01/app/oracle/product/11.2.0/db1/dbs/spfilemaster.ora’ auxiliary format
‘/u01/app/oracle/product/11.2.0/db1/dbs/spfilestandby.ora’ ;
sql clone “alter system set spfile= ”/u01/app/oracle/product/11.2.0/db1/dbs/spfilestandby.ora””;
}
executing Memory Script
Starting backup at 29-APR-15
Finished backup at 29-APR-15
sql statement: alter system set spfile= ”/u01/app/oracle/product/11.2.0/db1/dbs/spfilestandby.ora”
contents of Memory Script:
{
sql clone “alter system set audit_file_dest =
”/u01/app/oracle/admin/standby/adump” comment=
”” scope=spfile”;
sql clone “alter system set dispatchers =
”(PROTOCOL=TCP) (SERVICE=standbyXDB)” comment=
”” scope=spfile”;
sql clone “alter system set log_archive_dest_1 =
”LOCATION=/u02/archive/standby VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=master” comment=
”” scope=spfile”;
sql clone “alter system set db_unique_name =
”standby” comment=
”” scope=spfile”;
sql clone “alter system set control_files =
”+FLASH/standby/controlfile/control.ctl” comment=
”” scope=spfile”;
sql clone “alter system set db_create_file_dest =
”+DATA” comment=
”” scope=spfile”;
sql clone “alter system set db_create_online_log_dest_1 =
”+FLASH” comment=
”” scope=spfile”;
sql clone “alter system set db_create_online_log_dest_2 =
”+DATA” comment=
”” scope=spfile”;
sql clone “alter system set db_recovery_file_dest =
”+FLASH” comment=
”” scope=spfile”;
sql clone “alter system set DB_RECOVERY_FILE_DEST_SIZE =
10G comment=
”” scope=spfile”;
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set audit_file_dest = ”/u01/app/oracle/admin/standby/adump” comment= ”” scope=spfile
sql statement: alter system set dispatchers = ”(PROTOCOL=TCP) (SERVICE=standbyXDB)” comment= ”” scope=spfile
sql statement: alter system set log_archive_dest_1 = ”LOCATION=/u02/archive/standby VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=master” comment= ”” scope=spfile
sql statement: alter system set db_unique_name = ”standby” comment= ”” scope=spfile
sql statement: alter system set control_files = ”+FLASH/standby/controlfile/control.ctl” comment= ”” scope=spfile
sql statement: alter system set db_create_file_dest = ”+DATA” comment= ”” scope=spfile
sql statement: alter system set db_create_online_log_dest_1 = ”+FLASH” comment= ”” scope=spfile
sql statement: alter system set db_create_online_log_dest_2 = ”+DATA” comment= ”” scope=spfile
sql statement: alter system set db_recovery_file_dest = ”+FLASH” comment= ”” scope=spfile
sql statement: alter system set DB_RECOVERY_FILE_DEST_SIZE = 10G comment= ”” scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
released channel: prmy1
released channel: prmy2
released channel: prmy3
released channel: prmy4
released channel: prmy5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 04/29/2015 05:55:19
RMAN-03015: error occurred in stored script Memory Script
RMAN-04014: startup failed: ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
Issue: as part of physical standby configuration, I did not create audit file directory in standby machine and thus this failure.
Solution:
@Primary database named “master”
SQL> sho parameter audit_file_dest
NAME TYPE VALUE
———————————— ———– ——————————
audit_file_dest string /u01/app/oracle/admin/master/adump
@Standby database machine name “standby”
-bash-4.1$ mkdir -p /u01/app/oracle/admin/standby/adump
It worked.