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 are the four ways to obtain the SCN number of Oracle database?

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you what are the four ways to obtain the SCN number of the Oracle database. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Here are four common methods to obtain the SCN number of Oracle database for reference. Friends who are familiar with them can float by.

Before 1.9i, the approximate SCN number was calculated by x$ktuxe view.

Sys@ora10g > select max (ktuxescnw * power (2mem32) + ktuxescnb) SCN from x$ktuxe

SCN

-

256019

After 2.9i, you can get the SCN number through the dbms_ flashback package.

Sys@ora10g > select dbms_flashback.get_system_change_number from dual

GET_SYSTEM_CHANGE_NUMBER

-

256030

Starting from 3.10g, the SCN number can be obtained directly through v$database.

Sys@ora10g > select current_scn from v$database

CURRENT_SCN

-

256030

4. Get the SCN number from memory

Sys@ora10g > oradebug setmypid

Statement processed.

Sys@ora10g > oradebug DUMPvar SGA kcsgscn_

Kcslf kcsgscn_ [20009228, 20009248) = 00000000 0003E81E 00000784 00000000 00000000 00000000 20009034

Sys@ora10g > select to_number ('3E81E recording recording xxxxxxx') SCN from dual

SCN

-

256030

5. Summary

The information of SCN number can be obtained by the above four methods. After testing, the first one is not the exact SCN number, but the SCN number obtained by the other three is the same, so you can choose any one to query.

These are the four ways to get the SCN number of Oracle database shared by the editor. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

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

Servers

Wechat

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

12
Report