User Tools

Site Tools


plsql_sequence

Sequence PL/SQL

Instructions

Before executing the below procedures make sure the following has been done …

  • Database Links created on both databases
  • The following tables have been created as GGATE user …
    • sync_sequences_log
    • mol_gg_sequences (10g Database only)
  • Respective packages below have been created on relevant database
-- Run on 10g Database
exec mol_sequences.mol_seqoddeven('REGISTRATION');
exec mol_sequences.mol_seqoddeven('RDRCOMMENTS');
exec mol_sequences.mol_seqoddeven('MAILONLINE');
exec mol_sequences.mol_seqoddeven('FBIAGENT');

-- Run on 12c Database
exec mol_sequences.mol_seq_alternate('REGISTRATION');
exec mol_sequences.mol_seq_alternate('RDRCOMMENTS');
exec mol_sequences.mol_seq_alternate('MAILONLINE');
exec mol_sequences.mol_seq_alternate('FBIAGENT');

-- Check sequences are OK by running below SQL
select owner, sequence_name, valueint 10g_VALUE, valuepoc 12c_VALUE,
       case when mod(ValueInt,2) = mod(ValuePOC,2) then 'ERROR'
         else 'ODD EVEN SUCCESS'
       end Validation
from ggate.mol_gg_sequences
order by owner, sequence_name;

PL/SQL Code

plsql_sequence.txt · Last modified: 2021/12/06 11:30 by 127.0.0.1