你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle 重做联机日志文件

[日期:2012-02-15] 来源:Linux社区  作者:huzia [字体:大 中 小]

进行恢复

该参数默认值为FALSE,为TRUE说明,在破坏唯一性的情况下强制重置日志,打开数据库。在打开的过程中,Oracle会跳过一致性检查,使数据库处于不一致的状态下打开。

SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;

System altered.

修改后,重启数据库。

SQL> shutdown  immeditae

ORA-01109: database not open

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area  146472960 bytes

Fixed Size                  1298472 bytes

Variable Size              92278744 bytes

Database Buffers           50331648 bytes

Redo Buffers                2564096 bytes

Database mounted.

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 3046568 generated at 09/26/2010 00:59:56 needed for thread 1

ORA-00289: suggestion :

/u01/flash_recovery_area/ORCL/archivelog/2010_09_26/o1_mf_1_2_%u_.arc

ORA-00280: change 3046568 for thread 1 is in sequence #2

Specify log: {=suggested | filename | AUTO | CANCEL}

cancel

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/u01/oradata/orcl/system01.dbf'

ORA-01112: media recovery not started

如果这里出现错误,跳过即可

SQL> alter database open resetlogs;

Database altered.

检查发现,日志文件已恢复。

SQL> !ls -l /u01/oradata1

total 102528

-rw-r-----  1 oracle oinstall 52429312 Sep 26 03:49 redo010.log

-rw-r-----  1 oracle oinstall 52429312 Sep 26 03:54 redo02.log

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area  146472960 bytes

Fixed Size                  1298472 bytes

Variable Size              92278744 bytes

Database Buffers           50331648 bytes

Redo Buffers                2564096 bytes

Database mounted.

Database opened.

数据库被打开后,马上执行全备,shutdown数据库,修改_all_resetlogs_corrupt参数为FALSE linux
相关资讯       oracle数据库教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款