在oracle异常恢复中常见就是scn不一致场景,通常是重建control file,推SCN , openresetlogs打开,堆SCN的方法有很多比如oradebug poke, event 10015/21307096 , _minmum_giga_scn,gdb/dbx, 修改控制文件,修改文件头,adjust_scn等方式,但因版本不同有些方法并不适用,刚好今天遇到了ORA-00600: internal error code, arguments: [kcbzib_kcrsds_1] 错误,修复方法中有可以推scn,刚好小测一下oracle 26ai 是否还支持event推SCN.
[oracle@db1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Fri Jan 30 16:17:07 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 2413009192 bytes
Fixed Size 5011752 bytes
Variable Size 1073741824 bytes
Database Buffers 1325400064 bytes
Redo Buffers 8855552 bytes
Database mounted.
SQL> alter database open;
Database altered.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
4320537
创建pfile,增加event
SQL> show parameter pfile
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
/u01/app/oracle/product/26.0.0
/dbhome_1/dbs/spfileanbob.ora
SQL> create pfile='/home/oracle/pfile26.ora' from spfile;
File created.
SQL> shut immediate;
[oracle@db1 ~]$ vi pfile26.ora
*.event="21307096 trace name context forever, level 1"
--event推进是以level * 100万单位推进
先以正常方式Open
SQL> startup pfile='/home/oracle/pfile26.ora';
ORACLE instance started.
Total System Global Area 2413009192 bytes
Fixed Size 5011752 bytes
Variable Size 1073741824 bytes
Database Buffers 1325400064 bytes
Redo Buffers 8855552 bytes
Database mounted.
Database opened.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
4321643
使用recover+resetlogs
[oracle@db1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 23.26.1.0.0 - Production on Fri Jan 30 16:23:57 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile='/home/oracle/pfile26.ora';
ORACLE instance started.
Total System Global Area 2413009192 bytes
Fixed Size 5011752 bytes
Variable Size 1073741824 bytes
Database Buffers 1325400064 bytes
Redo Buffers 8855552 bytes
Database mounted.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 4321896 generated at 01/30/2026 16:17:26 needed for thread 1
ORA-00289: suggestion :
/oracle/oradata/fast_recovery_area/ANBOB/archivelog/2026_01_30/o1_mf_1_7_%u_.arc
ORA-00280: change 4321896 for thread 1 is in sequence #7
Help: https://docs.oracle.com/error-help/db/ora-00279/
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> alter database open resetlogs;
Database altered.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
5323325
Note:
现在SCN增加了100万,证明event方式在26ai还是支持的推SCN的。
— over —