Oracle: flashbackversionquery example

Source: Internet
Author: User
Oracle: In the flashbackversionquery example, flashbackversionquery is not a new feature of oracle. However, both 10g and 11g have enhanced functions based on 9i.

Oracle: In the flashback version query example, flashback version query is not a new feature of oracle, but 10g and 11g Both feature enhancements Based on 9i.

Flashback version query is not a new feature of Oracle, but the 10g and 11g functions are enhanced on the basis of 9i, which may be used in some occasions. The following example shows his concept;

The title of the query result column is a little long. I have truncated it. Otherwise, the whole row cannot be displayed. Check the column title against the preceding query statement;

Brief description:

Row 6: start_scn: 3852006 end_scn: 3852023 operation: I (insert) indicates inserting values (1, 'jash ')

The fifth line: start_scn: 3852023 operation: U (update) indicates that the record with 'bob' id 1 is updated. Therefore, the newly inserted data in Row 6 is updated;

......

......

You can see that the version record of the row of interest can be found through the query, which must exist in the undo rollback segment and commit committed transactions;

Finally, let's take a look at the overview of the official documentation:

Oracle Flashback features use the Automatic Undo Management (AUM) system to obtain metadata and historical data for transactions. they rely on undo data, which are records of the effects of inpidual transactions. for example, if a user runs an UPDATE statement to change a salary from 1000 to 1100, then Oracle Database stores the value 1000 in the undo data. undo data is persistent and has ves a database shutdown.

By using flashback features, you can use undo data to query past data or recover from logical damage. Besides using it in flashback features, Oracle Database uses undo data to perform these actions:

Roll back active transactions

Recover terminated transactions by using database or process recovery

Provide read consistency for SQL queries

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.