This discussion is archived
7 Replies Latest reply: Dec 20, 2012 6:41 PM by Shivananda Rao RSS

Should listener at standby server be up for RMAN DUPLICATE ?

719997 Newbie
Currently Being Moderated
11.2.0.3/OEL 6

We are going to use RMAN DUPLICATE method to create the standby.

After copying the hotbackup of the primary to standby server, from standby server we will
be running the following RMAN DUPLICATE command.


--- Will be running the following DUPLICATE command from standby server 

export ORACLE_SID=orcldg
SQL> startup nomount pfile='/u01/app/oracle/11.2/db_home1/dbs/initorcldg.ora'


rman target sys/mypass@PRIMARY_TNS auxiliary /

run 
{
     allocate channel C1 device type disk;
     allocate auxiliary channel C2 device type disk;
     duplicate target database for standby nofilenamecheck;
}
As, I've shown above, RMAN is connecting to the Primary DB using the tns entry PRIMARY_TNS configured in the tnsnames.ora file in standby server . So, I don't need to start the listener at standby server for running RMAN Duplicate. Right ?
  • 1. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    mseberg Guru
    Currently Being Moderated
    Hello;

    Yes. There are duplication methods that don't need this, but static entry hurts nothing if you use them instead of say Active duplicate.

    Will post example
    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.





    In a moment

    Best Regards

    mseberg
  • 2. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    719997 Newbie
    Currently Being Moderated
    Thanks mseberg.

    As you can see, RMAN is connecting to the auxillary instance through local authentication
    ....auxiliary / 
    So, I don't need to create and start a static listener which listens on the auxillary instance for the purpose of RMAN Duplicate. Right ?
  • 3. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    mseberg Guru
    Currently Being Moderated
    Not sure. I use several methods.

    In one I scp the files over and then I use :

    rman target sys/password@PRIMARY auxiliary /

    My notes on that are :

    http://www.visi.com/~mseberg/duprman2.html

    My active notes are here :

    http://www.visi.com/~mseberg/standby_creation_from_active_database_using_rman.html

    I stopped using the scp method and I think you are right about the listener on that. If not it will die very early, so you won't waste much time and the correction is easy.

    What I really like about Active Duplicate is you can have everything setup so if you ever need to rebuild your standby you can pretty much just run a script.

    Best Regards

    mseberg

    Edited by: mseberg on Dec 20, 2012 10:15 AM
  • 4. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    CKPT Guru
    Currently Being Moderated
    From standby you have to use TNS service if you prefer to do RMAN duplicate from ACTIVE database.
    If you prefer legacy duplicate method, then no need of listener also.

    When you are not connecting with TNS service,then there is no communication to the listener from the auxiliary service :)
  • 5. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    719997 Newbie
    Currently Being Moderated
    CKPT wrote:
    From standby you have to use TNS service if you prefer to do RMAN duplicate from ACTIVE database.
    If you prefer legacy duplicate method, then no need of listener also.

    When you are not connecting with TNS service,then there is no communication to the listener from the auxiliary service :)
    I am planning to use RMAN DUPLICATE (not from ACTIVE database). For RMAN DUPLICATE , as shown above the RMAN from standby server is connecting to primary using a TNS entry.
    Do you see any need for the primary DB to communicate to auxillary instance via auxillary listener for the purpose of RMAN DUPLICATE ?
  • 6. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    mseberg Guru
    Currently Being Moderated
    Hello again;

    I double check my old notes.
    Do you see any need for the primary DB to communicate to auxillary instance via auxillary listener for the purpose of RMAN DUPLICATE ?
    No.

    You can connect like this : ( other ways will work too )
    rman target sys/sys@PROD auxiliary /
    and then
    duplicate target database for standby nofilenamecheck;
    Best Regards

    mseberg
  • 7. Re: Should listener at standby server be up for RMAN DUPLICATE ?
    Shivananda Rao Guru
    Currently Being Moderated
    Hello,
    I am planning to use RMAN DUPLICATE (not from ACTIVE database).
    Duplicating using ACTIVE database technique would require you to connect both the Target and the Auxiliary with the connection strings. Since you are not going with this method, your method of running the duplicate mentioned in the very first post on this thread would work out.

    But what puzzles me is, since you are configuring a standby database, any specific reason for not having the listener started ?


    Regards,
    Shivananda

Legend

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