4 Replies Latest reply on Mar 23, 2010 6:54 PM by 140960

    Creating standby database

    677952
      Trying to create standby database
      oracle 11g Release 1
      windows server 2003 x64

      using this article:
      http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-dataguard.html

      primary database -oratest5
      standby database -oratest7

      When I run (step 10 from the link above)
      connect target sys/password@oratest5
      connect auxiliary sys/password@oratest7


      run {
      allocate channel c1 type disk;
      allocate auxiliary channel s1 type disk;

      duplicate target database for standby from active database dorecover spfile
      parameter_value_convert 'oratest5','oratest7'
      set db_unique_name='oratest7'
      set db_file_name_convert='\oratest5\','\oratest7\'
      set log_file_name_convert='\oratest5\','\oratest7\'
      set control_files='D:\oracle\oratest7\control01.ctl'
      set fal_client='oratest7'
      set fal_server='oratest5'
      set standby_file_management='AUTO'
      set log_archive_config='dg_config=(oratest5,oratest7)'
      set log_archive_dest_2='service=oratest5 LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=oratest7'
      set log_archive_dest_state_2='enable'
      set log_archive_format='oratest7_%t_%s_%r.arc'
      ;
      sql channel c1 "alter system archive log current";
      sql channel s1 "alter database recover managed standby database using current logfile disconnect";
      }


      I am getting an error:


      RMAN> connect target sys/password@oratest5

      connected to target database: ORATEST5 (DBID=3893010282, not open)

      RMAN> connect auxiliary sys/password@oratest7

      connected to auxiliary database: ORATEST5 (not mounted)

      RMAN> run {
      2> allocate channel c1 type disk;
      3> allocate auxiliary channel s1 type disk;
      4> duplicate target database
      5> for standby
      6> from active database
      7> dorecover
      8> spfile
      9> parameter_value_convert 'oratest5','oratest7'
      10> set db_unique_name='oratest7'
      11> set db_file_name_convert='\oratest5\','\oratest7\'
      12> set log_file_name_convert='\oratest5\','\oratest7\'
      13> set control_files='D:\oracle\oratest7\control01.ctl'
      14> set fal_client='oratest7'
      15> set fal_server='oratest5'
      16> set standby_file_management='AUTO'
      17> set log_archive_config='dg_config=(oratest5,oratest7)'
      18> set log_archive_dest_2='service=oratest5 LGWR ASYNC valid_for=(ONLIN
      E_LOGFILES,PRIMARY_ROLE) db_unique_name=oratest7'
      19> set log_archive_dest_state_2='enable'
      20> set log_archive_format='oratest7_%t_%s_%r.arc'
      21> ;
      22> sql channel c1 "alter system archive log current";
      23> sql channel s1 "alter database recover managed standby database using curr
      ent logfile disconnect";
      24> }

      using target database control file instead of recovery catalog
      allocated channel: c1
      channel c1: SID=154 device type=DISK

      allocated channel: s1
      channel s1: SID=152 device type=DISK

      Starting Duplicate Db at 15-MAR-10

      contents of Memory Script:
      {
      backup as copy reuse
      file 'c:\oracle\product\11.1.0\db_1\DATABASE\PWDoratest5.ORA' auxiliary form
      at
      'c:\oracle\product\11.1.0\db_1\DATABASE\PWDoratest7.ORA' file
      'C:\ORACLE\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEORATEST5.ORA' auxiliary format
      'C:\ORACLE\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEORATEST7.ORA' ;
      sql clone "alter system set spfile= ''C:\ORACLE\PRODUCT\11.1.0\DB_1\DATABASE\
      SPFILEORATEST7.ORA''";
      }
      executing Memory Script

      Starting backup at 15-MAR-10
      Finished backup at 15-MAR-10

      sql statement: alter system set spfile= ''C:\ORACLE\PRODUCT\11.1.0\DB_1\DATABASE
      \SPFILEORATEST7.ORA''
      released channel: c1
      released channel: s1
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of Duplicate Db command at 03/15/2010 11:50:17
      RMAN-03015: error occurred in stored script Memory Script
      RMAN-03009: failure of sql command on clone_default channel at 03/15/2010 11:50:
      17
      RMAN-11003: failure during parse/execution of SQL statement: alter system set sp
      file= 'C:\ORACLE\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEORATEST7.ORA'
      ORA-32017: failure in updating SPFILE
      ORA-32019: The parameter SPFILE cannot be updated in the server parameter file.

      Trying to figure out what's wrong with it.
        • 1. Re: Creating standby database
          140960
          Hi,

          Have you fix the problem?


          I have the same problem when I followed the same document doing the standby on Window XP environment.

          Here is the error logs:

          RMAN> run {
          2> allocate channel c1 type disk;
          3> allocate auxiliary channel s1 type disk;
          4>
          5> duplicate target database
          6> for standby
          7> from active database
          8> dorecover
          9> spfile
          10> parameter_value_convert 'ocp11g','ocp11gsb'
          11> set db_unique_name='ocp11gsb'
          12> set db_file_name_convert='C:\Oracle11g\oradata\ocp11g\','C:\Oracle11g\oradata\ocp11gsb\'
          13> set log_file_name_convert='C:\Oracle11g\oradata\ocp11g\','C:\Oracle11g\oradata\ocp11gsb\'
          14> set control_files='C:\Oracle11g\oradata\ocp11gsb\control01.ctl'
          15> set fal_client='ocp11gsb'
          16> set fal_server='ocp11g'
          17> set standby_file_management='AUTO'
          18> set log_archive_config='dg_config=(ocp11g,ocp11gsb)'
          19> set log_archive_dest_2='service=ocp11g LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=ocp11gsb'
          20> set log_archive_dest_state_2='enable'
          21> set log_archive_format='ocp11gsb_%t_%s_%r.arc'
          22> ;
          23> sql channel c1 "alter system archive log current";
          24> sql channel s1 "alter database recover managed standby database using current logfile disconnect";
          25> }

          allocated channel: c1
          channel c1: SID=108 device type=DISK

          allocated channel: s1
          channel s1: SID=152 device type=DISK

          Starting Duplicate Db at 22-MAR-10

          contents of Memory Script:
          {
          backup as copy reuse
          file 'C:\Oracle11g\product\11.1.0\db_1\DATABASE\PWDocp11g.ORA' auxiliary format
          'C:\Oracle11g\product\11.1.0\db_1\DATABASE\PWDocp11gsb.ORA' file
          'C:\ORACLE11G\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEOCP11G.ORA' auxiliary format
          'C:\ORACLE11G\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEOCP11GSB.ORA' ;
          sql clone "alter system set spfile= ''C:\ORACLE11G\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEOCP11GSB.ORA''";
          }
          executing Memory Script

          Starting backup at 22-MAR-10
          Finished backup at 22-MAR-10

          sql statement: alter system set spfile= ''C:\ORACLE11G\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEOCP11GSB.ORA''
          released channel: c1
          released channel: s1
          RMAN-00571: ===========================================================
          RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
          RMAN-00571: ===========================================================
          RMAN-03002: failure of Duplicate Db command at 03/22/2010 22:07:43
          RMAN-03015: error occurred in stored script Memory Script
          RMAN-03009: failure of sql command on clone_default channel at 03/22/2010 22:07:43
          RMAN-11003: failure during parse/execution of SQL statement: alter system set spfile= 'C:\ORACLE11G\PRODUCT\11.1.0\DB_1\DATABASE\SPFILEOCP11GSB.ORA'
          ORA-32017: failure in updating SPFILE
          ORA-32019: The parameter SPFILE cannot be updated in the server parameter file.


          Hope some expert can help me.

          Thanks,
          Peter
          • 2. Re: Creating standby database
            sb92075
            32019, 00000, "The parameter SPFILE cannot be updated in the server parameter file."                                                                
            // *Cause:  An attempt was made to update the parameter SPFILE in the server 
            //          parameter file.
            // *Action: Convert the server parameter file into a parameter file and then
            //          add the parameters needed and recreate the server parameter file.
            • 3. Re: Creating standby database
              avramits
              You need to remove spfile from standby side and start nomount database with pfile.

              Pfile example:

              *.db_name='DB1'
              *.db_unique_name='DB1_STDBY'
              *.diagnostic_dest='D:\app\oracle'
              *.enable_ddl_logging=TRUE
              *.memory_target=1024M
              • 4. Re: Creating standby database
                140960
                Thank you so much.
                It works.

                Peter