Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is ORACLE SCN?

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "What is ORACLE SCN", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "What is ORACLE SCN"!

Oracle scn is the full name of system change number, which translates to system change number. It records the state of Oracle at a given moment. Moreover, only changes will match the corresponding SCN. Only when a row is inserted, deleted, or updated does the state of the database change.

Oracle sorts events that occur within the system through SCN, which increments in SGA like a continuously increasing sequence number. It is critical for data recovery after a database instance crash.

SCN Principle:

When a transaction inserts or modifies data, Oracle first writes a new SCN to the rollback segment. If the transaction commits, lgwr immediately writes the commit record of the transaction to the redo log file, which gets a unique SCN number.

How SCN helps database recovery after instance crash:

Whenever the database performs a checkpoint operation, Oracle writes a start scn number to the header of the datafile, and the control file maintains an SCN value for each datafile called stop scn. Whenever the instance stops normally, Oracle copies the start scn number in the header of the data file to the stop scn number in the data file in the control file. When restarting the database after a normal shutdown, recovery is not required because scn in the data file and scn in the control file match each other. If the instance stops abnormally, which causes the SCN in the control file and data file header to be inconsistent, Oracle considers the instance to be in need of recovery.

At this point, I believe that everyone has a deeper understanding of "what is ORACLE SCN", may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report