Close Menu
Şevket Ayaksız
    What's Hot

    Oracle SAVEPOINT: Undo Part of a Transaction Without Losing Its Earlier Work

    November 12, 2026

    Oracle SUBSTR and SUBSTRB: Decide Whether Your Limit Means Characters or Bytes

    November 12, 2026

    Java floorDiv and floorMod: Handle Negative Coordinates Deliberately

    November 12, 2026
    • software
    • Gadgets
    Şevket AyaksızŞevket Ayaksız
    • Home
    • Technology

      Apple: iPhone 17 and Older Models Hit With Unexpected $100 Price Increase

      September 10, 2026

      Apple Watch Intelligence Could Be a Major Accessibility Breakthrough

      September 10, 2026

      Apple May Skip the Base iPhone 18 This Year

      September 10, 2026

      FCC changes robot vacuum rules, potentially affecting future models

      August 8, 2026

      Samsung’s new 2TB 990 SSD drops to its lowest price yet

      August 6, 2026
    • Adobe

      Premiere Markers: Keep Source Notes Separate from Edit Decisions

      November 12, 2026

      Photoshop Smart Filters: Keep Effects Adjustable Throughout an Edit

      November 11, 2026

      Illustrator Scaling: Keep Strokes and Effects in Proportion

      November 10, 2026

      Illustrator Global Swatches: Make Color Changes Follow Your Design

      November 8, 2026

      Adobe Acrobat Bookmarks: Give Long PDFs a Useful Navigation Structure

      November 7, 2026
    • Microsoft

      Word Table Headers: Keep Long Tables Understandable on Every Page

      November 12, 2026

      Excel Structured References: Write Formulas That Explain Their Data

      November 11, 2026

      Word Pagination: Keep a Heading with the Paragraph That Follows

      November 10, 2026

      PowerPoint Selection Pane: Find and Manage Objects Behind Other Objects

      November 10, 2026

      Excel Data Validation: Guide Entry and Check What Arrives Later

      November 8, 2026
    • java

      Java floorDiv and floorMod: Handle Negative Coordinates Deliberately

      November 12, 2026

      Java Period and Duration: Define What “One Day Later” Means

      November 11, 2026

      Java Comparator Null Handling: Decide Where Missing Values Belong

      November 11, 2026

      Java String.split: Preserve Empty Fields When Their Position Matters

      November 10, 2026

      Java String Case Conversion: Choose the Locale Explicitly

      November 8, 2026
    • Oracle

      Oracle SAVEPOINT: Undo Part of a Transaction Without Losing Its Earlier Work

      November 12, 2026

      Oracle SUBSTR and SUBSTRB: Decide Whether Your Limit Means Characters or Bytes

      November 12, 2026

      Oracle LEFT JOIN Filters: Preserve the Rows Your Report Needs

      November 11, 2026

      Oracle Running Totals: Choose ROWS or RANGE Before Trusting the Result

      November 10, 2026

      Oracle NULLIF: Handle a Zero Denominator Without Inventing a Result

      November 8, 2026
    Şevket Ayaksız
    Anasayfa » Oracle SAVEPOINT: Undo Part of a Transaction Without Losing Its Earlier Work
    Oracle

    Oracle SAVEPOINT: Undo Part of a Transaction Without Losing Its Earlier Work

    By sevketayaksizNovember 12, 2026No Comments3 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Oracle SAVEPOINT: Undo Part of a Transaction Without Losing Its Earlier Work
    Share
    Facebook Twitter LinkedIn Pinterest Email

    A transaction may contain several related changes, yet an application sometimes needs to abandon only its most recent step. Starting over can be unnecessary when earlier work remains valid.

    Oracle savepoints provide named positions inside the current transaction. They are useful when partial recovery is part of the intended workflow, but they do not make changes permanent or create an independent transaction.

    Place the savepoint at a meaningful boundary

    Imagine a maintenance operation that updates a draft record and then attempts an optional classification step. If the classification is rejected, the application may want to preserve the draft update while removing the attempted classification.

    A savepoint can mark the boundary between those steps:

    SAVEPOINT before_classification;

    Oracle documents that reusing a savepoint name replaces the earlier savepoint with that name. Choose names that explain the workflow stage and avoid accidental reuse.

    The key design question comes before the SQL: is keeping the earlier work valid under the application’s rules? Partial rollback is appropriate only when the answer is clear.

    Distinguish partial rollback from ending the transaction

    To return to the named point:

    ROLLBACK TO SAVEPOINT before_classification;

    Oracle states that this undoes the work after the savepoint without ending the transaction. Savepoints created after the target are removed; the target and earlier savepoints remain.

    A plain ROLLBACK has a different scope: it ends the transaction and undoes all its uncommitted changes.

    Make that distinction visible in error-handling code. A generic exception handler that always performs a full rollback may conflict with a workflow designed around partial recovery.

    Conversely, rolling back only one stage is insufficient if an error invalidates the entire operation.

    Do not mistake a savepoint for saved data

    A savepoint is not a durable checkpoint that survives a commit. Oracle’s COMMIT statement ends the transaction, makes its changes permanent, and removes its savepoints.

    Oracle also documents implicit commits around DDL statements: before syntactically valid DDL and after DDL that completes successfully.

    Keep schema changes out of an experiment that depends on rolling ordinary data changes back to a savepoint.

    Check the client’s transaction behavior as well. If an application or database tool commits between steps, the intended transaction boundary has already changed. A correctly spelled savepoint command cannot repair that mismatch.

    Test the intended recovery path

    Use disposable test records and a controlled session. Perform an initial change, create a savepoint, perform a second change, and roll back to the savepoint. Inspect the data to confirm that the first change remains pending while the second has been undone.

    Then end the test transaction explicitly.

    For application testing, include both a recoverable failure in the optional stage and a failure that requires abandoning the whole operation. Verify that each takes the intended path.

    Also review actions outside the database. A database rollback should not be assumed to reverse an email already sent or an external request already completed. Organize those effects according to their own recovery rules.

    Savepoints are most useful when the application has a precise answer to three questions: what may be undone, what must remain together, and who decides when the final transaction is committed.

    Sources:

    • Oracle — SAVEPOINT
    • Oracle — ROLLBACK
    • Oracle — COMMIT
    Views: 1
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    sevketayaksiz
    • Website

    Related Posts

    Oracle SUBSTR and SUBSTRB: Decide Whether Your Limit Means Characters or Bytes

    November 12, 2026

    Oracle LEFT JOIN Filters: Preserve the Rows Your Report Needs

    November 11, 2026

    Oracle Running Totals: Choose ROWS or RANGE Before Trusting the Result

    November 10, 2026
    Add A Comment

    Comments are closed.

    Şevket Ayaksız
    Instagram
    • Home
    • Adobe
    • microsoft
    • java
    • Oracle
    • Contact
    © 2026 Theme Designed by Şevket Ayaksız.

    Type above and press Enter to search. Press Esc to cancel.