1 Reply Latest reply: Mar 24, 2014 5:34 AM by Renu-Oracle RSS

    Invalid streams process type SYNC_CAPTURE

    Nino Putra

      Hi all..Im a newbie here

      I want to learning about oracle streams in 10gR2..

      I had made stream admin, db link, and archivelog database

      but when I try to execute this code, an error was occurred :

       

      DECLARE
                      cscn NUMBER;
      BEGIN
      
      DBMS_STREAMS_ADM.SET_UP_QUEUE(queue_name => 'capture_queue', queue_user =>'strmadmin');
      
      DBMS_STREAMS_ADM.SET_UP_QUEUE(queue_name => 'apply_queue', queue_user =>'strmadmin');
      
      DBMS_APPLY_ADM.CREATE_APPLY(
                      queue_name    => 'strmadmin.apply_queue',
                      apply_name       => 'apply_hr_jobs',
                      apply_captured                => FALSE);
      
      DBMS_STREAMS_ADM.ADD_TABLE_RULES(
                      table_name       => 'hr.jobs',
                      streams_type    => 'apply',
                      streams_name => 'apply_hr_jobs',
                      queue_name    => 'strmadmin.apply_queue',
                      source_database             => 'orcl');
      
      DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(
                      table_name                       => 'hr.jobs',
                      streams_name                 => 'send_hr_jobs',
                      source_queue_name    => 'strmadmin.capture_queue',
                      destination_queue_name           => 'strmadmin.apply_queue@orcl',
                      source_database                             => 'db1',
                      queue_to_queue                            => TRUE);
      
      DBMS_STREAMS_ADM.ADD_TABLE_RULES(
                      table_name       => 'hr.jobs',
                      streams_type    => 'sync_capture',
                      streams_name => 'sync_capture',
                      queue_name    => 'strmadmin.capture_queue');
      
      cscn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();
      DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN@orcl(
                      source_object_name              => 'hr.jobs',
                      source_database_name        => 'db1',
                      instantiation_scn                          => cscn);
      
      DBMS_APPLY_ADM.START_APPLY(
                      apply_name       => 'apply_hr_jobs');
      
      END;
      /
      
      
      


      this is the Error :

       

      DECLARE
      *
      ERROR at line 1:
      ORA-23602: Invalid streams process type SYNC_CAPTURE
      ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 372
      ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 312
      ORA-06512: at line 32
      
      
      

       

      I already grant dba and all privileges for the user strmadmin..

      and I already follow this thread..but didn't work for me

       

      Sorry for the bad english and hope somebody can help me

       

      thank you guys