Partitioning the DBFS Sequence Numbers

DBFS uses an internal sequence-number generator to construct unique names and unique IDs.

These steps partition the sequences into distinct ranges to ensure that there are no conflicts across the databases. After this is done, further DBFS operations (both creation of new file systems and subsequent file system operations) can be performed without conflicts of names, primary keys, or IDs during DML propagation.

  1. Connect to each database as sysdba.

    Issue the following query on each database.

    select last_number
    from dba_sequences
    where sequence_owner = 'SYS'
    and sequence_name = 'DBFS_SFS_$FSSEQ'
    
  2. From this query, choose the maximum value of LAST_NUMBER across both systems, or pick a high value that is significantly larger than the current value of the sequence on either system.
  3. Substitute this value ("maxval" is used here as a placeholder) in both of the following procedures. These procedures logically index each system as myid=0 and myid=1.

    Node1

    declare
    begin
    dbms_dbfs_sfs_admin.partition_sequence(nodes => 2, myid => 0, newstart => :maxval);
    commit;
    end;
    /
    

    Node 2

    declare
    begin
    dbms_dbfs_sfs_admin.partition_sequence( nodes => 2, myid => 1, newstart => :maxval);
    commit;
    end;
    /

    Note:

    Notice the difference in the value specified for the myid parameter. These are the different index values.

    For a multi-way configuration among three or more databases, you could make the following alterations:

    • Adjust the maximum value that is set for maxval upward appropriately, and use that value on all nodes.

    • Vary the value of myid in the procedure from 0 for the first node, 1 for the second node, 2 for the third one, and so on.

  4. (Recommended) After (and only after) the DBFS sequence generator is partitioned, create a new DBFS file system on each system, and use only these file systems for DML propagation with Oracle GoldenGate.

Note:

If you must retain old file systems, open a service request with Oracle Support.