Consultor Eletrônico



Kbase P130145: SQL script generated for Cycling Sequences by PRO2ORA does not include the current value
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/3/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.x
Oracle DataServer
All Supported Operating Systems

SYMPTOM(s):

Using OpenEdge DB to ORACLE (PRO2ORA) utility to migrate a Progress database to Oracle

Progress database contains cycling Sequences i.e. a sequence that restarts after it reaches the specified limit

Cycling sequence has been used and incremented

.SQL script generated by PRO2ORA does not include the current value of the cycling sequence

Oracle version of the cycling sequence will begin at its initial value instead of the current value

Generated SQL for a cycling sequence:

DROP SEQUENCE seq2cyc;
CREATE SEQUENCE seq2cyc START WITH 0 INCREMENT BY 1 MAXVALUE 9223372036854775807 MINVALUE 0 CYCLE;

Generated SQL for a standard sequence contains the correct START WITH value

CAUSE:

This is a known issue

FIX:

Extract the SQL statements that DROP and CREATE the sequences from the .SQL script.
Change the START WITH value to the desired setting. For example:

DROP SEQUENCE seq2cyc;
CREATE SEQUENCE seq2cyc START WITH 50 INCREMENT BY 1 MAXVALUE 9223372036854775807 MINVALUE 0 CYCLE;

Execute these statements via Oracle's SQLPLUS to drop and recreate the sequence with the correct value.