Enhancing SCN in Oracle and Case Study

Source: Internet
Author: User

In the Oracle database, we can use oracle internal events to adjust the SCN. There are two common methods to improve SCN:

1. alter session set events 'immediate trace name ADJUST_SCN level x ';
-- Database OPEN is required

2. Event 10015
Alter session set events '10015 trace name adjust_scn level x ';
-- The database cannot be opened, and the database is in the mount state.
Note: level 1 increases SCN 1 billion (1 billion) (1024*1024*1024 = 1073741824)

Test:
SQL> select dbms_flashback.get_system_change_number from dual;
 
GET_SYSTEM_CHANGE_NUMBER
------------------------
571904
 
SQL> alter session set events 'immediate trace name ADJUST_SCN level 1 ';
Session altered
 
-- The 10 Gb alarm log reports the following error:
Tue Mar 31 17:01:00 2009
Errors in file c: \ oracle \ product \ 10.2.0 \ admin \ orasloud \ udump \ orasjh_ora_2208.trc:
ORA-01031: insufficient Permissions
Check the trace file and report the following error:
...
Clearing ORA-1031 thrown by trace 'adjust _ SCN'
----- Dump for trace 'adjust _ SCN ':-----
* ** 17:01:00. 828
Ksedmp: internal or fatal error
ORA-01031: insufficient Permissions
Current SQL statement for this session:
...
 
I have no problem in 9i testing.
 
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
1073766630
 
Test the enhancement of SCN when the database is closed.
 
SQL> shutdown immediate;
The database has been closed.
The database has been detached.
The ORACLE routine has been disabled.
SQL>
 
SQL> startup mount
The ORACLE routine has been started.
Total System Global Area 147921840 bytes
Fixed Size 453552 bytes
Variable Size 121634816 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
The database has been loaded.
SQL> alter session set events '10015 trace name adjust_scn level 10 ';
The session has been changed.
SQL> alter database open;
The database has been changed.
SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
1.0737E + 10
SQL>

  • 1
  • 2
  • Next Page

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.