4 Replies Latest reply on Dec 11, 2008 2:54 AM by ebrian

    ORA-01103 - During Creation/DUPLICATE on Physical Standby

    user20050
      Trying to setup a Data Guard configuration, but can't successfully create the standby database. It is failing on the DUPLICATE command

      Oracle 10.1.0.5
      Red Hat 3
      Primary DB = PRIMARY
      Standby = ADSUB

      PRIMARY init
      *.db_name='PRIMARY'
      *.db_unique_name='PRIMARY'
      *.LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIMARY,ADSUB)'
      *.LOG_ARCHIVE_DEST_1='LOCATION=/data/flash_recovery_area/PRIMARY/archivelog VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PRIMARY'
      *.LOG_ARCHIVE_DEST_2='SERVICE=ADSUB ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ADSUB'
      *.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
      *.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
      *.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc

      Standby init
      *.DB_NAME=ADSUB
      *.compatible=10.1.0.2.0
      *.remote_login_passwordfile='EXCLUSIVE'
      *.db_file_name_convert='/data/oradata/PRIMARY/',
      '/data/oradata/ADSUB/'
      *.log_file_name_convert='/data/flash_recovery_area/PRIMARY/archivelog/',
      '/data/flash_recovery_area/ADSUB/archivelog/',
      '/data/oradata/PRIMARY/',
      '/data/oradata/ADSUB/'
      *.fal_client=ADSUB
      *.fal_server=PRIMARY
      *.standby_file_management=AUTO
      *.log_archive_config='dg_config=(PRIMARY,ADSUB)'
      l*.og_archive_dest_1='service=PRIMARY ASYNC
      valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=PRIMARY'
      *.control_files='/opt/oracle/app/oracle/product/10g/db_1/dbs/ADSUB.ctl',
      '/tmp/ADSUB.ctl'

      Steps

      1) Made RMAN backup of PRIMARY

      run {
      allocate channel c1 device type disk;
      backup database plus archivelog;
      INCLUDE CURRENT CONTROLFILE FOR STANDBY;
      }

      2) Made standby control from PRIMARY

      alter database create standby controlfile as '/tmp/ADSUB.ctl';

      3) Moved standby control file to standby site

      /tmp/ADSUB.ctl
      /opt/oracle/app/oracle/product/10g/db_1/dbs/ADSUB.ctl

      4) Issed the following to duplicate

      rman
      connect target /
      connect auxiliary sys/<pass>@ADSUB

      RMAN> run{
      allocate channel c1 type disk;
      allocate channel c2 type disk;
      allocate channel c3 type disk;
      allocate channel c4 type disk;
      allocate auxiliary channel stby type disk;
      duplicate target database for standby;
      release channel c1
      }

      Starting Duplicate Db at 23-JUL-08

      contents of Memory Script:
      {
      restore clone standby controlfile;
      sql clone 'alter database mount standby database';
      }
      executing Memory Script

      Starting restore at 23-JUL-08

      channel stdby: restoring controlfile
      channel stdby: copied controlfile copy
      input filename=/tmp/ADSUB.ctl
      output filename=/opt/oracle/app/oracle/product/10g/db_1/dbs/cntrlADSUB.dbf
      Finished restore at 23-JUL-08

      sql statement: alter database mount standby database
      released channel: c1
      released channel: c2
      released channel: c3
      released channel: c4
      released channel: stdby
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of Duplicate Db command at 07/23/2008 12:34:01
      RMAN-03015: error occurred in stored script Memory Script
      RMAN-03009: failure of sql command on clone_default channel at 07/23/2008 12:34:01
      RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
      ORA-01103: database name 'PRIMARY' in controlfile is not 'ADSUB'

      Any help is greatly appreciated... What am I doing wrong???

      Thanks!
        • 1. Re: ORA-01103 - During Creation/DUPLICATE on Physical Standby
          ebrian
          Use the same DB_NAME for the standby as the primary.
          • 2. Re: ORA-01103 - During Creation/DUPLICATE on Physical Standby
            user20050
            Perfect. Worked like a charm. I'll revisit my naming conventions later ... Identified the instance name in INSTANCE_NAME and DB_UNIQUE_NAME init.

            standby init changes

            db_name=PRIMARY
            instance_name=ADSUB
            db_unique_name=ADSUB


            Thanks!
            • 3. Re: ORA-01103 - During Creation/DUPLICATE on Physical Standby
              675006
              I have the db_name parameter same on both the databases, but still the same error, could you please help ?

              I am new to oracle and am trying to setup dataguard.. I have gone through numerous documents and finally found few good ones to follow. I am following one and its stuck at the same position that the origininator of the thread was stuck on.

              please help!

              error follows
              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 12/10/2008 19:36:49
              RMAN-03015: error occurred in stored script Memory Script
              RMAN-03009: failure of sql command on clone_default channel at 12/10/2008 19:36:49
              RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
              ORA-01103: database name 'PRIMARY' in control file is not 'STANDBY'
              <My comments> The problem is ..... both the files have the same db_name :(

              init Primary
              primary.__db_cache_size=75497472
              primary.__java_pool_size=4194304
              primary.__large_pool_size=4194304
              primary.__shared_pool_size=75497472
              primary.__streams_pool_size=0
              *.audit_file_dest='/u01/app/oracle/admin/primary/adump'
              *.background_dump_dest='/u01/app/oracle/admin/primary/bdump'
              *.compatible='10.2.0.1.0'
              *.control_files='/u01/app/oracle/oradata/primary/control01.ctl','/u01/app/oracle/oradata/primary/control02.ctl','/u01/app/oracle/oradata/primary/control03.ctl'
              *.core_dump_dest='/u01/app/oracle/admin/primary/cdump'
              *.db_block_size=8192
              *.db_domain='tornado.techgene.com'
              *.db_file_multiblock_read_count=16
              *.db_name='primary'
              *.db_unique_name='primary'
              *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
              *.db_recovery_file_dest_size=2147483648
              *.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
              *.job_queue_processes=10
              *.open_cursors=300
              *.pga_aggregate_target=141557760
              *.processes=150
              *.remote_login_passwordfile='EXCLUSIVE'
              *.sga_target=167772160
              *.undo_management='AUTO'
              *.undo_tablespace='UNDOTBS1'
              *.user_dump_dest='/u01/app/oracle/admin/primary/udump'

              init standby
              primary.__db_cache_size=75497472
              primary.__java_pool_size=4194304
              primary.__large_pool_size=4194304
              primary.__shared_pool_size=75497472
              primary.__streams_pool_size=0
              *.audit_file_dest='/u01/app/oracle/admin/standby/adump'
              *.background_dump_dest='/u01/app/oracle/admin/standby/bdump'
              *.compatible='10.2.0.1.0'
              *.control_files='/u01/app/oracle/oradata/primary/control01.ctl','/u01/app/oracle/oradata/primary/control02.ctl','/u01/app/oracle/oradata/primary/control03.ctl'
              *.core_dump_dest='/u01/app/oracle/admin/standby/cdump'
              *.db_block_size=8192
              *.db_domain='tornado.techgene.com'
              *.db_file_multiblock_read_count=16
              *.db_name='primary'
              *.instance_name='standby'
              *.db_unique_name='standby'
              *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
              *.db_recovery_file_dest_size=2147483648
              *.dispatchers='(PROTOCOL=TCP) (SERVICE=primaryXDB)'
              *.job_queue_processes=10
              *.open_cursors=300
              *.pga_aggregate_target=141557760
              *.processes=150
              *.remote_login_passwordfile='EXCLUSIVE'
              *.sga_target=167772160
              *.undo_management='AUTO'
              *.undo_tablespace='UNDOTBS1'
              *.user_dump_dest='/u01/app/oracle/admin/standby/udump'
              *.db_unique_name='standby'
              *.log_archive_config=
              ‘dg_config=(primary,standby)’
              *.log_archive_dest_2=
              ’service=standby valid_for=(online_logfiles,all_roles)
              db_unique_name=standby’
              *.db_file_name_convert=’u01/app/oracle/oradata/primary/’,'u01/app/oracle/oradata/standby'
              *.log_file_name_convert=’u01/app/oracle/oradata/primary/’,'u01/app/oracle/oradata/standby'
              *.standby_file_management=auto
              *.fal_server=’standby’
              *.fal_client=’primary’
              *.service_names=’primary’
              *.db_recovery_dest=’+RECOVERY’

              Edited by: user9975399 on Dec 10, 2008 4:48 PM
              • 4. Re: ORA-01103 - During Creation/DUPLICATE on Physical Standby
                ebrian
                Several of your init parameters need to be corrected for both the primary and standby.

                Check Manually Create a Physical Standby Database Using Data Guard for a good breakdown of the full process.