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!

Rollback problem with Amazon Q + SQLcl MCP server

JJP BEAug 12 2025 — edited 6 days ago

While testing Amazon Q with the SQLcl MCP server, I encountered the following issue:

  • Insert:
    Amazon Q used run-sql to insert a record for a person named Wilson into the PERSONS table.

  • First SAVEPOINT attempt:
    It then used run-sql to create a savepoint named sp1, but this failed with

    ORA-17068: Invalid arguments in call

    The command executed was:

    SAVEPOINT /* LLM in use is claude-3-5-sonnet-20241022 */ sp1

  • Second SAVEPOINT attempt:
    Next, it used run-sqlcl to create a savepoint named sp1.
    This worked, and the command sent was:

    SAVEPOINT sp1

  • Subsequent changes:
    Amazon Q then used run-sql for further operations — updating an existing record and inserting another record into the PERSONS table (let's say Smith).

  • First rollback attempt:
    It then used run-sqlcl to roll back to sp1, but this failed with

    ORA-01086: savepoint 'SP1' never established in this session or is invalid

    The command sent was:

    ROLLBACK TO sp1

  • Second rollback attempt:
    After that, it used run-sql to roll back to sp1. This worked without any ORA error.
    The command sent was:

    ROLLBACK /* LLM in use is claude-3-5-sonnet-20241022 */ TO sp1

  • Result:
    Expected results: undo of PERSONS update, undo of PERSONS insert of “Smith”
    Unexpected: However, after this rollback, the Wilson row was gone.

    Did anyone faced this kind of inconsistency?

Comments
Post Details
Added on Aug 12 2025
2 comments
67 views