Re: RMAN Duplicate Errors

  • From: David Barbour <david.barbour1@xxxxxxxxx>
  • To: ludovico.caldara@xxxxxxxxx
  • Date: Tue, 14 Oct 2014 12:40:51 -0500

There are a number of issues I ran into when duplicating an active RAC.
Had to read through a bunch of MOS documents and some blogs to come up with
a repeatable procedure which I've now used successfully without issue 6 or
7 times.

Are you using a scan listener?  What about ASM?

As Ludovico suggested, the ((UR=A) parameter in the tnsnames.ora file was
critical. Make sure you've got this in both the source and destination
tnsnames.ora files

*S00 =*

*  (DESCRIPTION =*

*    (ADDRESS = (PROTOCOL = TCP)(HOST = rchr1t01-vip.lennoxintl.com
<http://rchr1t01-vip.lennoxintl.com>)(PORT = 1521))*

*    (CONNECT_DATA = (SERVICE_NAME = S00)(UR=A)(GLOBAL_NAME = S00)*

*                    (FAILOVER_MODE = (TYPE=SELECT)(METHOD=BASIC))*

*    )*

*  )*



Stop and start the listener on the node or alternatively utilize the *lsnrctl
reload* command.



Check to make sure the S00 instance has registered.  You may have to wait
about 30 seconds or so.



*$ lsnrctl status*



*LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 02-OCT-2013 16:29:42*



*Copyright (c) 1991, 2011, Oracle.  All rights reserved.*



*Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))*
*STATUS of the LISTENER*

------------


*Service "S00" has 2 instance(s).*

*  Instance "S00", status UNKNOWN, has 1 handler(s) for this service...*

*  Instance "S00", status BLOCKED, has 1 handler(s) for this service...*



On Tue, Oct 14, 2014 at 9:05 AM, Ludovico Caldara <
ludovico.caldara@xxxxxxxxx> wrote:

> maybe you've forgot (UR=A) in your tns definition ?
>
>
> 2014-10-14 16:01 GMT+02:00 Mohammed Bhatti <mohammed.bhatti1@xxxxxxxxx>:
>
>> Hi,
>>
>> Seth, my apologizes.  It was a typo.  The password file is named
>> orapwDB021.
>>
>> Ryan, yes I was able to connect via the tns alias to sqlplus and also to
>> rman.  In fact, I was able to both target and auxiliary using the tns alias
>> to both sqlplus and rman.
>>
>> Thanks for the input.
>>
>> --
>> mohammed
>>
>> On Mon, Oct 13, 2014 at 11:18 PM, Seth Miller <sethmiller.sm@xxxxxxxxx>
>> wrote:
>>
>>> Mohammed,
>>>
>>> I'm not sure if it was just a typo, but you said you named your password
>>> file spfileDB021.ora. If so, it will not work. The password file needs
>>> to be named orapwDB021 on the first instance.
>>>
>>> Seth Miller
>>>
>>> On Mon, Oct 13, 2014 at 7:29 PM, Ryan January <rjanuary@xxxxxxxxx>
>>> wrote:
>>>
>>>> Something to remember is that RMAN duplicate is using tns for
>>>> connections between the databases.  Have you verified you can log in to the
>>>> auxiliary from the target host via sqlplus using the same user and tns
>>>> alias?
>>>>
>>>> iPhone. iTypo. iApologize
>>>>
>>>> On Oct 13, 2014, at 4:34 PM, Mohammed Bhatti <
>>>> mohammed.bhatti1@xxxxxxxxx> wrote:
>>>>
>>>> Hi Andrew,
>>>>
>>>> I'm duplicating on the same host but I'll try to copy the password file
>>>> from source to target instead of running the orapwd.
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> mohammed
>>>>
>>>> On Mon, Oct 13, 2014 at 5:29 PM, Andrew Kerber <andrew.kerber@xxxxxxxxx
>>>> > wrote:
>>>>
>>>>> Try copying the password file from your source to your destination.
>>>>>
>>>>> On Mon, Oct 13, 2014 at 3:08 PM, Mohammed Bhatti <
>>>>> mohammed.bhatti1@xxxxxxxxx> wrote:
>>>>>
>>>>>> Hi Scott,
>>>>>>
>>>>>> Yes, I've made sure that they are.  My password files for both
>>>>>> databases also have the same password.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> --
>>>>>> mohammed
>>>>>>
>>>>>> On Mon, Oct 13, 2014 at 4:04 PM, Deas, Scott <Scott.Deas@xxxxxxx>
>>>>>> wrote:
>>>>>>
>>>>>>>  Looking through some old notes (which may or may not be correct),
>>>>>>> the sys passwords for both databases need to be the same.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Scott
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:
>>>>>>> oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Mohammed Bhatti
>>>>>>> *Sent:* Monday, October 13, 2014 3:54 PM
>>>>>>> *To:* oracle-l-freelists
>>>>>>> *Subject:* RMAN Duplicate Errors
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi Folks,
>>>>>>>
>>>>>>> Got a question regarding RMAN duplicate.  I have an 11.2.0.3.0
>>>>>>> 2-node RAC on ASM running on RHEL 5.9.  I'm trying to duplicate this
>>>>>>> database to another 2-node RAC database that I have already created on 
>>>>>>> the
>>>>>>> same server.
>>>>>>>
>>>>>>> My target is DB01 and my auxiliary is DB02.
>>>>>>>
>>>>>>> I did the following steps (numerous times):
>>>>>>>
>>>>>>> Step 1
>>>>>>>
>>>>>>> Create shell db, DB02 using dbca on ASM as a 2-RAC db
>>>>>>>
>>>>>>> Step 2
>>>>>>>
>>>>>>> Backup this db
>>>>>>>
>>>>>>> Step 3
>>>>>>>
>>>>>>> Follow note MOS Note ID: 1076656.1 and change sid name, db_name,
>>>>>>> tnsnames.ora entry and listener.ora to uppercase.
>>>>>>>
>>>>>>> On DB02, change all entries from db021 and db022 to DB021 and DB022
>>>>>>> as suggested by MOS Note ID 1076656.1.  The shutdown my auxiliary DB02 
>>>>>>> and
>>>>>>> create a new spfile:
>>>>>>> create spfile from pfile='initDB02.for_clone.ora'
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Step 4
>>>>>>>
>>>>>>> Run the duplicate command as follows:
>>>>>>> rman target sys/welcome1@db01 auxiliary sys/welcome1@db02
>>>>>>>
>>>>>>> DUPLICATE TARGET DATABASE TO S70OAM FROM ACTIVE DATABASE;
>>>>>>>
>>>>>>>   And here's the snipped output from the above command:
>>>>>>> executing Memory Script
>>>>>>>
>>>>>>> sql statement: alter system set  control_files =
>>>>>>> ''+REDO/db02/controlfile/current.282.860849203'' comment= ''Set by 
>>>>>>> RMAN''
>>>>>>> scope=spfile
>>>>>>>
>>>>>>> sql statement: alter system set  db_name =  ''DB01'' comment=
>>>>>>> ''Modified by RMAN duplicate'' scope=spfile
>>>>>>>
>>>>>>> sql statement: alter system set  db_unique_name =  ''DB02'' comment=
>>>>>>> ''Modified by RMAN duplicate'' scope=spfile
>>>>>>>
>>>>>>> Oracle instance shut down
>>>>>>>
>>>>>>> RMAN-00571:
>>>>>>> ===========================================================
>>>>>>> RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
>>>>>>> ===============
>>>>>>> RMAN-00571:
>>>>>>> ===========================================================
>>>>>>> RMAN-03002: failure of Duplicate Db command at 10/13/2014 12:46:58
>>>>>>> RMAN-06174: not connected to auxiliary database
>>>>>>> RMAN-03015: error occurred in stored script Memory Script
>>>>>>> RMAN-04006: error from auxiliary database: ORA-01031: insufficient
>>>>>>> privileges
>>>>>>>
>>>>>>> RMAN> exit
>>>>>>>
>>>>>>> Here's my tnsnames.ora file:
>>>>>>> DB01 =
>>>>>>>   (DESCRIPTION =
>>>>>>>     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.102.1)(PORT = 1521))
>>>>>>>     (CONNECT_DATA =
>>>>>>>       (SERVER = DEDICATED)
>>>>>>>       (SERVICE_NAME = db01)
>>>>>>>     )
>>>>>>>   )
>>>>>>>
>>>>>>> DB02 =
>>>>>>>   (DESCRIPTION =
>>>>>>>     (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.102.1)(PORT = 1521))
>>>>>>>     (CONNECT_DATA =
>>>>>>>       (SERVER = DEDICATED)
>>>>>>>       (SERVICE_NAME = DB02)
>>>>>>>       (UR=A)
>>>>>>>     )
>>>>>>>   )
>>>>>>>
>>>>>>> Here's my listener.ora from the grid home:
>>>>>>> SID_LIST_LISTENER =
>>>>>>> (SID_LIST =
>>>>>>>         )
>>>>>>>         (SID_DESC =
>>>>>>>                 (GLOBAL_DBNAME = DB02)
>>>>>>>                 (ORACLE_HOME = /u01/app/oracle/product/
>>>>>>> 11.2.0.3/dbhome_1)
>>>>>>>                 (SID_NAME = DB02)
>>>>>>>         )
>>>>>>> )
>>>>>>>
>>>>>>> My password file is named:
>>>>>>> spfileDB021.ora
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Before proceeding with these steps, I was able to connect to both
>>>>>>> DB01 and DB02 using the tnsnames entry DB01 and DB02 e.g.
>>>>>>> sqlplus sys@DB02 as sysdba
>>>>>>>
>>>>>>> rman target sys/welcome1@DB02
>>>>>>>
>>>>>>> Before I open a support ticket, any suggestions as to what I'm doing
>>>>>>> wrong?  Have I missed anything?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> mohammed
>>>>>>>
>>>>>>>  Notice of Confidentiality: **This E-mail and any of its
>>>>>>> attachments may contain
>>>>>>> Lincoln National Corporation proprietary information, which is
>>>>>>> privileged, confidential,
>>>>>>> or subject to copyright belonging to the Lincoln National
>>>>>>> Corporation family of
>>>>>>> companies. This E-mail is intended solely for the use of the
>>>>>>> individual or entity to
>>>>>>> which it is addressed. If you are not the intended recipient of this
>>>>>>> E-mail, you are
>>>>>>> hereby notified that any dissemination, distribution, copying, or
>>>>>>> action taken in
>>>>>>> relation to the contents of and attachments to this E-mail is
>>>>>>> strictly prohibited
>>>>>>> and may be unlawful. If you have received this E-mail in error,
>>>>>>> please notify the
>>>>>>> sender immediately and permanently delete the original and any copy
>>>>>>> of this E-mail
>>>>>>> and any printout. Thank You.**
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Andrew W. Kerber
>>>>>
>>>>> 'If at first you dont succeed, dont take up skydiving.'
>>>>>
>>>>
>>>>
>>>
>>
>

Other related posts: