rman恢复之丢失非当前联机重做日志文件(读书笔记)

三思笔记

因为稍微遇到点问题,所以记一下

因为oracle运行过程中自动锁定联机重做日志,所以手动删除联机重做日志,下面记录,丢失非当前联机重做日志文件的恢复方法

1,查看联机重做日志的状态

[oracle@cindy ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sun Aug 31 23:55:30 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select group#,thread#,sequence#,members,archived,status from v$log;

    GROUP#    THREAD#  SEQUENCE#    MEMBERS ARC STATUS
---------- ---------- ---------- ---------- --- ----------------
         1          1          1          1 NO  CURRENT
         2          1          0          1 YES UNUSED
         3          1          0          1 YES UNUSED

SQL> select group#,member from v$logfile;

    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
         3
/u02/oradata/ora11g/redo03.log

         2
/u02/oradata/ora11g/redo02.log

         1
/u02/oradata/ora11g/redo01.log

可见group# 为3的是非当前

2,shutdown immediate,然后手动删除redo03

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

[oracle@cindy ~]$ cd /u02/oradata/ora11g
[oracle@cindy ora11g]$ ls
cindy01.dbf  control01.ctl  example01.dbf  redo01.log  redo02.log  redo03.log  sysaux01.dbf  system01.dbf  temp01.dbf  undotbs01.dbf  users01.dbf
[oracle@cindy ora11g]$ rm redo03.log

3,启动数据库,报错

SQL> startup
ORACLE instance started.

Total System Global Area  417546240 bytes
Fixed Size                  2228944 bytes
Variable Size             322964784 bytes
Database Buffers           88080384 bytes
Redo Buffers                4272128 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 4134
Session ID: 1 Serial number: 5

此时报错信息与书上不同,恕我是个菜鸟,也百度了,解决办法很多,但是未找到我想要的,最后在朋友的提醒下,是启动方式不对,恢复的时候不要用startup

4,shutdown abort

SQL> shutdown abort;
ORACLE instance shut down.

5,启动到mount状态

SQL> startup mount;
ORACLE instance started.

Total System Global Area  417546240 bytes
Fixed Size                  2228944 bytes
Variable Size             322964784 bytes
Database Buffers           88080384 bytes
Redo Buffers                4272128 bytes
Database mounted.

6,重建该组重做日志
SQL> alter database clear logfile group 3;

Database altered.

7,打开数据库

SQL> alter database open;

Database altered.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值