5 Replies Latest reply: May 27, 2013 8:29 PM by SAML. RSS

    Why do we need a connection to the Source DB for RMAN DUPLICATE ?

    Omega3
      Version Info: 11.2.0.3/RHEL 5.8

      We want to clone a Production DB to a test DB.

      Prod DB size: 100gb

      We are going to take an RMAN full backup (Hot Backup which includes Archivelogs ) and scp the backup pieces to the Test DB server.

      In the Test server , we will be running RMAN DUPLICATE command after connecting like below
      rman target sys/passwd@SID_OF_SOURCE_DB auxiliary /
      We have everything we need in test server to do the cloning ie. all the RMAN Backup pieces. Then why does RMAN connect to the source DB ?
        • 1. Re: Why do we need a connection to the Source DB for RMAN DUPLICATE ?
          swapnil kambli
          from [url http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm] here
          Backup-based duplication without a target connection
          
          RMAN creates duplicate files from pre-existing RMAN backups and copies. The DUPLICATE command must have been issued with the DATABASE clause. This form requires a connection to an auxiliary instance and a recovery catalog.
          
          This mode is useful when the target database is not available or a connection to it is not desirable (as mandated by security policy restrictions or a firewall).
          Backup-based duplication without connection to target and recovery catalog
          
          RMAN creates duplicate files from RMAN backups and copies that were placed in a designated BACKUP LOCATION.
          http://dbaregistry.blogspot.com/2011/04/rman-duplicate-without-connecting-to.html

          Edited by: swapnil kambli on May 21, 2013 1:36 AM
          • 2. Re: Why do we need a connection to the Source DB for RMAN DUPLICATE ?
            rarain
            Hi,

            From 11g onwards it is not necessary to connect with target database to duplicate the database using existing backup that means you can run RMAN duplicate command without connecting with target and catalog as well. Here is one of sample script for backup based duplication without connecting to target database:-

            run{

            set newname for database to '/database1/testdb/%b';

            duplicate target database to testdb

            backup location '/database1/rmanbkp'

            LOGFILE

            GROUP 1('/database1/testdb/redo11.log',

            '/database1/testdb/redo12.log') SIZE 20M REUSE,

            GROUP 2('d/database1/testdb/redo21.log',

            '/database1/testdb/redo22.log') SIZE 20M REUSE;

            }

            For more information you can refer below link:-

            http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV435

            Thanks
            • 3. Re: Why do we need a connection to the Source DB for RMAN DUPLICATE ?
              Omega3
              Thank you both.

              But , I still don't get why RMAN has to connect to the source DB when we already have the source DB's full backup available locally.
              • 4. Re: Why do we need a connection to the Source DB for RMAN DUPLICATE ?
                Hemant K Chitale
                Umm. Did you read the two responses ? Both of them show how you do NOT need to connect to the target (i.e. the source) database.

                Hemant K Chitale
                • 5. Re: Why do we need a connection to the Source DB for RMAN DUPLICATE ?
                  SAML.
                  Hi,

                  Before 11g, RMAN cannot read backup piece directly so it has to connect to target database to read that information.

                  Cheers,
                  SAM L.