Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

25.2 project: migration from sqlCL 25.1 causes error when staging sequences

Moritz I.Jul 30 2025 — edited Aug 1 2025

Dear SQLcl experts,

i recently upgraded a SQLcl 25.1 project to SQLcl 25.2.0.0. Following Dan McGhans article i created a new feature-branch, changed the SQLcl version in project conf, made a new snapshot and then did the staging, which ran into the following error:

SQL> project stage -verbose

Ausführung des Stage-Befehls wird mit der aktuellen Verzweigung gestartet

Wird von Stage verglichen:
Alte Verzweigung        refs/heads/develop
Neue Verzweigung        refs/heads/feature/sqlcl-upgr-25.2

Erstelltes Verzeichnis:   dist\releases\next\changes
Erstelltes Verzeichnis:   dist\releases\next\changes\featuresqlcl-upgr-25.2
Erstelltes Verzeichnis:   dist\releases\next\changes\featuresqlcl-upgr-25.2\_custom
Erstellte Änderung:dist\releases\next\changes\featuresqlcl-upgr-25.2\stage.changelog.xml
WARN: Git hat eine Differenz in Datei src/database/dame_rmsfb/tables/f_fse_fall.sql, gemeldet, aber dbms_metadata hat keine Änderungen erzeugt.
Prüfen Sie diese Datei, um sicherzustellen, dass die Git-Differenzen keine DDL-Änderungen erzeugen sollten.
Aktualisierte Datei:  dist\releases\next\changes\featuresqlcl-upgr-25.2\dame_rmsfb\tables\f_fse_fall.sql
Aktualisierte Änderung:dist\releases\next\changes\featuresqlcl-upgr-25.2\stage.changelog.xml
Aktualisierte Änderung:dist\releases\next\changes\featuresqlcl-upgr-25.2\stage.changelog.xml
Aktualisierte Änderung:dist\releases\next\release.changelog.xml
Aktualisierte Änderung:dist\releases\next\release.changelog.xml

Ausführung von Stage-Befehl in Verzweigung feature/sqlcl-upgr-25.2 abgeschlossen
ERROR: Die folgenden Dateien wurden nicht verarbeitet. Stellen Sie sicher, dass sich unten in den Dateien jeweils ein Hashzeichen befindet und der gesamte weitere Inhalt korrekt ist. Korrigieren Sie die Dateien, und führen Sie den Stage-Befehl erneut aus
SEQUENCE        D_ERGEBNIS_TYP_SEQ      d_ergebnis_typ_seq.sql
SEQUENCE        D_FSE_FALL_MERKER_SEQ   d_fse_fall_merker_seq.sql
SEQUENCE        D_FSE_FALL_PRUEFUNG_SEQ d_fse_fall_pruefung_seq.sql
SEQUENCE        D_FSE_FALL_SEQ  d_fse_fall_seq.sql
SEQUENCE        D_FSE_HERKUNFT_SEQ      d_fse_herkunft_seq.sql
SEQUENCE        D_FSE_TYP_SEQ   d_fse_typ_seq.sql
SEQUENCE        D_FSE_UEMA_MERKER_SEQ   d_fse_uema_merker_seq.sql
SEQUENCE        D_FSE_ZUSTAND_SEQ       d_fse_zustand_seq.sql
SEQUENCE        D_UNTERNEHMEREIGENSCHAFT_SEQ    d_unternehmereigenschaft_seq.sql
SEQUENCE        D_ZUSTAENDIGKEIT_SEQ    d_zustaendigkeit_seq.sql

Stage erfolgreich verarbeitet. Prüfen Sie Ihre Änderungen, und schreiben Sie sie im Repository fest

Changes not staged for commit
        modified: dist/releases/next/release.changelog.xml

 Untracked files:
        artifact
        dist/releases/0.5.1/changes/featuremd_temp_tabs/_custom
        dist/releases/0.5.0/changes/featurebaseline/_custom
        dist/releases/next/changes
        dist/releases/0.5.1/changes/release0.5.1/_custom
        dist/releases/0.5.0/changes/release0.5.0/_custom

The error message translated to english:

“ERROR: The following files were not processed. Make sure that there is a hash sign at the bottom of each file and that all other content is correct. Correct the files and run the stage command again.”

I suppose this is related to a change in 25.2 concerning the snapshot of sequences. Comparing the two snapshots.

SQLcl 25.1 snapshot

create sequence dame_rmsfb.d_ergebnis_typ_seq minvalue 1 maxvalue 9999999999999999999999999999 increment by 1 start with 5 nocache order
nocycle nokeep noscale global;


-- sqlcl_snapshot {"hash":"5c07daefe6d082b46860b958511ef87b2925750f","type":"SEQUENCE","name":"D_ERGEBNIS_TYP_SEQ","schemaName":"DAME_RMSFB","sxml":"\n  <SEQUENCE xmlns=\"http://xmlns.oracle.com/ku\" version=\"1.0\">\n   <SCHEMA>DAME_RMSFB</SCHEMA>\n   <NAME>D_ERGEBNIS_TYP_SEQ</NAME>\n   <START_WITH>5</START_WITH>\n   <INCREMENT>1</INCREMENT>\n   <MINVALUE>1</MINVALUE>\n   <MAXVALUE>9999999999999999999999999999</MAXVALUE>\n   <CACHE>0</CACHE>\n   <ORDER></ORDER>\n   <SCALE>NOSCALE</SCALE>\n</SEQUENCE>"}

SQLcl 25.2 snapshot

create sequence dame_rmsfb.d_ergebnis_typ_seq minvalue 1 maxvalue 9999999999999999999999999999 increment by 1 /* start with n */ nocache
order nocycle nokeep noscale global;


-- sqlcl_snapshot {"hash":"3f802263d8a642c1dede34918d4f4ff084febdcd","type":"SEQUENCE","name":"D_ERGEBNIS_TYP_SEQ","schemaName":"DAME_RMSFB","sxml":"\n  <SEQUENCE xmlns=\"http://xmlns.oracle.com/ku\" version=\"1.0\">\n   <SCHEMA>DAME_RMSFB</SCHEMA>\n   <NAME>D_ERGEBNIS_TYP_SEQ</NAME>\n   \n   <INCREMENT>1</INCREMENT>\n   <MINVALUE>1</MINVALUE>\n   <MAXVALUE>9999999999999999999999999999</MAXVALUE>\n   <CACHE>0</CACHE>\n   <ORDER></ORDER>\n   <SCALE>NOSCALE</SCALE>\n</SEQUENCE>"}

In the 25.2 snapshot the XML-Tag “START_WITH” is missing, sql only contains a static comment. I suppose i need to somehow tweak the old-snapshot so it could be compared in 25.2?

But the main question is if a changeset having the new sequence sql code would be a sensible option at all. Since the snapshot got changed, the hash changed as well, which will lead to an execution in the target db, where the sequence is already in place, leading to an ORA-error.

I suppose i should just not stage the changes at all but just merge the 25.2 version of the snapshot files into develop branch and also update the hashes in databasechangelog in target db to prevent a new sequence creation?

I'd be thankful for a feedback or an alternative solution.

Best regards

Moritz

This post has been answered by danmcghan-Oracle on Jul 31 2025
Jump to Answer
Comments
Post Details
Added on Jul 30 2025
2 comments
85 views