9 Replies Latest reply: Apr 30, 2012 7:03 AM by Shivananda Rao RSS

    Standby database with different name and Structure

    007
      Hi,

      I am using Oracle 10g(10.2.0.0.1) and I am new in setting the standby database. My source database name is ORADB and my standby database name is STANDBY. The directory structures are different. My STANDBY database pfile is shown below

      STANDBY.__db_cache_size=188743680
      STANDBY.__large_pool_size=4194304
      *.audit_file_dest='/data/u01/app/oracle/admin/STANDBY/adump'
      *.background_dump_dest='/data/u01/app/oracle/admin/STANDBY/bdump'
      *.compatible='10.2.0.1.0'
      *.control_files='/data/u01/app/oracle/oradata/STANDBY/controlfile/o1_mf_7lq04pmb_.ctl','/data/u01/app/oracle/flash_recovery_area/STANDBY/controlfile/o1_mf_7lq04pry_.ctl'
      *.core_dump_dest='/data/u01/app/oracle/admin/STANDBY/cdump'
      *.db_block_size=8192
      *.db_name='STANDBY'
      *.db_recovery_file_dest='/data/u01/app/oracle/flash_recovery_area'
      *.db_recovery_file_dest_size=2147483648
      *.sga_target=285212672
      *.user_dump_dest='/data/u01/app/oracle/admin/STANDBY/udump'

      Do i need to have log_file_name_convert or other parameters to clone the db??

      regards,

      007
        • 1. Re: Standby database with different name and Structure
          hitgon
          Hi,

          Do i need to have log_file_name_convert or other parameters to clone the db??
          YES

          DB_FILE_NAME_CONVERT      Specify the path name and filename location of the primary database datafiles followed by the standby location. This parameter converts the path names of the primary database datafiles to the standby datafile path names. If the standby database is on the same system as the primary database or if the directory structure where the datafiles are located on the standby site is different from the primary site, then this parameter is required. Note that this parameter is used only to convert path names for physical standby databases. Multiple pairs of paths may be specified by this parameter.

          LOG_FILE_NAME_CONVERT      Specify the location of the primary database online redo log files followed by the standby location. This parameter converts the path names of the primary database log files to the path names on the standby database. If the standby database is on the same system as the primary database or if the directory structure where the log files are located on the standby system is different from the primary system, then this parameter is required. Multiple pairs of paths may be specified by this parameter.

          Read the document http://docs.oracle.com/cd/B19306_01/server.102/b14239/create_ps.htm

          Regards
          Hitgon

          Edited by: hitgon on Apr 30, 2012 12:49 PM

          Edited by: hitgon on Apr 30, 2012 12:49 PM
          • 2. Re: Standby database with different name and Structure
            Shivananda Rao
            Hi,

            You need to set the db_file_name_convert and log_file_name_convert parameters on the standby pfile.
            You can refer http://shivanandarao.wordpress.com/2012/03/10/creating-physical-standby-database-on-oracle-11g/

            The method of creating standby on 10g involves to take the standby backup of the primary and restore it on the standby server (you cannot use the active database feature). With respect to the parameters, FAL_CLIENT and FAL_SERVER needs to be set in the standby pfile in 10g.

            http://docs.oracle.com/cd/B19306_01/server.102/b14239/rcmbackp.htm#i636885

            Please consider closing your threads and keeping the forum clean.
            • 3. Re: Standby database with different name and Structure
              007
              Hi,

              thanks for the reply. i have added the new two new parameters *(db_file_name_convert and log_file_name_convert)* in STANDBY pfile and when i issue the below command from the source database


              RMAN> run
              2> {
              3> set until sequence 10;
              4> duplicate target database for standby dorecover nofilenamecheck;
              5> }


              i get the error the below error


              channel ORA_AUX_DISK_1: starting datafile backupset restore
              channel ORA_AUX_DISK_1: restoring control file
              channel ORA_AUX_DISK_1: reading from backup piece /data/standby_control_0an9ngbv_1_1
              ORA-19870: error reading backup piece /data/standby_control_0an9ngbv_1_1
              ORA-19505: failed to identify file "/data/standby_control_0an9ngbv_1_1"
              ORA-27037: unable to obtain file status

              But i have the same control file in that location with proper permissions. What might be the reason for the error??

              Regards,

              007
              • 4. Re: Standby database with different name and Structure
                Shivananda Rao
                ORA-19505: failed to identify file "/data/standby_control_0an9ngbv_1_1"
                ORA-27037: unable to obtain file status
                Does the backup piece exist in the Primary server location (/data) or on the standby server location (/data) ?

                If you had taken the backup of the primary database and stored it on the Primary server location /data and if you are not having the same mount point on the standby server, then you need to catalog the backup pieces on the standby server.
                RMAN>catalog start with <the location where you have stored the backup pieces on the standby server>;
                • 5. Re: Standby database with different name and Structure
                  007
                  Hi Shivananda,

                  Thanks for your reply. i have copied the controlfile backup piece locatation to standby /data and flash_recovery_area and it worked. Now i get the below error after issuing the duplicate database command.

                  sql statement: alter database mount standby database
                  RMAN-00571: ===========================================================
                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                  RMAN-00571: ===========================================================
                  RMAN-03002: failure of Duplicate Db command at 04/30/2012 14:14:48
                  RMAN-03015: error occurred in stored script Memory Script
                  RMAN-03009: failure of sql command on clone_default channel at 04/30/2012 14:14:48
                  RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
                  ORA-01103: database name 'ORADB' in control file is not 'STANDBY'

                  My STANDBY pfile contents are shown below


                  STANDBY.__db_cache_size=188743680
                  STANDBY.__large_pool_size=4194304
                  *.audit_file_dest='/data/u01/app/oracle/admin/STANDBY/adump'
                  *.background_dump_dest='/data/u01/app/oracle/admin/STANDBY/bdump'
                  *.compatible='10.2.0.1.0'
                  *.control_files='/data/u01/app/oracle/oradata/STANDBY/controlfile/o1_mf_7lq04pmb_.ctl',' /data/u01/app/oracle/flash_recovery_area/STANDBY/controlfile/o1_mf_7lq04pry_.ctl'
                  *.core_dump_dest='/data/u01/app/oracle/admin/STANDBY/cdump'
                  *.db_block_size=8192
                  *.db_name='STANDBY'
                  *.db_recovery_file_dest='/data/u01/app/oracle/flash_recovery_area'
                  *.db_recovery_file_dest_size=2147483648
                  *.sga_target=285212672
                  *.user_dump_dest='/data/u01/app/oracle/admin/STANDBY/udump'
                  *.db_file_name_convert='/data/u01/app/oracle/oradata/ORADB','/data/u01/app/oracle/oradata/STANDBY'
                  *.log_file_name_convert='/data/u01/app/oracle/oradata/ORADB','/data/u01/app/oracle/oradata/STANDBY'

                  My database version is 10.2.0.1

                  Regards,

                  007
                  • 6. Re: Standby database with different name and Structure
                    Shivananda Rao
                    The db_name parameter on the standby database and the primary database should be same.
                    *.db_name='STANDBY'
                    db_unique_name parameter on primary and standby database should be different. They are uniquely identified by this parameter.
                    • 7. Re: Standby database with different name and Structure
                      007
                      Hi Shivananda,

                      I removed the *.db_name='STANDBY' from my standby and added the db_unique_name='STANDBY' in pfile and started the instance with this pfile. i got the below error ORA-01506: missing or illegal database name . Does the both the parameters(*.db_name='STANDBY',db_unique_name='STANDBY') need to be present in STANDBY database??

                      Regards,

                      007
                      • 8. Re: Standby database with different name and Structure
                        G Srikanth
                        Hello

                        Db_name should always be the same name as primary database and is needed during standby creation. DB_UNIQUE_NAME should be different to primary.

                        Regards
                        G Srikanth

                        Edited by: G Srikanth on Apr 30, 2012 10:43 AM
                        • 9. Re: Standby database with different name and Structure
                          Shivananda Rao
                          Both these parameters should be available in both the primary and standby databases.

                          Example:
                          Primary:

                          db_name=mydb
                          db_unique_name=myprimrary


                          Standby:

                          db_name=mydb
                          db_unique_name=mystby