Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1053659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:17:16+00:00 2026-05-16T17:17:16+00:00

When I commit a transaction in Oracle how can I get the earliest SCN

  • 0

When I commit a transaction in Oracle how can I get the earliest SCN that contains the transactions changes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:17:17+00:00Added an answer on May 16, 2026 at 5:17 pm

    After you commit, get the current SCN using DBMS_FLASHBACK.

    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_flashb.htm#i997043

    The ORA_ROWSCN concept proposed by Adam isn’t 100% safe.

    At 10am on June 1st, I do an insert of a thousand records of 1MB each.
    At 10:30am, I do another similarly sized insert. A
    At 11am, I commit.

    Those inserts have (almost certainly) been written to the database as dirty blocks (ie containing uncommitted changes). They’ll have an SCN according to the time they were written, but the records will be marked as locked (and the block stores the id of transaction holding the lock).

    On July 15th, I read those blocks. They are still ‘dirty’ and appear locked. The read consistency mechanism goes to check the transaction and finds it doesn’t exist anymore (and hasn’t existed for some time). The system therefore knows these records were committed, but can’t actually give an accurate record of when they were committed. It cleans the dirty blocks, and sticks an SCN in there. The SCN isn’t an accurate time of when they were committed, but the SCN corresponding to the oldest time the DB can apply.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does the inserts are finished with the transaction commit? Or they can be finished
My question is how oracle treats an INSERT transaction before issuing a COMMIT. While
As I understand autonomous transactions (in the Oracle world), the autonomous transaction ends when
I'm writting a transaction in Oracle. Can I change isolation level within this transaction
Oracle 11g silently rolls back a transaction upon commit if the transaction has a
After I issue a COMMIT WRITE NOWAIT in Oracle, how can I find out
Is it possible to use the SQL BEGIN TRANSACTION, COMMIT TRANSACTION, ROLLBACK TRANSACTION when
Say a stored procedure on MSSQL Server uses an SQL transaction using BEGIN TRANSACTION/COMMIT
I have two PL/SQL Stored procedure each handling its own Transaction (Begin/Commit and Rollback
I am implementing 2-phase commit for a distributed transaction(using 2 Databases). I simulate a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.