Home » RDBMS Server » Backup & Recovery » RMAN duplicate with standby as target (11.2.0.4)
RMAN duplicate with standby as target [message #656084] Thu, 22 September 2016 03:38 Go to next message
smac
Messages: 16
Registered: August 2013
Junior Member
When using the standby as the target database and cloning to a dev database on another server do you have to take the standby out of recovery mode ?
Can you also clone across and use NOREDO
duplicate target database to DEV from active database noredo;

When I try action it fails after control file creation to restart auxiliary database with invalid username/password but it has already connected to auxiliary to start in nomount and copy control files.

confused
Re: RMAN duplicate with standby as target [message #656091 is a reply to message #656084] Thu, 22 September 2016 06:42 Go to previous messageGo to next message
EdStevens
Messages: 850
Registered: September 2013
Senior Member
It would be very helpful if you would actually show us the full, complete, and exact set of rman commands that you are using and full, complete, and exact messages that are returned.
Re: RMAN duplicate with standby as target [message #656092 is a reply to message #656084] Thu, 22 September 2016 06:49 Go to previous messageGo to next message
John Watson
Messages: 7150
Registered: January 2010
Location: Global Village
Senior Member
This,
Quote:
but it has already connected to auxiliary to start in nomount and copy control files.
is not what happened. RMAN did not start the instance in nomount mode, you did that yourself before launching the DUPLICATE. Then RMAN discovered the problem awhen doing the re-start.
You need to to copy the password file from the target to the auxiliary.
Re: RMAN duplicate with standby as target [message #656094 is a reply to message #656092] Thu, 22 September 2016 07:56 Go to previous messageGo to next message
smac
Messages: 16
Registered: August 2013
Junior Member
Sorry guys here is the script and output from the duplication


rman<<EOF
CONNECT TARGET sys/xxxxxxx
CONNECT AUXILIARY sys/xxxxxx@rep11g
startup clone nomount force;
RUN {
DUPLICATE TARGET DATABASE TO rep11g FROM ACTIVE DATABASE spfile NOREDO;
}
EOF



Recovery Manager: Release 11.2.0.4.0 - Production on Wed Sep 21 10:00:11 2016

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

RMAN>
connected to target database: LIVE11G (DBID=1605590372, not open)

RMAN>
connected to auxiliary database: REP11G (DBID=3308390279)

RMAN>
Oracle instance started

Total System Global Area 8551575552 bytes

Fixed Size 2270360 bytes
Variable Size 4362079080 bytes
Database Buffers 4177526784 bytes
Redo Buffers 9699328 bytes

RMAN> 2> 3>
Starting Duplicate Db at 21-SEP-16
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=770 device type=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: SID=10 device type=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: SID=771 device type=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: SID=11 device type=DISK

contents of Memory Script:
{
sql clone "alter system set db_name =
''LIVE11G'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''REP11G'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
backup as copy current controlfile auxiliary format '/u01/oradata/rep11g/rep 11g_control01.ctl';
restore clone controlfile to '/u02/oradata/rep11g/rep11g_control02.ctl' from
'/u01/oradata/rep11g/rep11g_control01.ctl';
alter clone database mount;
}
executing Memory Script

sql statement: alter system set db_name = ''LIVE11G'' comment= ''Modified by R MAN duplicate'' scope=spfile

sql statement: alter system set db_unique_name = ''REP11G'' comment= ''Modifie d by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area 8551575552 bytes

Fixed Size 2270360 bytes
Variable Size 4362079080 bytes
Database Buffers 4177526784 bytes
Redo Buffers 9699328 bytes

Starting backup at 21-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=632 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=15 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=631 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=20 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
Oracle instance started

Total System Global Area 8551575552 bytes

Fixed Size 2270360 bytes
Variable Size 4362079080 bytes
Database Buffers 4177526784 bytes
Redo Buffers 9699328 bytes

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

sql statement: alter system set db_name = ''REP11G'' comment= ''Reset to origi nal value by RMAN'' scope=spfile

sql statement: alter system reset db_unique_name scope=spfile

Oracle instance shut down
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/21/2016 10:00:35
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/21/2016 10:00: 27
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-01017: invalid username/password; logon denied
ORA-17629: Cannot connect to the remote database server

RMAN>

Recovery Manager complete.
Re: RMAN duplicate with standby as target [message #656119 is a reply to message #656094] Fri, 23 September 2016 06:41 Go to previous messageGo to next message
EdStevens
Messages: 850
Registered: September 2013
Senior Member
Check these items:

Target has tnsnames entry to clone. Show us the tnsnames.ora entry for 'rep11g' from the machine hosting your "target" (source) database.

clone has static registration in it listener. Show us the output of 'lsnrctl status' on the machine hosting rep11g.
Re: RMAN duplicate with standby as target [message #656120 is a reply to message #656094] Fri, 23 September 2016 06:58 Go to previous messageGo to next message
John Watson
Messages: 7150
Registered: January 2010
Location: Global Village
Senior Member
THe easiest solution might be to run the rman executable from the Oracle Home of the auxiliary, and connect to it with operating system authentication:

rman target sys/xxxxxxx@live11g auxiliary /
duplicate database....


Re: RMAN duplicate with standby as target [message #656144 is a reply to message #656119] Sat, 24 September 2016 08:55 Go to previous message
EdStevens
Messages: 850
Registered: September 2013
Senior Member
EdStevens wrote on Fri, 23 September 2016 06:41
Check these items:

Target has tnsnames entry to clone. Show us the tnsnames.ora entry for 'rep11g' from the machine hosting your "target" (source) database.

clone has static registration in it listener. Show us the output of 'lsnrctl status' on the machine hosting rep11g.
By way of explanation ....
1) With DUPLICATE DATABASE .. FROM ACTIVE DATABASE , the target has to communicate directly with the aux, so you have to have tns connectivity between the two.

2) Because the aux is being shutdown and restarted (multiple times, as a matter of fact) it needs to be statically registered with the listener (SID_LIST ...)
Previous Topic: rman back up advice/question
Next Topic: RMAN Restore failed
Goto Forum:
  


Current Time: Thu Nov 23 06:48:14 CST 2017

Total time taken to generate the page: 0.01841 seconds