博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【练习---日志恢复】正常关库删除一组当前日志组
阅读量:4977 次
发布时间:2019-06-12

本文共 1936 字,大约阅读时间需要 6 分钟。

1.查询当前日志组及状态:

10:45:14 SYS@ORA11GR2>select group#,member from v$logfile;    GROUP# MEMBER---------- --------------------------------------------------         3 /u01/app/oracle/oradata/ORA11GR2/redo03.log         2 /u01/app/oracle/oradata/ORA11GR2/redo02.log         1 /u01/app/oracle/oradata/ORA11GR2/redo01.log         3 /u01/app/oracle/disk/redo03b.log         2 /u01/app/oracle/disk/redo02b.log         1 /u01/app/oracle/disk/redo01b.log6 rows selected.10:45:26 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log;    GROUP#    MEMBERS          M STATUS---------- ---------- ---------- ----------------         1          2         50 CURRENT         2          2         50 INACTIVE         3          2         50 ACTIVE

2.模拟故障(正常关库删除一组当前日志组):

10:45:53 SYS@ORA11GR2>shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.[oracle@host03 ~]$ rm /u01/app/oracle/oradata/ORA11GR2/redo01.log[oracle@host03 ~]$ rm /u01/app/oracle/disk/redo01b.log

3.起库报错,查看alert日志:

ORA-00313: open failed for members of log group 1 of thread 1ORA-00312: online log 1 thread 1: '/u01/app/oracle/disk/redo01b.log'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/ORA11GR2/redo01.log'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3

4.解决:将数据库起到mount

10:50:09 SYS@ORA11GR2>alter database clear logfile group 1;Database altered. 10:51:35 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log;    GROUP#    MEMBERS          M STATUS---------- ---------- ---------- ----------------         1          2         50 UNUSED         3          2         50 INACTIVE         2          2         50 CURRENT10:51:41 SYS@ORA11GR2>alter database open;Database altered.

 

 

 

 

转载于:https://www.cnblogs.com/tomatoes-/p/6159420.html

你可能感兴趣的文章
Linux环境下SolrCloud集群环境搭建关键步骤
查看>>
MongoDB的简单使用
查看>>
prometheus配置
查看>>
【noip2004】虫食算——剪枝DFS
查看>>
python 多进程和多线程的区别
查看>>
sigar
查看>>
iOS7自定义statusbar和navigationbar的若干问题
查看>>
[Locked] Wiggle Sort
查看>>
deque
查看>>
c#中从string数组转换到int数组
查看>>
java小技巧
查看>>
POJ 3204 Ikki's Story I - Road Reconstruction
查看>>
toad for oracle中文显示乱码
查看>>
SQL中Group By的使用
查看>>
两个表格中数据不用是一一对应关系--来筛选不同数据,或者相同数据
查看>>
js05-DOM对象二
查看>>
mariadb BINLOG_FORMAT = STATEMENT 异常
查看>>
C#生成随机数
查看>>
Java回顾之多线程
查看>>
机电行业如何进行信息化建设
查看>>