SQL> select current_scn from v$database;
CURRENT_SCN
-----------
5100732
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
修改pfile,添加参数
[oracle@devin-enmo script]$ vi /u01/app/oracle/product/12.2/dbhome_1/dbs/inithkora.ora
_allow_resetlogs_corruption=true
*.event="21307096 trace name context forever, level 5"
PFILE启动
[oracle@devin-enmo script]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Feb 1 14:17:21 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile='/u01/app/oracle/product/12.2/dbhome_1/dbs/inithkora.ora'
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 8619496 bytes
Variable Size 201329176 bytes
Database Buffers 50331648 bytes
Redo Buffers 8155136 bytes
Database mounted.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 5106151 generated at 02/01/2021 14:16:20 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/fast_recovery_area/1_1_1063364001.dbf
ORA-00280: change 5106151 for thread 1 is in sequence #1
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
-----------
10106627
事件21307096以百万为单位递增,如上LEVEL 5,SCN推进了500W。
根据LEVEL值不一样,数据库OPEN耗时也不一样,计算公式:
level 1 Elapsed: 00:01:02.35
level 2 Elapsed: 00:02:16.23
level 6 Elapsed: 00:06:08.05
In general: based on a 16k per second scn rate (16K/sec) , the open resetlogs time
would be at least (event level * 1000000 / 16000) seconds. Then level 1 would be at least
62+ seconds and level 4095 would be 71+ hours !.
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




