RMAN Active Duplication Auxilary fails…Or: When The Listener Stops Hearing!?

Last time when I needed to do a (relatively) speedy duplicate, I decided to use the relativly new duplicate method in Oracle 11G made available by the fine folks of Oracle..but soon could forget the “speedy” part..

I followed all the steps of the active duplicate, but every-time RMAN shutdown the duplicate database, the listener lost the connection and RMAN couldn’t reach the duplicate instance anymore, giving me the dreaded message:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/28/2014 10:35:10
RMAN-06174: not connected to auxiliary database
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

What had I done?

I tried to duplicate from the target ST0 to ST2 no rocked science here.

I created this database entry in the TNSNames.ora:

ST2 =
(DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = db-scan)(PORT = 1521))
     (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = st2)
     (UR = A)
  )
)
ST0 =
(DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = db-scan)(PORT = 1521))
     (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = st0)
     (UR = A)
  )
)

And I created a static listener object in the listener.ora:

SID_LIST_LISTENER=
  (SID_LIST=
     (SID_DESC=
        (GLOBAL_DBNAME=st2)
        (SID_NAME=st2)
        (ORACLE_HOME=/oracle/base/dbhome01/)
)
     (SID_DESC=
        (GLOBAL_DBNAME=st0)
        (SID_NAME=cst0)
        (ORACLE_HOME=/oracle/base/dbhome01/)
      )
)

But still…It kept giving me this message..

It took me a while to figure out what the issue was…

Duplicating from an active database DOES NOT WORK when connecting to an CLUSTER/SCAN adress! Looking closely to the tnsnames.ora, the host I’m connecting to is the SCAN name of the oracle RAC One node. I’m not really sure the how and why, but it seems the registration of the database to the Local Listener and the SCAN listener is not really working as I expected it would..

The new tnsnames.ora is now:

ST2 =
(DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = db-host)(PORT = 1521))
     (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = st2)
     (UR = A)
  )
)
ST0 =
(DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = db-host)(PORT = 1521))
     (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = st0)
     (UR = A)
  )
)

When I changed the tnsnames.ora entry to the local instance (and not scan host) I got rid of the error and the active duplicate could continue.

As a very light summary, these are the duplicate steps I took:

Created a pfile for the ST2 instance, handling the name conversions and cluster=false stuff
$ export ORACLE_SID=st2
$orapwd file=st2 password=secret
$sqlplus / as sysdba
sql> create spfile from pfile='/oracle/base/dbhome01/initst2.ora';
sql>startup nomount;
rman  target sys/secret@st0 auxiliary sys/secret@st2
rman> duplicate target to st2 from active database;

I hope it saves you some time..and frustration..

Advertisements

About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Databases, Technical Stuff and tagged , . Bookmark the permalink.

8 Responses to RMAN Active Duplication Auxilary fails…Or: When The Listener Stops Hearing!?

  1. Good job !
    It saved me a lot of time and frustration.

  2. This indeed helped me today! Thanks for this 🙂

  3. Chandan says:

    You Save me Man, Cheers

  4. Leszek Konopka says:

    You need to register static service for scan listener. SID_LIST_LISTENER_SCAN1,2 or 3 depends which one is running on the node there standby/clone is created.

    • I’m not sure it’s entirely clear to me what you mean, but I assume you know what you are talking about, so I put this out there for the readers who can only benefit from the information given.

      Sir, thank you for your contribution, I appreciate this!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s