3 Replies Latest reply: Jul 25, 2013 8:32 AM by mseberg RSS

    duplicate database in the same server to point in time

    866787

      hi all,

       

      I have 11gr2 database on linux 5.5. Now i want to clone this database in the same server to point in time.

      I followed two methods.

       

      1)

      copied password file and parameter file from source instance (orcl) to target instance name (test). then modified all the parameters except db_name then started the instance and restored controlfiles from the source instance backup files. But while mounting it has given exclusive mode error. I also updated parameters db_file_name_convert, log_file_name_convert. But still giving the same error.

       

      2) copied password file and parameter file from source instance (orcl) to target instance name (test). then modified all the parameters including db_name started the instance and restored and created the contorlfies using trace file that is taken from source database (like ' alter database backup controlfile to trace as '/u01/control.sql'). but it has given unable to lock system datafile.

       

      Is there any method to clone the database using rman in the same server to point in time.

       

      Please share your valuable suggestions.

       

      Thanks for you help.

        • 1. Re: duplicate database in the same server to point in time
          sb92075

          866787 wrote:

           

          hi all,

           

          I have 11gr2 database on linux 5.5. Now i want to clone this database in the same server to point in time.

          I followed two methods.

           

          1)

          copied password file and parameter file from source instance (orcl) to target instance name (test). then modified all the parameters except db_name then started the instance and restored controlfiles from the source instance backup files. But while mounting it has given exclusive mode error. I also updated parameters db_file_name_convert, log_file_name_convert. But still giving the same error.

           

          2) copied password file and parameter file from source instance (orcl) to target instance name (test). then modified all the parameters including db_name started the instance and restored and created the contorlfies using trace file that is taken from source database (like ' alter database backup controlfile to trace as '/u01/control.sql'). but it has given unable to lock system datafile.

           

          Is there any method to clone the database using rman in the same server to point in time.

           

           

          yes

           

          when all else fails Read The Fine Manual.

           

          http://docs.oracle.com/cd/E11882_01/backup.112/e10642/toc.htm

          • 2. Re: duplicate database in the same server to point in time
            509894

            Actually you are not cloneing. you are doing rman point in time recovery. why dont you do it on another server. This will be much safer for your current database.

             

            Also check this link & search for  NOFILENAMECHECK


            "If duplicating a database on the same host as the source database, then ensure that NOFILENAMECHECK is not set.

            Otherwise, RMAN can potentially overwrite and corrupt the target database data files, temp files, or online logs. "


            http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm

            • 3. Re: duplicate database in the same server to point in time
              mseberg

              Hello;

               

              I assume you want  another copy of the database on the same server.

               

              RMAN DUPLICATE DATABASE at a Past Point in Time

               

               

              CONNECT TARGET SYS/oracle@trgt

               

              CONNECT AUXILIARY SYS/oracle@dupdb

               

               

              DUPLICATE TARGET DATABASE TO dupdb

                  NOFILENAMECHECK UNTIL TIME 'SYSDATE-7';

               

              See:

               

              Chapter 24 of Backup and Recovery User's Guide 11g Release 2 (11.2) E10642-03  

                

              Example 24-2 Duplicating a Database to a Past Point in Time (Backup-Based)  

               

              Best Regards

               

              mseberg