热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

RMAN_RAC恢复至单机时redo日志引发的“恐慌”

其实这个问题确切来说由于自己的疏忽所造成,之前做过RAC到单机的恢复实验,生产环境并无涉足,当时测试环境为Redhat5.4+Oracle1

其实这个问题确切来说由于自己的疏忽所造成,之前做过RAC到单机的恢复实验,生产环境并无涉足,当时测试环境为Redhat5.4+Oracle1

一、概括

其实这个问题确切来说由于自己的疏忽所造成,之前做过RAC到单机的恢复实验,生产环境并无涉足,当时测试环境为RedHat5.4+Oracle11g+RAC,存储方式为ASM;生产环境为hpux+Oracle10g+RAC,存储方式为裸设备;就目前来看,,跟数据文件的存储方式有关。

二、 Hpux中,recover完成,执行’alter database open resetlogs’时报以下错误

SQL> alter database open resetlogs;

alter database open resetlogs

*

ERROR at line 1:

ORA-19502: write error on file "/dev/vgdb/rredo2_2a_256m", blockno 105473

(blocksize=1024)

ORA-27072: File I/O error

HPUX-ia64 Error: 2: No such file or directory

Additional information: 4

Additional information: 105473

Additional information: 433152

查看alert日志

ORA-1589 signalled during: alter database open...

Wed Oct 29 08:15:21 2014

alter database open resetlogs

Wed Oct 29 08:15:21 2014

Errors in file /oracle/admin/pmssd/udump/pmssd1_ora_11597.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/dev/vgdb/rredo1_1b_256m'

ORA-27037: unable to obtain file status

HPUX-ia64 Error: 2: No such file or directory

Additional information: 3

ORA-00312: online log 1 thread 1: '/dev/vgdb/rredo1_1ax`_256m'

ORA-27037: unable to obtain file status

HPUX-ia64 Error: 2: No such file or directory

Additional information: 3

Wed Oct 29 08:15:21 2014

查看视图v$logfile

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_

---------- ------- ------- ---------------------------- ---

1 ONLINE /dev/vgdb/rredo1_1a_256m NO

2 ONLINE /dev/vgdb/rredo1_2a_256m NO

3 ONLINE /dev/vgdb/rredo2_1a_256m NO

4 ONLINE /dev/vgdb/rredo2_2a_256m NO

1 ONLINE /dev/vgdb/rredo1_1b_256m NO

2 ONLINE /dev/vgdb/rredo1_2b_256m NO

3 ONLINE /dev/vgdb/rredo2_1b_256m NO

4 ONLINE /dev/vgdb/rredo2_2b_256m NO

5 ONLINE /dev/vgdb/rredo1_3a_256m NO

5 ONLINE /dev/vgdb/rredo1_3b_256m NO

6 ONLINE /dev/vgdb/rredo2_3a_256m NO

6 ONLINE /dev/vgdb/rredo2_3b_256m NO

根下目录dev为设置目录,我们需要修改redo日志目录,以完成数据库open操作,语句如下:

SQL> alter database rename file '/dev/vgdb/rredo1_1a_256m' to '/oracle/oradata/pmssd/redo01.log';

我并没有按照以上语句操作,而是重新创建了控制文件,这个问题是自己犯二了。修改完redo日志目录后就可以把数据库open了。

下面是我在linux ASM模式下的操作(’alter database open resetlogs’)。如以下日志,数据库自动重建了redo日志,并指定到了相应目录

Wed Oct 29 09:27:19 2014

alter database open resetlogs

RESETLOGS after incomplete recovery UNTIL CHANGE 783268

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_ora_3900.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '+DATA/racdb/onlinelog/group_1.257.859438553'

ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb/onlinelog/group_1.257.859438553

ORA-15001: diskgroup "DATA" does not exist or is not mounted

ORA-15077: could not locate ASM instance serving a required diskgroup

ORA-29701: unable to connect to Cluster Synchronization Service

ORA-00312: online log 1 thread 1: '+DATA/racdb/onlinelog/group_1.273.859438547'

ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb/onlinelog/group_1.273.859438547

ORA-15001: diskgroup "DATA" does not exist or is not mounted

ORA-15077: could not locate ASM instance serving a required diskgroup

ORA-29701: unable to connect to Cluster Synchronization Service

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_ora_3900.trc:

…………………………………………………………….

WARNING: ASM communication error: op 16 state 0x40 (15077)

ERROR: slave communication error with ASM

WARNING: Cannot delete Oracle managed file +DATA/racdb/onlinelog/group_4.275.859442003

WARNING: ASM communication error: op 16 state 0x40 (15077)

ERROR: slave communication error with ASM

WARNING: Cannot delete Oracle managed file +DATA/racdb/onlinelog/group_4.271.859442011

Wed Oct 29 09:28:15 2014

Clearing online redo logfile 4 complete

Resetting resetlogs activation ID 857045326 (0x3315794e)

Online log /oracle/oradata/racdb/RACDB/onlinelog/o1_mf_1_b50jmr0p_.log: Thread 1 Group 1 was previously cleared

Online log /oracle/backup/archive_racdb/RACDB/onlinelog/o1_mf_1_b50jmsl4_.log: Thread 1 Group 1 was previously cleared

Online log /oracle/oradata/racdb/RACDB/onlinelog/o1_mf_2_b50jn5rw_.log: Thread 1 Group 2 was previously cleared

Online log /oracle/backup/archive_racdb/RACDB/onlinelog/o1_mf_2_b50jn6jm_.log: Thread 1 Group 2 was previously cleared

Online log /oracle/oradata/racdb/RACDB/onlinelog/o1_mf_3_b50jnkqn_.log: Thread 2 Group 3 was previously cleared

Online log /oracle/backup/archive_racdb/RACDB/onlinelog/o1_mf_3_b50jnltx_.log: Thread 2 Group 3 was previously cleared

Online log /oracle/oradata/racdb/RACDB/onlinelog/o1_mf_4_b50jnz10_.log: Thread 2 Group 4 was previously cleared

Online log /oracle/backup/archive_racdb/RACDB/onlinelog/o1_mf_4_b50jo0jb_.log: Thread 2 Group 4 was previously cleared

Wed Oct 29 09:28:16 2014

Setting recovery target incarnation to 2

Wed Oct 29 09:28:17 2014

Assigning activation ID 859863386 (0x3340795a)

LGWR: STARTING ARCH PROCESSES

Wed Oct 29 09:28:17 2014

ARC0 started with pid=20, OS id=3924

ARC0: Archival started

LGWR: STARTING ARCH PROCESSES COMPLETE

Thread 1 opened at log sequence 1

Current log# 1 seq# 1 mem# 0: /oracle/oradata/racdb/RACDB/onlinelog/o1_mf_1_b50jmr0p_.log

Current log# 1 seq# 1 mem# 1: /oracle/backup/archive_racdb/RACDB/onlinelog/o1_mf_1_b50jmsl4_.log

Successful open of redo thread 1

ARC0: STARTING ARCH PROCESSES

Wed Oct 29 09:28:17 2014

ARC1 started with pid=21, OS id=3926

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Wed Oct 29 09:28:17 2014

SMON: enabling cache recovery

Wed Oct 29 09:28:17 2014

ARC2 started with pid=22, OS id=3928

Wed Oct 29 09:28:17 2014

ARC3 started with pid=23, OS id=3930

ARC1: Archival started

ARC2: Archival started

ARC1: Becoming the 'no FAL' ARCH

ARC1: Becoming the 'no SRL' ARCH

ARC2: Becoming the heartbeat ARCH

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

Redo thread 2 internally disabled at seq 1 (CKPT)

ARC0: Archiving disabled thread 2 sequence 1

Archived Log entry 27 added for thread 2 sequence 1 ID 0x0 dest 1:

[3900] Successfully onlined Undo Tablespace 2.

Undo initialization finished serial:0 start:4182896 end:4184866 diff:1970 (19 seconds)

Dictionary check beginning

File #7 is offline, but is part of an online tablespace.

data file 7: '+DATA/racdb/datafile/test2.260.859451699'

File #9 is offline, but is part of an online tablespace.

data file 9: '+DATA/racdb/datafile/test4.258.859451727'

Wed Oct 29 09:28:24 2014

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_dbw0_3814.trc:

ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

ORA-01110: data file 201: '+DATA/racdb/tempfile/temp.286.859438605'

ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb/tempfile/temp.286.859438605

ORA-15001: diskgroup "DATA" does not exist or is not mounted

ORA-15077: could not locate ASM instance serving a required diskgroup

ORA-29701: unable to connect to Cluster Synchronization Service

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_dbw0_3814.trc:

ORA-01186: file 201 failed verification tests

ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

ORA-01110: data file 201: '+DATA/racdb/tempfile/temp.286.859438605'

File 201 not verified due to error ORA-01157

Dictionary check complete

Verifying file header compatibility for 11g tablespace encryption..

Verifying 11g file header compatibility for tablespace encryption completed

SMON: enabling tx recovery

Re-creating tempfile +DATA/racdb/tempfile/temp.286.859438605 as /oracle/oradata/racdb/RACDB/datafile/o1_mf_temp_b50jor8m_.tmp

Database Characterset is ZHS16GBK

Wed Oct 29 09:28:27 2014

No Resource Manager plan active

replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

Wed Oct 29 09:28:31 2014

QMNC started with pid=24, OS id=3937

LOGSTDBY: Validating controlfile with logical metadata

LOGSTDBY: Validation complete

Wed Oct 29 09:28:42 2014

db_recovery_file_dest_size of 5727 MB is 13.97% used. This is a

user-specified limit on the amount of space that will be used by this

database for recovery-related files, and does not reflect the amount of

space available in the underlying filesystem or ASM diskgroup.

Wed Oct 29 09:28:45 2014

Starting background process CJQ0

Wed Oct 29 09:28:45 2014

CJQ0 started with pid=27, OS id=3957

Wed Oct 29 09:28:46 2014

Completed: alter database open resetlogs

在执行’alter database open resetlogs’之前,修改redo日志目录,open时redo日志就会在指定的目录生成。

alter database rename file '+DATA/racdb/onlinelog/group_1.273.859438547' to '/oracle/oradata/racdb/redo1_a.log';

alter database rename file '+DATA/racdb/onlinelog/group_1.257.859438553' to '/oracle/oradata/racdb/redo1_b.log';

alter database rename file '+DATA/racdb/onlinelog/group_2.256.859438561' to '/oracle/oradata/racdb/redo2_a.log';

alter database rename file '+DATA/racdb/onlinelog/group_2.291.859438567' to '/oracle/oradata/racdb/redo2_b.log';

alter database rename file '+DATA/racdb/onlinelog/group_3.277.859441989' to '/oracle/oradata/racdb/redo3_a.log';

alter database rename file '+DATA/racdb/onlinelog/group_3.276.859441997' to '/oracle/oradata/racdb/redo3_b.log';

alter database rename file '+DATA/racdb/onlinelog/group_4.275.859442003' to '/oracle/oradata/racdb/redo4_a.log';

查看alert日志


lter database open resetlogs

RESETLOGS after incomplete recovery UNTIL CHANGE 783268

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_ora_3683.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/oracle/oradata/racdb/redo1_b.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

ORA-00312: online log 1 thread 1: '/oracle/oradata/racdb/redo1_a.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_ora_3683.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1: '/oracle/oradata/racdb/redo2_b.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

……………………………..

Additional information: 3

ORA-00312: online log 2 thread 1: '/oracle/oradata/racdb/redo2_a.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Clearing online redo logfile 2 /oracle/oradata/racdb/redo2_a.log

Clearing online log 2 of thread 1 sequence number 30

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_ora_3683.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1: '/oracle/oradata/racdb/redo2_b.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

………………………………..

Clearing online redo logfile 4 complete

Resetting resetlogs activation ID 857045326 (0x3315794e)

Online log /oracle/oradata/racdb/redo1_a.log: Thread 1 Group 1 was previously cleared

Online log /oracle/oradata/racdb/redo1_b.log: Thread 1 Group 1 was previously cleared

Online log /oracle/oradata/racdb/redo2_a.log: Thread 1 Group 2 was previously cleared

Online log /oracle/oradata/racdb/redo2_b.log: Thread 1 Group 2 was previously cleared

Online log /oracle/oradata/racdb/redo3_a.log: Thread 2 Group 3 was previously cleared

Online log /oracle/oradata/racdb/redo3_b.log: Thread 2 Group 3 was previously cleared

Online log /oracle/oradata/racdb/redo4_a.log: Thread 2 Group 4 was previously cleared

Online log /oracle/oradata/racdb/redo4_b.log: Thread 2 Group 4 was previously cleared

Wed Oct 29 09:18:08 2014

Setting recovery target incarnation to 2

Wed Oct 29 09:18:09 2014

Assigning activation ID 859838345 (0x33401789)

LGWR: STARTING ARCH PROCESSES

Wed Oct 29 09:18:09 2014

ARC0 started with pid=20, OS id=3730

ARC0: Archival started

LGWR: STARTING ARCH PROCESSES COMPLETE

ARC0: STARTING ARCH PROCESSES

Thread 1 opened at log sequence 1

Current log# 1 seq# 1 mem# 0: /oracle/oradata/racdb/redo1_a.log

Current log# 1 seq# 1 mem# 1: /oracle/oradata/racdb/redo1_b.log

Successful open of redo thread 1

Wed Oct 29 09:18:10 2014

ARC1 started with pid=21, OS id=3732

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Wed Oct 29 09:18:10 2014

SMON: enabling cache recovery

Wed Oct 29 09:18:10 2014

ARC2 started with pid=22, OS id=3734

Wed Oct 29 09:18:10 2014

ARC3 started with pid=23, OS id=3736

ARC1: Archival started

ARC2: Archival started

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

ARC0: Becoming the 'no FAL' ARCH

ARC0: Becoming the 'no SRL' ARCH

ARC2: Becoming the heartbeat ARCH

Redo thread 2 internally disabled at seq 1 (CKPT)

ARC0: Archiving disabled thread 2 sequence 1

Archived Log entry 27 added for thread 2 sequence 1 ID 0x0 dest 1:

Wed Oct 29 09:18:22 2014

[3683] Successfully onlined Undo Tablespace 2.

Undo initialization finished serial:0 start:3581386 end:3583566 diff:2180 (21 seconds)

Dictionary check beginning

File #7 is offline, but is part of an online tablespace.

data file 7: '+DATA/racdb/datafile/test2.260.859451699'

File #9 is offline, but is part of an online tablespace.

data file 9: '+DATA/racdb/datafile/test4.258.859451727'

Wed Oct 29 09:18:23 2014

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_dbw0_3455.trc:

ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

ORA-01110: data file 201: '+DATA/racdb/tempfile/temp.286.859438605'

ORA-17503: ksfdopn:2 Failed to open file +DATA/racdb/tempfile/temp.286.859438605

ORA-15001: diskgroup "DATA" does not exist or is not mounted

ORA-15077: could not locate ASM instance serving a required diskgroup

ORA-29701: unable to connect to Cluster Synchronization Service

Errors in file /oracle/app/oracle/diag/rdbms/racdb/racdb1/trace/racdb1_dbw0_3455.trc:

ORA-01186: file 201 failed verification tests

ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

ORA-01110: data file 201: '+DATA/racdb/tempfile/temp.286.859438605'

File 201 not verified due to error ORA-01157

Dictionary check complete

Verifying file header compatibility for 11g tablespace encryption..

Verifying 11g file header compatibility for tablespace encryption completed

Wed Oct 29 09:18:23 2014

SMON: enabling tx recovery

Re-creating tempfile +DATA/racdb/tempfile/temp.286.859438605 as /oracle/oradata/racdb/RACDB/datafile/o1_mf_temp_b50j2zdh_.tmp

Database Characterset is ZHS16GBK

No Resource Manager plan active

replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

Wed Oct 29 09:18:32 2014

QMNC started with pid=24, OS id=3743

Wed Oct 29 09:18:33 2014

LOGSTDBY: Validating controlfile with logical metadata

LOGSTDBY: Validation complete

Wed Oct 29 09:18:45 2014

Starting background process CJQ0

Wed Oct 29 09:18:45 2014

CJQ0 started with pid=27, OS id=3763

Wed Oct 29 09:18:45 2014

Completed: alter database open resetlogs

推荐阅读
  • 本文详细介绍如何使用Python进行配置文件的读写操作,涵盖常见的配置文件格式(如INI、JSON、TOML和YAML),并提供具体的代码示例。 ... [详细]
  • 1:有如下一段程序:packagea.b.c;publicclassTest{privatestaticinti0;publicintgetNext(){return ... [详细]
  • 构建基于BERT的中文NL2SQL模型:一个简明的基准
    本文探讨了将自然语言转换为SQL语句(NL2SQL)的任务,这是人工智能领域中一项非常实用的研究方向。文章介绍了笔者在公司举办的首届中文NL2SQL挑战赛中的实践,该比赛提供了金融和通用领域的表格数据,并标注了对应的自然语言与SQL语句对,旨在训练准确的NL2SQL模型。 ... [详细]
  • 在Ubuntu 16.04 LTS上配置Qt Creator开发环境
    本文详细介绍了如何在Ubuntu 16.04 LTS系统中安装和配置Qt Creator,涵盖了从下载到安装的全过程,并提供了常见问题的解决方案。 ... [详细]
  • 本文详细介绍了如何在 Linux 平台上安装和配置 PostgreSQL 数据库。通过访问官方资源并遵循特定的操作步骤,用户可以在不同发行版(如 Ubuntu 和 Red Hat)上顺利完成 PostgreSQL 的安装。 ... [详细]
  • 本文详细分析了Hive在启动过程中遇到的权限拒绝错误,并提供了多种解决方案,包括调整文件权限、用户组设置以及环境变量配置等。 ... [详细]
  • MySQL缓存机制深度解析
    本文详细探讨了MySQL的缓存机制,包括主从复制、读写分离以及缓存同步策略等内容。通过理解这些概念和技术,读者可以更好地优化数据库性能。 ... [详细]
  • MySQL 数据库迁移指南:从本地到远程及磁盘间迁移
    本文详细介绍了如何在不同场景下进行 MySQL 数据库的迁移,包括从一个硬盘迁移到另一个硬盘、从一台计算机迁移到另一台计算机,以及解决迁移过程中可能遇到的问题。 ... [详细]
  • 从 .NET 转 Java 的自学之路:IO 流基础篇
    本文详细介绍了 Java 中的 IO 流,包括字节流和字符流的基本概念及其操作方式。探讨了如何处理不同类型的文件数据,并结合编码机制确保字符数据的正确读写。同时,文中还涵盖了装饰设计模式的应用,以及多种常见的 IO 操作实例。 ... [详细]
  • 本文详细介绍了如何使用ActionScript 3.0 (AS3) 连接并操作MySQL数据库。通过具体的代码示例和步骤说明,帮助开发者理解并实现这一过程。 ... [详细]
  • 使用Vultr云服务器和Namesilo域名搭建个人网站
    本文详细介绍了如何通过Vultr云服务器和Namesilo域名搭建一个功能齐全的个人网站,包括购买、配置服务器以及绑定域名的具体步骤。文章还提供了详细的命令行操作指南,帮助读者顺利完成建站过程。 ... [详细]
  • Linux 基础命令详解
    本文介绍了在 Linux 系统中常见的命令及其用法。当用户登录系统后,默认提示符会显示为 [root@localhost ~]# 或 [user@localhost ~]$,其中 # 表示当前用户为 root,$ 表示普通用户。我们将深入探讨一些常用的 Linux 命令,帮助初学者更好地理解和使用这些工具。 ... [详细]
  • 在现代网络环境中,两台计算机之间的文件传输需求日益增长。传统的FTP和SSH方式虽然有效,但其配置复杂、步骤繁琐,难以满足快速且安全的传输需求。本文将介绍一种基于Go语言开发的新一代文件传输工具——Croc,它不仅简化了操作流程,还提供了强大的加密和跨平台支持。 ... [详细]
  • 解决微信电脑版无法刷朋友圈问题:使用安卓远程投屏方案
    在工作期间想要浏览微信和朋友圈却不太方便?虽然微信电脑版目前不支持直接刷朋友圈,但通过远程投屏技术,可以轻松实现在电脑上操作安卓设备的功能。 ... [详细]
  • 在即将迎来26岁生日之际,作者的人生陷入了低谷。经过近三年的硕士学习后,最终决定退学,并且面临没有工作经验的困境。尽管如此,作者依然坚定地选择为自己的人生负责。 ... [详细]
author-avatar
SIX2FOUR
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有