8 Replies Latest reply: Apr 4, 2014 3:46 AM by petra-K RSS

    Duplicate Database

      Hi all,

       

      11.2.0.1

       

      I am duplicating a database and I follow this  doc > http://www.oracle-base.com/articles/11g/duplicate-database-using-rman-11gr2.php

      There is a paragraph here that is not CLEAR to me Kindly clarify:

       

      Add the appropriate entries into the "tnsnames.ora" file in the "$ORACLE_HOME/network/admin" directory to allow connections to the target database from the duplicate server.

      # Added to the tnsnames.ora

      DB11G-SOURCE = (DESCRIPTION = (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = ol5-112-dup1)(PORT = 1521)) )

      (CONNECT_DATA = (ORACLE_SID = DB11G) ) )

       

      I do not understand which is the target server, the source server, and the duplicate server The terms are oblivious.

       

      So if I have 2 servers  PROD   and  DUP servers, where the PROD intance will be cloned to DUP . where do I set the init.ora above? PROD or DUP?  source or target?

       

       

      Thanks

        • 1. Re: Duplicate Database
          Madhu.149

          Hi,

           

          Target database is the database from which you are creating the duplicate one.

          You need to connect to the target database from your DUP server using RMAN

           

          Later you can execute RMAN duplicate command to duplicate the target database.

          • 2. Re: Duplicate Database
            KarK

            Hi,

             

            You need to update tnsnames.ora file on both PROD and DUP.

            • 3. Re: Duplicate Database
              Hemant K Chitale

              > allow connections to the target database from the duplicate server.

              If you are duplicating the PROD database to the DUP database, the tnsnames.ora entry for PROD must be on the DUP server.  PROD is the target, DUP is the auxiliary.

               

              Hemant K Chitale

              • 5. Re: Duplicate Database
                Hemant Shahi

                Hi Petra,

                 

                If you are doing active database duplication then try connecting both the databases - target (PROD) and auxiliary (DUP) in one statement.

                 

                RMAN> RMAN target sys/<pwd>@target_connect_string auxiliary sys/<pwd>@auxiliary_connect_string

                 

                if you are able to connect both the DBs using this command , that means your connection is absolutely fine and you can proceed with duplication.

                 

                If not, then edit the tnsnames.ora in auxiliary server to connect to target database for making connection.

                • 6. Re: Duplicate Database

                  I got error now

                   

                  ORA-25153: Temporary Tablespace is Empty

                  sqlplus / as sysdba

                  SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 4 15:53:24 2014

                  Copyright (c) 1982, 2009, Oracle.  All rights reserved.

                  Connected to:

                  Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

                  With the Partitioning, OLAP, Data Mining and Real Application Testing options

                  SQL> select tablespace_name,file_name from dba_temp_files;

                  TABLESPACE_NAME

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

                  FILE_NAME

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

                  TEMP

                  /backup/oradata/BNCT01/datafile/temp01.dbf

                  SQL> select property_value from database_properties where property_name like '%DEFAULT_TEMP_TABLESPACE%';

                  PROPERTY_VALUE

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

                  TEMP

                  SQL> Select name from v$tempfile;

                  NAME

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

                  /backup/oradata/BNCT01/datafile/temp01.dbf

                  SQL> exit

                  Disconnected from Oracle Dtabase 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

                  With the Partitioning, OLAP, Data Mining and Real Application Testing options

                   

                  oracle_server:oracle[/home/oracle] ls -l /backup/oradata/BNCT01/datafile/temp01.dbf

                  -rw-------    1 oracle   oinstall   55582720 Apr 04 15:42 /backup/oradata/BNCT01/datafile/temp01.dbf

                  • 7. Re: Duplicate Database

                    Hi all,

                     

                    My source db sa 3 tempfile datafile....  do I need to add 2 datafile to resolve the issue to my DUP/cloned database?

                    • 8. Re: Duplicate Database

                      I also encounter error

                       

                       

                       

                      ERROR:

                      ORA-21561: OID generation failed 

                       

                      Not so lucky today