oracle ora16433,ORA-16433 The database must be opened in read write mode故障解决 | 信春哥,系统稳,闭眼上线不回滚!...

今天给客户搭建DG,在RMAN备份控制文件的时候遇到ORA-16433错误,客户的环境是OEL5.4,ORACLE是11.2.0.3.0版本。

RMAN> backup current controlfile format '/home/oracle/control.bak';

Starting backup at 07-MAR-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=80 instance=orcl1 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/07/2014 15:04:04

ORA-16433: The database must be opened in read/write mode.

当前数据库是read/write模式打开的,没有问题。

SQL> select open_mode from v$database;

OPEN_MODE

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

READ WRITE

不只是在RMAN备份的时候遇到这个错误,在创建STANDBY CONTROLFILE的时候也遇到这个错误。

SQL> alter database create standby controlfile as '/home/oracle/pfile111.log';

alter database create standby controlfile as '/home/oracle/pfile111.log'

*

ERROR at line 1:

ORA-16433: The database must be opened in read/write mode.

而且在备份控制文件到文本的时候也报这个错误。

SQL> alter database backup controlfile to trace;

alter database backup controlfile to trace

*

ERROR at line 1:

ORA-16433: The database must be opened in read/write mode.

为什么在触碰控制文件的时候都报这个错误呢?在MOS上找到了相关信息,这是由于BUG 8422605导致的,下面摘自MOS(ID 1074855.1)。

Possible Symptoms:

o Database was upgraded to 11.1.0.7.2

The database shows its in read write mode. ( open )

RMAN Resync catalog failing with errors:

o This problem can be caused by a recreate of the controlfile with resetlogs,

and subsequent failure during the open resetlogs.

That is, if recreating a controlfile with resetlogs option, but if there are any issues

during the open resetlogs, leaving the database in this state reporting

.

ORA-16433: The database has not been opened in read-write mode

$ rman catalog rman/rman@xxx target sys/xxx@xxx

Recovery Manager: Release 11.1.0.7.0 - Production on Mon Mar 15 10:58:49 2010

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

connected to target database: OPMMPRF2 (DBID=1078444404)

connected to recovery catalog database

RMAN> resync catalog;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of resync command on default channel at 03/15/2010 10:58:56

ORA-16433: The database has not been opened in read-write mode

-Tried to open the database in read only then change it to read write. Same error

-Tried sql> 'alter database backup controlfile to trace' from sqlplus failed with the same error

SQL> alter database backup controlfile to trace;

alter database backup controlfile to trace

*

ERROR at line 1:

ORA-16433: The database has not been opened in read-write mode

Cause

Bug 8422605 BACKUP CONTROLFILE TO TRACE GENERATES ORA-16433 AFTER 11.1.0.7

UPGRADE V1110:

Status: 31,Could Not Reproduce.

Solution

1) Recreate the controlfile with NORESETLOGS option.

2) Recover database using this command:

SQL> recover database;

3) Open the database as follows:

SQL> alter database open;

ORACLE给出的解决方案是重建控制文件,还好这是测试环境,可以重建控制文件,问题就没那么复杂了。

SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup nomount

ORACLE instance started.

Total System Global Area 535662592 bytes

Fixed Size 1346140 bytes

Variable Size 272631204 bytes

Database Buffers 255852544 bytes

Redo Buffers 5832704 bytes

SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS FORCE LOGGING ARCHIVELOG

2 MAXLOGFILES 16

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 100

5 MAXINSTANCES 8

6 MAXLOGHISTORY 292

7 LOGFILE

8 GROUP 1 ('+ORCLDG/orcl/onlinelog/group_1.257.840568065','+FRADG/orcl/onlinelog/group_1.257.840568065') SIZE 50M,

9 GROUP 2 ('+ORCLDG/orcl/onlinelog/group_2.258.840568065','+FRADG/orcl/onlinelog/group_2.258.840568065') SIZE 50M,

10 GROUP 3 ('+ORCLDG/orcl/onlinelog/group_3.265.840568065','+FRADG/orcl/onlinelog/group_3.259.840568065') SIZE 50M,

11 GROUP 4 ('+ORCLDG/orcl/onlinelog/group_4.266.840568065','+FRADG/orcl/onlinelog/group_4.260.840568065') SIZE 50M

12 -- STANDBY LOGFILE

13 DATAFILE

14 '+ORCLDG/orcl/datafile/system.259.824845765',

15 '+ORCLDG/orcl/datafile/undotbs1.260.824845773',

16 '+ORCLDG/orcl/datafile/sysaux.261.824845773',

17 '+ORCLDG/orcl/datafile/undotbs2.263.824845777',

18 '+ORCLDG/orcl/datafile/users.264.824845777',

19 '+ORCLDG/orcl/datafile/ts_etl_rep_32bit.dbf',

20 '+ORCLDG/orcl/datafile/ts_cs_edm.dbf',

21 '+ORCLDG/orcl/datafile/bf_zx_bpm.dbf',

22 '+ORCLDG/orcl/datafile/bf_fe_fts.dbf',

23 '+ORCLDG/orcl/datafile/bf_se_mkt.dbf',

24 '+ORCLDG/orcl/datafile/bf_ys_evs.dbf',

25 '+ORCLDG/orcl/datafile/ts_etl_domain_32bit.dbf',

26 '+ORCLDG/orcl/datafile/ts_cs_edm_realtime.dbf',

27 '+ORCLDG/orcl/datafile/dbdream.1487.841590405'

28 CHARACTER SET ZHS16GBK

29 ;

Control file created.

SQL> select status from v$instance;

STATUS

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

MOUNTED

SQL> alter database open;

Database altered.

SQL> alter system set cluster_database=true scope=spfile;

System altered.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 535662592 bytes

Fixed Size 1346140 bytes

Variable Size 272631204 bytes

Database Buffers 255852544 bytes

Redo Buffers 5832704 bytes

Database mounted.

Database opened.

这样之前的备份信息就需要通过CATLOG注册到控制文件,否则这部分备份信息就丢失了,本案例直接重新备份数据库和控制文件,传到备库服务器去恢复备库。

[oracle@test52 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Fri Mar 7 15:54:53 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1352626495)

RMAN> backup as compressed backupset full database format '/home/oracle/full_%U';

Starting backup at 07-MAR-14

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=140 instance=orcl1 device type=DISK

channel ORA_DISK_1: starting compressed full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=+ORCLDG/orcl/datafile/ts_etl_rep_32bit.dbf

input datafile file number=00007 name=+ORCLDG/orcl/datafile/ts_cs_edm.dbf

input datafile file number=00013 name=+ORCLDG/orcl/datafile/ts_cs_edm_realtime.dbf

input datafile file number=00003 name=+ORCLDG/orcl/datafile/sysaux.261.824845773

input datafile file number=00001 name=+ORCLDG/orcl/datafile/system.259.824845765

input datafile file number=00002 name=+ORCLDG/orcl/datafile/undotbs1.260.824845773

input datafile file number=00004 name=+ORCLDG/orcl/datafile/undotbs2.263.824845777

input datafile file number=00014 name=+ORCLDG/orcl/datafile/dbdream.1487.841590405

input datafile file number=00008 name=+ORCLDG/orcl/datafile/bf_zx_bpm.dbf

input datafile file number=00009 name=+ORCLDG/orcl/datafile/bf_fe_fts.dbf

input datafile file number=00010 name=+ORCLDG/orcl/datafile/bf_se_mkt.dbf

input datafile file number=00011 name=+ORCLDG/orcl/datafile/bf_ys_evs.dbf

input datafile file number=00012 name=+ORCLDG/orcl/datafile/ts_etl_domain_32bit.dbf

input datafile file number=00005 name=+ORCLDG/orcl/datafile/users.264.824845777

channel ORA_DISK_1: starting piece 1 at 07-MAR-14

channel ORA_DISK_1: finished piece 1 at 07-MAR-14

piece handle=/home/oracle/full_02p2jcfm_1_1 tag=TAG20140307T155533 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:05

channel ORA_DISK_1: starting compressed full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 07-MAR-14

channel ORA_DISK_1: finished piece 1 at 07-MAR-14

piece handle=/home/oracle/control_03p2jcjj_1_1 tag=TAG20140307T155533 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 07-MAR-14

重建控制文件后,问题解决,RMAN可以备份控制文件,也可以创建STANDBY CONTROLFILE了。

SQL> alter database create standby controlfile as '/home/oracle/control.bak';

Database altered.

—————————————–end—————————————

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值