This discussion is archived
9 Replies Latest reply: Dec 19, 2012 11:08 PM by Omega3 RSS

Listener configuration in standby side before running the RMAN DUPLICATE

Omega3 Newbie
Currently Being Moderated
Version: 11.2.0.3
Platfomrm : Solaris 10

We are going to create a physical standby DB for our primary DB using RMAN Duplicate.

Our primary DB details
DB_NAME          = ADPTGMS
DB_UNIQUE_NAME     = ADPTGMS
Planned names for standby
DB_NAME          = ADPTGMS
DB_UNIQUE_NAME     = ADPTGMSDG
Question1.
At the standby side, before I run the RMAN Duplicate, I need to startup the empty instance in NOMOUNT state. Right ? Should I set export ORACLE_SID to DB_NAME or DB_UNIQUE_NAME ?

Question2.


I gather that it is a pre-requisite to have the listener up in standby side to do the RMAN Duplicate (otherwise how will RMAN connect to the dummy instance in the standy side )
At standby side , there is no DB running yet. But for the RMAN to connect to the dummy Instance, I've configured and started a listener as shown below. Is this fine ?
$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER_DG =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.80.16.179)(PORT = 1524 ))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2012))
    )
  )
$
$
$
$ lsnrctl start LISTENER_DG

LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 20-DEC-2012 00:14:19

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

Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Solaris: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/tigris179/listener_dg/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.80.16.179)(PORT=1524)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2012)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.80.16.179)(PORT=1524)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_DG
Version                   TNSLSNR for Solaris: Version 11.2.0.3.0 - Production
Start Date                20-DEC-2012 00:14:24
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/tigris179/listener_dg/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.80.16.179)(PORT=1524)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC2012)))
The listener supports no services
The command completed successfully
  • 1. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    mseberg Guru
    Currently Being Moderated
    Hello;

    Assuming active duplication :

    Question1.
    At the standby side, before I run the RMAN Duplicate, I need to startup the empty instance in NOMOUNT state. Right ? Should I set export ORACLE_SID to DB_NAME or DB_UNIQUE_NAME ?
    NOMOUNT , ORACLE_SID

    Question2.
    
    I gather that it is a pre-requisite to have the listener up in standby side to do the RMAN Duplicate (otherwise how will RMAN connect to the dummy instance in the standy side )
    At standby side , there is no DB running yet. But for the RMAN to connect to the dummy Instance, I've configured and started a listener as shown below. Is this fine ?
    No. You are missing the static entry
    Primary
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.2/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    LISTENER =
        (DESCRIPTION_LIST =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
          )
        )
    
    SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
          (global_dbname = PRIMARY_DGMGRL.hostname)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = PRIMARY)
        )
    )
    
    Standby
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.2/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    
    LISTENER =
        (DESCRIPTION_LIST =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
          )
        )
    
    SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
          (global_dbname = STANDBY_DGMGRL.hostname)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = STANDBY)
          )
          (SID_DESC =
          (global_dbname = STANDBY.hostname)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = STANDBY)
    )
    
    Notice hard-coded network entries for the auxiliary database.
    
    This is key for the RMAN connection later.
    
    (SID_DESC =
        (global_dbname = STANDBY.hostname)
        (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
        (sid_name = STANDBY)
    )
    
    Stopping and starting the listener is a good idea.
    Best Regards

    mseberg
  • 2. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    CKPT Guru
    Currently Being Moderated
    Have you tried register service with the listener once?

    SQL> alter system register;

    and then check the status of the listener and also add entry of LOCAL_LISTENER in pfile/spfile.
  • 3. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    Omega3 Newbie
    Currently Being Moderated
    Thank you mseberg, Ckpt

    Regarding ur answer to my Question1.
    For starting up the auxillary instance at the standby side, Should I set DB_NAME or DB_UNIQUE_NAME for ORACLE_SID env variable ?


    Regarding ur answer to my Question2.
    For SID_NAME parameter in the SID_LIST setting in the listener.ora, Should I set DB_NAME or DB_UNIQUE_NAME of the standby ?
    What about global_dbname ?

    SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
          (global_dbname = XXXXXX)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = XXXX)
          )
          (SID_DESC =
          (global_dbname = XXXXX)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = XXXX)
    )
  • 4. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    mseberg Guru
    Currently Being Moderated
    Hello;

    It should be NOMOUNT, ORACLE_SID for question 1.

    From my notes :
    With the Primary database up start the Standby NOMOUNT
    
    SQL> startup nomount
    
    Start RMAN and issue duplicate command
    
    $ORACLE_HOME/bin/rman target=sys/@primary auxiliary=sys/@standby
    
    RMAN>duplicate target database for standby from active database NOFILENAMECHECK;
    For question two it will depend how the global name was set. When I create the primary I add the hostname, so I did the same for the standby.

    Does that make sense?

    (SID_DESC =
           (global_dbname = STANDBY.myhost.name)
           (ORACLE_HOME = /u01/app/oracle/product/11.2.0.3)
           (sid_name = STANDBY)
        )
    Best Regards

    mseberg
  • 5. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    CKPT Guru
    Currently Being Moderated
    Regarding ur answer to my Question1.
    For starting up the auxillary instance at the standby side, Should I set DB_NAME or DB_UNIQUE_NAME for ORACLE_SID env variable ?
    DB_NAME is mandatory to set, You can set DB_UNIQUE_NAME now or later after restore/duplicate.
    and of course you must set ORACLE_SID before starting auxiliary instance to "NOMOUNT" else how oracle knows to start which instance?
    Regarding ur answer to my Question2.
    For SID_NAME parameter in the SID_LIST setting in the listener.ora, Should I set DB_NAME or DB_UNIQUE_NAME of the standby ?
    What about global_dbname ?

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (global_dbname = XXXXXX)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
    (sid_name = XXXX)
    )
    (SID_DESC =
    (global_dbname = XXXXX)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
    (sid_name = XXXX)
    )
    DB_NAME, DB_UNIQUE_NAME parameters are specific to configuration file(PFILE/SPFILE), You can set either SID_NAME/SERVICE_NAME in Listener.ora file.
  • 6. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    Shivananda Rao Guru
    Currently Being Moderated
    Hello,
    Regarding ur answer to my Question1.
    For starting up the auxillary instance at the standby side, Should I set DB_NAME or DB_UNIQUE_NAME for ORACLE_SID env variable ?
    Why would you opt to set the ORACLE_SID at the time of starting the auxiliary instance ? Add a static entry to the listener.ora file, have a TNS entry setup for the Auxiliary instance and connect to the auxiliary instance using the "Oracle Net Service Name". Make sure you add the TNS entry of both Primary and the auxiliary instance in the TNSNAMES.ORA file of both primary and auxiliary servers.

    Take a look at this http://shivanandarao.wordpress.com/2012/03/10/creating-physical-standby-database-on-oracle-11g/

    Regards,
    Shivananda
  • 7. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    Omega3 Newbie
    Currently Being Moderated
    For my question1 (which is not related to listener.ora )
    I just wanted to know what ORACLE_SID shell variable I should set in Standby site when I am starting
    the auxillary instance in NOMOUNT state

    Should it be using DB_NAME of primary
    export ORACLE_SID=ADPTGMS
    
    sqlplus / as sysdba
    
    startup nomount pfile=initADPTGMS.ora
    or Should it be using DB_UNIQUE_NAME planned for standby
    export ORACLE_SID=ADPTGMSDG
    
    sqlplus / as sysdba
    
    startup nomount pfile=initADPTGMSDG.ora
    From CKPT's post, I gather that it should be
    export ORACLE_SID=ADPTGMS
    
    sqlplus / as sysdba
    
    startup nomount pfile=initADPTGMS.ora
    Regarding my question2 on Static listener entry for standby listener. for SID_NAME and global_dbname parameters, I am going
    to use the DB_NAME of the primary DB. So, it would look like

    SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
          (global_dbname = ADPTGMS.domain.com)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0.2)
          (sid_name = ADPTGMS)
         ))
  • 8. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    Shivananda Rao Guru
    Currently Being Moderated
    Hello,

    The link which I have given in my previous post has a very good example showing :

    Primary:
    Pfile/Spfile name: initprim.ora/spfileprim.ora
    db_name=prim
    db_unique_name=prim
    Standby:
    Pfile/Spfile name: initstnd.ora/spfilestnd.ora
    db_name=prim
    db_unique_name=stnd
    In your case:

    While adding a static entry to the Standby listener, SID_NAME should be the DB_UNIQUE_NAME of the standby database. Also the Standby pfile/spfile should be associated with the DB_UNIQUE_NAME of the standby.

    ORACLE_SID of the standby database would be the DB_UNIQUE_NAME of the standby database. Hope it is clear !!


    Regards,
    Shivananda
  • 9. Re: Listener configuration in standby side before running the RMAN DUPLICATE
    Omega3 Newbie
    Currently Being Moderated
    While adding a static entry to the Standby listener, SID_NAME should be the DB_UNIQUE_NAME of the standby database. Also the Standby pfile/spfile should be associated with the DB_UNIQUE_NAME of the standby.

    ORACLE_SID of the standby database would be the DB_UNIQUE_NAME of the standby database. Hope it is clear !!

    This is exactly what I wanted to know. Thank you very much Shivananda.

    Thank you CKPT, Mseberg.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points