Home
image/camel.gif

The World of Smenu


image/camel.gif

Streams maintenance with Smenu


1. Synchronizing with Smenu

Given 2 tables non synchronized, we need to get the table captured scn and set the target table to this value.
After that  you restart the apply process. this happen when you get an ORA-26687:

[POLDEV]:/> oerr ora 26687
26687, 00000, "no instantiation SCN provided"
// *Cause:  Object SCN has not been set
// *Action: Set the SCN by calling DBMS_APPLY_ADM.SET_INSTANTIATION_SCN


[MISPROD]:/scripts/oracle/streams> cap -i | grep CUSTOMERFAC
                     ONE_CUSTOMERFAC                 187485098828 03-01-2006 12:23:53
                     ALL_CUSTOMERFAC                 187485098837 03-01-2006 12:23:53
                     SPMS_LABEL_CUSTOMERFAC          187485096797 03-01-2006 12:00:03
                     BASIC_CUSTOMERFACS              187485096868 03-01-2006 12:00:03
 
Cut and paste the scn and use funct 'app -fi'
[RMANTST]:> app -fi -so USERA -t ONE_CUSTOMERFAC -src_sid POLDEV -x -v -scn 187485098828
 
It generates and execute :
    execute DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(  source_object_name=> 'USERA.ONE_CUSTOMERFAC', source_database_name => '
POLDEV' ,  instantiation_scn => 187485098828 );
 
[RMANTST]:> app -fi -so USERA -t ALL_CUSTOMERFAC -src_sid POLDEV -x -v -scn  187485098837
 
It generates and execute :
    execute DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(  source_object_name=> 'USERA.ALL_CUSTOMERFAC', source_database_name => 'POLDEV' ,  instantiation_scn => 187485098837 );
 
------> check :
[RMANTST]:> app -i
 
MACHINE s30301          - ORACLE_SID : RMANTST                                            Page:   1
 
Date              -  Tuesday   03rd January   2006  13:04:41
Username          -  SYS
Show instantiated objects
 
MACHINE s30301          - ORACLE_SID : RMANTST                                                                    Page:   1
 
                                                                     Object                      Using
Source Database        Object Name                                    Type     Instantiation SCN Dblink
---------------------- --------------------------------------------- --------- ----------------- ------------------
POLDEV                USERA.ALL_CUSTOMERFAC                         TABLE          187485098837
POLDEV                USERA.ONE_CUSTOMERFAC                         TABLE          187485098828
 
[RMANTST]:> app -start -an apply_to_shared
 
It generates and execute :
    execute  DBMS_APPLY_ADM.START_APPLY( apply_name => 'APPLY_TO_SHARED');
  
[RMANTST]:> aq -l
 
MACHINE s30301          - ORACLE_SID : RMANTST                                            Page:   1
 
Date              -  Tuesday   03rd January   2006  13:05:30
Username          -  SYS
List Queues in system, type < aq -l -ex > for exception queues
                                                                    Queue             Message Count
   Qid Queue Owner and Name                 Queue Table             Type     Enq Deq   in Queue
------ ------------------------------------ ---------------------- --------- --- --- -------------
  7556 STRMADMIN.RECEIVER_QUEUE             RECEIVER_QUEUE         NORMAL    YES YES         23080
  7557 STRMADMIN.AQ$_RECEIVER_QUEUE_E       RECEIVER_QUEUE         EXCEPTION NO  NO
 
[RMANTST]:/export/TAR/oracle/scripts/smenu/module3/s8> aq -l
 
MACHINE s30301          - ORACLE_SID : RMANTST                                            Page:   1
 
Date              -  Tuesday   03rd January   2006  13:05:32
Username          -  SYS
List Queues in system, type < aq -l -ex > for exception queues
 
                                                                   Queue             Message Count
   Qid Queue Owner and Name                 Queue Table             Type     Enq Deq   in Queue
------ ------------------------------------ ---------------------- --------- --- --- -------------
  7556 STRMADMIN.RECEIVER_QUEUE             RECEIVER_QUEUE         NORMAL    YES YES         22619
  7557 STRMADMIN.AQ$_RECEIVER_QUEUE_E       RECEIVER_QUEUE         EXCEPTION NO  NO
 
 
 
and the queue start to empty.
 


      Email : Bpolarsk@yahoo.com                                             Last update : 03 January 2006