Re: RMAN Duplicate Errors

  • From: Mohammed Bhatti <mohammed.bhatti1@xxxxxxxxx>
  • To: Ludovico Caldara <ludovico.caldara@xxxxxxxxx>
  • Date: Tue, 14 Oct 2014 14:53:10 -0400

Hi All,

Thanks Ludovico, but I have this set also.  Anyway, update you all on
this.  Dave Barbour shared an excellent write up for this.  I have a very
similar environment and I was going from RAC-to-RAC and ASM-to-ASM but I
also had TDE enabled.  I also opened a support ticket and support provided
me with another document to follow as well (Doc ID: 452868.1).

Since I was having problems trying to get the duplicate command to work on
the same host i.e. target and aux on the same host, I decided to duplicate
to another server (I'm going to be setting up Data Guard anyway so it
didn't matter).

Basically, I followed Dave's doc and the above referenced Doc ID.  Using
dbca, I created a 2-node RAC database (DB02), edited my tnsnames.ora so
that I can connect to both target and auxiliary.  I created a local
listener on both nodes and created an spfile shown below:
*.compatible='11.2.0.3.0'
*.db_name='DB02'
DB021.instance_number=1
DB022.instance_number=2
*.remote_listener='10.10.102.31:1521'
*.local_listener='10.10.102.31:1525'
DB022.thread=2
DB021.thread=1
DB021.undo_tablespace='UNDOTBS1'
DB022.undo_tablespace='UNDOTBS2'

Started up nomount DB02 and shutdown instance on node 2, so that I only
have one instance running on node 1.

Copied the wallet from target to auxiliary and then issued this on
auxiliary (can be run in nomount mode):
alter system set encryption wallet open identified by 'welcome1';

Connected to RMAN as follows:
connect TARGET sys/welcome1@DB01
connect AUXILIARY sys/welcome1@DB02

And then ran the duplicate command:
duplicate target database to 'B02OAM' from active database
DB_FILE_NAME_CONVERT '+DATA/DB01', '+DATA/DB02';

And the result was:
contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 14-OCT-14

RMAN> exit


Recovery Manager complete.


Thanks all for the suggestions, help, and support.

Regards,

--
mohammed


On Tue, Oct 14, 2014 at 10: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: