Forum Stats

  • 3,760,166 Users
  • 2,251,656 Discussions
  • 7,871,009 Comments

Discussions

any one have RMAN active datbase cloning steps ?

Chetan Yadav
Chetan Yadav Member Posts: 168 Bronze Badge
edited Jul 13, 2021 7:05AM in Recovery Manager (RMAN)

we are tried much time to clone DB, but we are not able to restore it,

Now are planning to do Active DB cloning.

please if someone has steps for cloning please share with us.


thanks in advance.

Chetan yadav

Best Answer

  • User_0IK0L
    User_0IK0L Member Posts: 2 Green Ribbon
    Accepted Answer

    First, you should not change anything in the Target Database Listener, only in the auxiliary server.

    Your target database is a RAC, this can be seen by the amount of listener processes.

    Is your auxiliary server also RAC?

«1

Answers

  • Maicon Carneiro
    Maicon Carneiro Member Posts: 3 Red Ribbon

    Please provide more information about your need:


    1) Are you trying to duplicate the database on the same server on a remote server?

    2) Which version of Oracle?


    The macro steps for a duplicate on different servers would be:

    1) On the helper server, set up a static entry in listener.ora for the helper instance;

    2) Restart or reload the listener;

    3) On the auxiliary server, configure an entry in tnsnames.ora pointing to the target (database being cloned, example: DBPROD) and another to the auxiliary database, connecting to SERVICE_NAME statically registered in the listener (example, DBTST)

    4) On the target server (where the database being cloned is located), create an entry in tnsnames.ora for the DBTST (connecting to SERVICE_NAME statically registered in the auxiliary server listener)

    5) Copy the password file from the main instance to the auxiliary server (both need to have the same password file);

    6) Create a pfile with the proper parameters for the helper instance;

    7) Start the helper instance on NOMOUNT;

    8) Start RMAN connecting the 2 instances via SQL Net, example:

    rman target sys/[email protected] auxiliary sys/[email protected]

    9) Then issue the duplicate command in RMAN similar to this:

    RMAN> DUPLICATE TARGET DATABASE TO DBTST FROM ACTIVE DATABASE NOFILENAMECHECK;


    If the structure of directories/diskgroups ASM are different, use FILE_NAM_CONVERT as a conventional duplicate.

    ATTENTION: If the helper instance and target are on the same server, DO NOT use the NOFILENAMECHECK option as this could overwrite main database datafiles.

    Chetan Yadav
  • Chetan Yadav
    Chetan Yadav Member Posts: 168 Bronze Badge

    Thanks its work , now i am stuck with my listner and tns

  • EdStevens
    EdStevens Member Posts: 28,488 Gold Crown

    Thanks its work , now i am stuck with my listner and tns


    If it works, then how - exactly - are you stuck?

    I do not find 'I am stuck' in any of my error references.

  • Chetan Yadav
    Chetan Yadav Member Posts: 168 Bronze Badge

    [[email protected] bin]$ ps -ef |grep tns

    root    19   2 0 Apr24 ?    00:00:00 [netns]

    oracle  14831 6784 0 12:59 pts/1  00:00:00 grep --color=auto tns

    oracle  22456 14184 0 12:12 pts/3  00:00:00 view tnsnames.ora

    oracle  30168   1 0 Apr29 ?    00:02:58 /sprodgrid/SIT12C/software/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit

    oracle  30306   1 0 Apr29 ?    00:02:18 /sprodgrid/SIT12C/software/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit

    oracle  30320   1 0 Apr29 ?    00:02:17 /sprodgrid/SIT12C/software/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit

    oracle  31408   1 0 Apr30 ?    00:08:24 /sproddb/SIT12C/product/12.1.0/dbhome_1//bin/tnslsnr MPSIT -no_crs_notify -inherit


    not able to conifure tns and listner

  • EdStevens
    EdStevens Member Posts: 28,488 Gold Crown

    not able to conifure tns and listner

    That's pretty vague. I do not find "not able to conifure tns and listner" in any of my error references.

    What specific error (code and message) do you receive? What specific command do you issue that generates said error code and message?

  • Chetan Yadav
    Chetan Yadav Member Posts: 168 Bronze Badge

    Hi EdStevens,

    we did the same as you said, and the same was written in some blogs too.

    but as per step 3

    3) On the auxiliary server, configure an entry in tnsnames.ora pointing to the target (database being cloned, example: DBPROD) and another to the auxiliary database, connecting to SERVICE_NAME statically registered in the listener (example, DBTST)

    we did

    as our "tnsnames.ora" and "listener.ora" are in "Oracle_home/network/admin/", we updated both ,

    but now when we try to restart the listener in target we are not able to update it.

  • EdStevens
    EdStevens Member Posts: 28,488 Gold Crown

    This is like pulling teeth.

    SHOW us the tnsnames entries, from both servers. Indicate WHICH server each is from. Copy and paste.

    SHOW us the listener.ora file. Copy and paste.

    SHOW us the command starting the listener, and the full result. No screen shots. Copy and paste text. Format the text.

  • Chetan Yadav
    Chetan Yadav Member Posts: 168 Bronze Badge

    below all entry are from target Database only and we are not able to reload this listner also


    tns names entry and last one "MPSIT" was done by us.

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

    MPSIT4=

        (DESCRIPTION= 

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531))

          (CONNECT_DATA=

            (SERVICE_NAME=MPSIT)

            (INSTANCE_NAME=MPSIT1)

          )

        )


    MPSIT1=

        (DESCRIPTION= 

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531))

          (CONNECT_DATA=

            (SERVICE_NAME=MPSIT)

            (INSTANCE_NAME=MPSIT1)

          )

        )



    MPSIT2=

        (DESCRIPTION=

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb2-vip.mpezerp.com)(PORT=1531))

          (CONNECT_DATA=

            (SERVICE_NAME=MPSIT)

            (INSTANCE_NAME=MPSIT2)

          )

        )



    MPSIT1_FO=

        (DESCRIPTION= 

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531))

          (CONNECT_DATA=

            (SERVICE_NAME=MPSIT)

            (INSTANCE_NAME=MPSIT1)

          )

        )


    MPSIT_FO=

        (DESCRIPTION= 

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531))

          (CONNECT_DATA=

            (SERVICE_NAME=MPSIT)

            (INSTANCE_NAME=MPSIT1)

          )

        )


    MPSIT1_LOCAL=

        (DESCRIPTION= 

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531))

        )


    MPSIT_BALANCE=

        (DESCRIPTION= 

          (ADDRESS_LIST=

            (LOAD_BALANCE=YES)

            (FAILOVER=YES)

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531)

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb2-vip.mpezerp.com)(PORT=1531))

          )

          (CONNECT_DATA=

            (SERVICE_NAME=MPSIT)

          )

        )


    MPSIT_REMOTE=

        (DESCRIPTION= 

          (ADDRESS_LIST=

            (ADDRESS=(PROTOCOL=tcp)(HOST=ebssitdb1-vip.mpezerp.com)(PORT=1531))

          )

        )


    extproc_connection_data = 

      (DESCRIPTION= 

         (ADDRESS_LIST = 

           (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCMPSIT1))

        )

        (CONNECT_DATA=

          (SID=PLSExtProc)

          (PRESENTATION = RO)

        ) )



    MPSIT =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.27.0.7)(PORT = 1522))

    (CONNECT_DATA =

    (SERVER = DEDICATED)

    (SERVICE_NAME = MPSIT)

    )

    )

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

    Listner .ora


    LISTENER_ebssitdb1 =

     (DESCRIPTION_LIST =

      (DESCRIPTION =

       (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = ebssitdb1-vip.mpezerp.com)(PORT = 1531)(IP = FIRST)))

       (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = ebssitdb1)(PORT = 1531)(IP = FIRST)))

      )

     )


    SID_LIST_LISTENER_ebssitdb1 =

     (SID_LIST =

      (SID_DESC = (ORACLE_HOME = /sproddb/SIT12C/product/12.1.0/dbhome_1)(SID_NAME = MPSIT1))

     )


    LISTENER_MPSIT =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.27.0.7)(PORT = 1538))

    ))



    SID_LIST_LISTENER_MPSIT =

    (SID_LIST =

    (SID_DESC =

    (GLOBAL_DBNAME = MPSIT )

    (ORACLE_HOME = /sproddb/SIT12C/product/12.1.0/dbhome_1)

    (SID_NAME = MPSIT )

    ))



    STARTUP_WAIT_TIME_LISTENER_ebssitdb1 = 0

    CONNECT_TIMEOUT_LISTENER_ebssitdb1 = 10

    TRACE_LEVEL_LISTENER_ebssitdb1 = OFF


    LOG_DIRECTORY_LISTENER_ebssitdb1 = /sproddb/SIT12C/product/12.1.0/dbhome_1/network/admin

    LOG_FILE_LISTENER_ebssitdb1 = MPSIT1

    TRACE_DIRECTORY_LISTENER_ebssitdb1 = /sproddb/SIT12C/product/12.1.0/dbhome_1/network/admin

    TRACE_FILE_LISTENER_ebssitdb1 = MPSIT1

    ADMIN_RESTRICTIONS_LISTENER_ebssitdb1 = ON

    SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_ebssitdb1 = OFF



    IFILE=/sproddb/SIT12C/product/12.1.0/dbhome_1/network/admin/MPSIT1_ebssitdb1/listener_ifile.ora

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

    [email protected] ~]$ ps -ef |grep tns

    root    19   2 0 Apr24 ?    00:00:00 [netns]

    oracle  5492   1 0 19:45 ?    00:00:00 /sprodgrid/SIT12C/software/bin/tnslsnr LISTENER -no_crs_notify -inherit

    oracle  10899 6784 0 21:58 pts/1  00:00:00 grep --color=auto tns

    oracle  30168   1 0 Apr29 ?    00:02:55 /sprodgrid/SIT12C/software/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit

    oracle  30306   1 0 Apr29 ?    00:02:16 /sprodgrid/SIT12C/software/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit

    oracle  30320   1 0 Apr29 ?    00:02:16 /sprodgrid/SIT12C/software/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit

    oracle  31408   1 0 Apr30 ?    00:08:21 /sproddb/SIT12C/product/12.1.0/dbhome_1//bin/tnslsnr MPSIT -no_crs_notify -inherit

    [[email protected] ~]$

  • EdStevens
    EdStevens Member Posts: 28,488 Gold Crown
    edited Jul 14, 2021 7:08PM

    I give up.

    Why do you have two different listeners listed in your listener.ora?(assuming that unformatted mess is one single file). Why does your 'ls' output show multiple listeners? Why are you trying to run multiple listener? One single listener, with the default name LISTENER, running on the default port of 1521, is quite capable of, indeed _was designed to_ service multiple databases of multiple versions running from multiple ORACLE_HOMEs.

    Your listener.ora includes an ifile parameter, but you did not include the contents of that, so we don't know everything about your listener.ora.

    I asked for the output of your lsnrctl startup command. I don't see that.

    I have repeatedly asked for _ACTUAL ERROR MESSAGES_, and have yet to see a single one.

    Naming some of your listeners as LISTENER_SCAN seems to suggest you have a RAC setup, which you've never said a thing about.

    I will bow out and leave this for someone else to sort out.

  • User_0IK0L
    User_0IK0L Member Posts: 2 Green Ribbon
    Accepted Answer

    First, you should not change anything in the Target Database Listener, only in the auxiliary server.

    Your target database is a RAC, this can be seen by the amount of listener processes.

    Is your auxiliary server also RAC?