1 2 Previous Next 15 Replies Latest reply on Mar 30, 2019 6:50 PM by Dude!

    Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate

    M.Kamran

      Hi

       

      We are testing the process of migrating an 11.2.0.4 database to 12.2.0.1 database using RMAN

      We are using the following document

      "Upgrade to 12c using RMAN Duplicate with Noopen clause and Backup Location (Doc ID 2022820.1)"

       

      In our source (11.2.0.4) Database, the datafiles and temp files are located under +DATA Disk Group

      The Control file and REDO LOG files are under +REDO disk group

       

      On the target (12c) DB Server, we have 2 Disk Groups, +DATA and +RECO

      So there is no +REDO Disk Group and instead we have +RECO disk group

       

      Questions

       

      1. In the init.ora file that we will use to startup nomount the Target/Auxiliary/12c database, what should be the value of

         CONTROLFILE_NAME? Since we wont have a control file at this point when we startup nomount

        

      2. We dont need to set any value for DB_FILE_NAME_CONVERT. Correct?

        

      3. We need to set LOG_FILE_NAME_CONVERT='+REDO','+RECO'   --> Correct?

       

      4. Since the CONTROL FILE on the source db is under +REDO, and we dont have +REDO on the target DB server,

         do we need to have anything in the 12c init.ora file to address this? or by setting the CONTROLFILE_NAME

         we would already have addressed this?

        

      Thanks in advance for your guidance and assistance

        • 1. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
          top.gun

          1. Why not reuse the same name as for 11g, if the controlfile will go to +DATA.

          2. Create the same directory names so you don;t need to convert.

          3. yes

          4. You are managing the name via the system parameter CONTROLFILE_NAME.

          • 2. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
            M.Kamran

            Thank you

            The confusion we have have is when we perform a startup nomount of 12c database , at that time, there wont be a controlfile existing at that time and only when we issue the following command, RMAN will create a control file

            RMAN> DUPLICATE DATABASE TO <new DB > NOOPEN  BACKUP LOCATION '/u01/dest_backup/' ;

             

            Is that correct?

             

            If yes, then how can we give any name here to the cotrolfile_name not knowing what that name is going to be ?

             

            Appreciate your help

            • 3. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
              top.gun

              controlfile_name is a system parameter set in the spfile.

              So when you startup nomount, the spfile will be read, and RMAN will then know where the name of the controlfile.

              • 4. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                M.Kamran

                Thanks but there is exactly where we are confused

                 

                At that stage, when we startup nomount, the only file out there would be the init.ora file  and only when we start the RMAN process and run the following command it will restore the control file from the backup..

                 

                RMAN> DUPLICATE DATABASE TO <new DB > NOOPEN  BACKUP LOCATION '/u01/dest_backup/' ;

                 

                Correct?

                 

                 

                 

                • 5. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                  boracIe

                  I'm not trying to confused OP, but i have a question regarding control_file parameter. If spfile or pfile didn't mentioned, how would RMAN know where to put the control file? Thanks in advanced.

                  • 6. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                    Dude!

                    Why don't you rename the +RECO diskgorup to +REDO?

                     

                    You have the asmcmd renamedg command.

                     

                    I think +RECO is rather silly anyway. +REDO makes sense if you do not use +FRA.

                    • 7. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                      M.Kamran

                      Hi Dude

                       

                      Well lets just say that we have our reasons to stick to +RECO ( I know it sounds silly but lets assume that we cannot change that to +REDO)

                      In that scenario what should be the value of controlfile_name

                       

                      Thanks

                      • 8. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                        M.Kamran

                        And even lets say we rename +RECO to +REDO, what value we would need to provide to CONTROLFILE_NAME in the 12c init.ora file to start up nomount and before we fire the RMAN duplicate command ?

                        • 9. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                          Dude!

                          You don't need to create a parameter file to use "startup nomount". Check the following example:

                           

                          [oracle@vm501 ~]$ source oraenv <<< orcl

                          [oracle@vm501 ~]$ export ORACLE_SID=dummy

                          [oracle@vm501 ~]$ rman target /

                           

                          Recovery Manager: Release 11.2.0.4.0 - Production on Fri Mar 29 19:54:49 2019

                           

                          Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

                           

                          connected to target database (not started)

                           

                          RMAN> startup nomount;

                           

                          startup failed: ORA-01078: failure in processing system parameters

                          LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initdummy.ora'

                           

                          starting Oracle instance without parameter file for retrieval of spfile

                          Oracle instance started

                           

                          Total System Global Area    1068937216 bytes

                           

                          Fixed Size                     2260088 bytes

                          Variable Size                281019272 bytes

                          Database Buffers             780140544 bytes

                          Redo Buffers                   5517312 bytes

                           

                          What kind of RMAN duplicate do you plan? Active or backup based duplication.

                           

                          You can either let RMAN duplicate use the spfile or modify the spfile during the duplicate process using the spfile parameter. However, you cannot use db_file_name_convert for ASM/OMF.

                           

                          I suggest you review:

                          https://docs.oracle.com/cd/E18283_01/backup.112/e10642/rcmdupad.htm#insertedID1

                           

                          Perhaps you can do something like:

                           

                          DUPLICATE TARGET DATABASE

                            TO dupdb

                            FROM ACTIVE DATABASE NOOPEN

                            SPFILE PARAMETER_VALUE_CONVERT '+RECO','+REDO';

                           

                           

                          But you will need to create tnsnames.ora for target and auxiliary, and copy the orapwd file (target and auxiliary must use the same passwords in orawpd file.)

                          • 10. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                            top.gun

                            I don't know the default behaviour if you don;t specify the system parameter.

                            So I think you should always specify it, so you know where it will be restored to.

                            • 11. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                              Dude!

                              boracIe wrote:

                               

                              I'm not trying to confused OP, but i have a question regarding control_file parameter. If spfile or pfile didn't mentioned, how would RMAN know where to put the control file? Thanks in advanced.

                              You may want to create your own thread asking this question in more detail.

                               

                              Please see my previous response. You do not need a parameter file or controfile to create a database instance. Put simply, you start the database instance in nomount to retrieve the spfile from backup. Then you use startup force nomount (which includes shutdown abort) and use nomount again to read the spfile, at which point you can restore the controlfile. If you need an example: Oracle Database 11g: Disaster Recovery Example

                              • 12. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                                M.Kamran

                                We are following this document to MIGRATGE / UPGRADE our 11.2.0.4 database from machine A to 12.2.0.1 on Machine B

                                 

                                "Upgrade to 12c using RMAN Duplicate with Noopen clause and Backup Location (Doc ID 2022820.1)"

                                 

                                 

                                Please review the step # 5 in this document

                                 

                                5)  Edit copied pfile and make necessary changes.  Set necessary values like: 

                                db_name =  
                                controfile_name =
                                db_file_name_convert and log_file_name_convert ( if source and destination locations are different )

                                 

                                So our question is based on that actually

                                 

                                Hope it helps

                                 

                                Thanks

                                • 13. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                                  Dude!

                                  Well, I understand, but you're asking in a public forum. Not everyone here has access to MOS, and from what I understand, according to the forum rules, we are not at liberty to disclose MOS content here. If you have questions about a MOS document, I suggest you better post in the MOS community.

                                   

                                  The documentation most likely provides enough info to complete your task. Have you read the documentation at https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupad.htm#BRADV448 ? There are also examples:

                                   

                                  In the DUPLICATE command, set PARAMETER_VALUE_CONVERT to convert all directory locations from +DISK1 to +DISK2. The new file names in +DISK2 are generated by ASM and do not match the original file names in disk group +DISK1.

                                  This is what I mentioned in my previous response and what I think you are trying to accomplish, renaming +REDO to +RECO during the duplicate process.

                                   

                                  As always there is usually more than one way to skin a cat so to speak. Regarding DB_FILE_NAME_CONVERT, which I always confuse and find idiotic, see https://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90153

                                   

                                  You can specify DB_FILE_NAME_CONVERT in the DUPLICATE command or you can set it in the initialization parameter of the auxiliary instance.

                                  You cannot use the DB_FILE_NAME_CONVERT clause of the DUPLICATE command to control generation of new names for files at the duplicate instance that are in the Oracle Managed Files (OMF) format at the source database instance

                                  We all know ASM uses OMF. But then again when you review: https://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90153 you find the following:

                                  The only exception to this rule is when changing only an ASM disk group name. Assume that source data files and online redo log files are stored in ASM disk group +SOURCEDSK. You want to store the duplicate database files in ASM disk group +DUPDSK. In this case, you can set the initialization parameters as follows:

                                  DB_FILE_NAME_CONVERT = ("+SOURCEDSK","+DUPDSK") LOG_FILE_NAME_CONVERT = ("+SOURCEDSK","+DUPDSK") 

                                   

                                  So I guess make your pick - I did not design that stupid thing. My understanding is that if you want to rename the location of controlfiles, use PARAMETER_VALUE_CONVERT as mentioned earlier.

                                   

                                   

                                  • 14. Re: Migrating to 12.2.0.1 from 11.2.0.4 using RMAN Duplicate
                                    M.Kamran

                                    Dude, thank you so much for your detailed input and guidance on this

                                     

                                    Actually, it seems there are 2 questions that were topic of discussion here

                                    You nailed the first one in detail and again thank you for that. As you suggested, the best and least complicated method would be to rename the disk group (from +RECO to +REDO) and be done with it and hence no need to actually use the DB_FILE_NAME_CONVERT

                                     

                                    The second topic was BEFORE we STARTUP NOMOUNT the target (12c) database, do we need to specify anything for CONTROLFILE_NAME parameter at all?

                                    Again, referring to --> "Upgrade to 12c using RMAN Duplicate with Noopen clause and Backup Location (Doc ID 2022820.1)"

                                     

                                    Here are steps 5 thru 8 and in step # 5, all we need to know / trying to understand is that IS IT NECESSARY to specify  CONTROLFILE_NAME parameter at this step and if yes, what value we should put in here?

                                     

                                    5)  Edit copied pfile and make necessary changes.  Set necessary values like: 

                                    db_name =  
                                    controfile_name =
                                    db_file_name_convert and log_file_name_convert ( if source and destination locations are different )

                                     

                                    6) startup the Auxiliary instance in NOMOUNT

                                    Sql> connect / as sysdba
                                    Sql> startup nomount

                                     

                                    7) From RMAN connect this instance as AUXILIARY

                                    Example:

                                    $ export ORACLE_SID=<12cdbxxx>
                                    rman > connect auxiliary /

                                     

                                    8) Using RMAN 12c, execute the duplicate command.  In this example, '/u01/backup' denotes RMAN backup location on destination.  Note, “NOOPEN” option is specified.

                                    RMAN> DUPLICATE DATABASE TO <new DB > NOOPEN  BACKUP LOCATION '/u01/dest_backup/' ;

                                     

                                    Again a lot of thanks to everyone who has chipped in here and provided with their feedback

                                     

                                    Thanks

                                    1 2 Previous Next