ORACLE SOS

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4973|回复: 0

加错裸设备导致redo异常

[复制链接]

95

主题

266

帖子

1719

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1719
发表于 2014-6-17 20:33:23 | 显示全部楼层 |阅读模式
最近一个朋友数据库异常了,咨询我,通过分析日志发现对方人员根本不懂aix中的裸设备和Oracle数据库然后就直接使用OEM创建新表空间,导致了数据库crash而且不能正常启动
  1. Thread 1 advanced to log sequence 4395
  2.   Current log# 1 seq# 4395 mem# 0: /dev/rorcl_redo01
  3. Thu Jun 12 19:28:38 2014
  4. /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/orcl_redo04' SIZE 2000M EXTENT MANAGEMENT
  5. LOCAL SEGMENT SPACE MANAGEMENT  AUTO
  6. ORA-1119 signalled during: /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/orcl_redo04'
  7. SIZE 2000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ...
  8. Thu Jun 12 19:36:23 2014
  9. /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/orcl_redo03' SIZE 2000M EXTENT MANAGEMENT
  10. LOCAL SEGMENT SPACE MANAGEMENT  AUTO
  11. Thu Jun 12 19:43:56 2014
  12. ORA-604 signalled during: /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/orcl_redo03'
  13. SIZE 2000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ...
  14. Thu Jun 12 19:48:11 2014
  15. /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/rorcl_redo03' SIZE 2000M EXTENT
  16. MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO
  17. Thu Jun 12 19:48:11 2014
  18. ORA-1537 signalled during: /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/rorcl_redo03'
  19. SIZE 2000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ...
  20. Thu Jun 12 19:48:20 2014
  21. /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/rorcl_redo04' SIZE 2000M EXTENT
  22. MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO
  23. ORA-1537 signalled during: /* OracleOEM */ CREATE SMALLFILE TABLESPACE "XIFENFEI" LOGGING DATAFILE '/dev/rorcl_redo04'
  24. SIZE 2000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ...
  25. Fri Jun 13 00:50:37 2014
  26. Trace dumping is performing id=[cdmp_20140613005032]
  27. Fri Jun 13 00:50:40 2014
  28. Reconfiguration started (old inc 4, new inc 6)
  29. List of nodes:
  30. 0
  31. Global Resource Directory frozen
  32. * dead instance detected - domain 0 invalid = TRUE
  33. …………
  34. Fri Jun 13 00:50:40 2014
  35. Beginning instance recovery of 1 threads
  36. Reconfiguration complete
  37. Fri Jun 13 00:50:41 2014
  38. parallel recovery started with 7 processes
  39. Fri Jun 13 00:50:43 2014
  40. Started redo scan
  41. Fri Jun 13 00:50:43 2014
  42. Errors in file /oracle/admin/orcl/bdump/orcl1_smon_213438.trc:
  43. ORA-00316: log 3 of thread 2, type 0 in header is not log file
  44. ORA-00312: online log 3 thread 2: '/dev/rorcl_redo03'
  45. Fri Jun 13 00:50:43 2014
  46. Errors in file /oracle/admin/orcl/bdump/orcl1_smon_213438.trc:
  47. ORA-00316: log 3 of thread 2, type 0 in header is not log file
  48. ORA-00312: online log 3 thread 2: '/dev/rorcl_redo03'
  49. SMON: terminating instance due to error 316
  50. Fri Jun 13 00:50:43 2014
  51. Errors in file /oracle/admin/orcl/bdump/orcl1_lgwr_335980.trc:
  52. ORA-00316: log  of thread , type  in header is not log file
  53. Instance terminated by SMON, pid = 213438
复制代码

从这里可以看出来,在使用OEM创建表空间的过程中犯了两个错误
1. 未分清楚aix的块设备和字符设备的命名方式
2. 对于2节点正在使用的current redo作为不适用设备当作未使用设备来创建新表空间
由于创建表空间的使用了错误的文件和错误的设备,导致2节点的当前redo(/dev/rorcl_redo03)被损坏(因为先读redo header,所以数据库中优先反馈出来的是ORA-00316: log of thread , type in header is not log file).从而导致数据库2节点先crash,然后节点1进行实例恢复,但是由于2节点的current redo已经损坏,导致实例恢复无法完成,从而两个节点都crash.因为是rac的一个节点的当前redo损坏,数据库无法正常.
如果有备份该数据库可以使用备份还原进行恢复,如果没有备份只能使用强制拉库的方法抢救数据.希望不要发生一个大的数据丢失悲剧
介绍这个案例希望给大家以警示:对数据库的裸设备操作请谨慎,不清楚切不可乱操作,否则后果严重
具体参考:Oracle安全警示录:加错裸设备导致redo异常


Q Q:107644445
Tel:13429648788
Email:dba@xifenfei.com
个人Blog(惜分飞)
提供专业ORACLE技术支持(数据恢复,安装实施,升级迁移,备份容灾,故障诊断,系统优化等)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|ORACLE SOS 技术论坛

GMT+8, 2024-12-5 10:11 , Processed in 0.027526 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表