今天新上线的系统物理备库出现以下错误:
[oracle@db-15 ~]$ sqlplus ‘/as sysdba’
SQL*Plus: Release 10.2.0.5.0 – Production on Fri Dec 16 20:37:38 2011
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
查看alertlog 发现
ORA-01274: cannot add datafile ‘+DATA/item/datafile/undotbs3.dbf’ – file could not be created
Fri Dec 16 11:33:37 CST 2011
alter database recover managed standby database cancel
Fri Dec 16 11:33:37 CST 2011
MRP0: Background Media Recovery cancelled with status 16037
Fri Dec 16 11:33:37 CST 2011
Errors in file /home/oracle/admin/item/bdump/item_mrp0_13039.trc:
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Some recovered datafiles maybe left media fuzzy
Media recovery may continue but open resetlogs may fail
Fri Dec 16 11:33:39 CST 2011
Errors in file /home/oracle/admin/item/bdump/item_mrp0_13039.trc:
ORA-16037: user requested cancel of managed recovery operation
Fri Dec 16 11:33:39 CST 2011
MRP0: Background Media Recovery process shutdown (item)
Fri Dec 16 11:33:39 CST 2011
查看操作日志发现主库在早上添加过undotbs datafile;
Managed Standby Recovery not using Real Time Apply
Fri Dec 16 11:17:46 CST 2011
Errors in file /home/oracle/admin/item/bdump/item_mrp0_12997.trc:
ORA-01111: name for data file 21 is unknown – rename to correct file
ORA-01110: data file 21: ‘/data/oracle/product/10205/db1/dbs/UNNAMED00021’
ORA-01157: cannot identify/lock data file 21 – see DBWR trace file
ORA-01111: name for data file 21 is unknown – rename to correct file
ORA-01110: data file 21: ‘/data/oracle/product/10205/db1/dbs/UNNAMED00021’
ORA-01110: data file 21: ‘/data/oracle/product/10205/db1/dbs/UNNAMED00021’
出现了convert转换错误,查看备库发现standby_file_managemtn=manual;
File #22 added to control file as ‘UNNAMED00021’ because
the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL
The file should be manually created to continue.
MRP0: Background Media Recovery terminated with error 1274
处理方法:
SQL> alter system set standby_file_management=MANUAL;
System altered.
alter database create datafile ‘/data/oracle/product/10205/db1/dbs/UNNAMED00021’ as ‘/data/f-io/disk0/data/oracle/oradata/item/undotbs3.dbf’ size 10240M
Database altered.
SQL> alter system set standby_file_management=auto scope=both;
System altered.
这里的10240M 要对应主库的undo datafile size
继续开启redo apply
SQL> alter database recover managed standby database disconnect from session using current logfile;
Database altered.
SQL> select * from v$dataguard_stats;
NAME VALUE UNIT TIME_COMPUTED
—————————— —————————— —————————— ————————–
apply finish time +00 00:00:02.6 day(2) to second(1) interval 16-DEC-2011 20:58:48
apply lag +00 00:00:16 day(2) to second(0) interval 16-DEC-2011 20:58:48
estimated startup time 11 second 16-DEC-2011 20:58:48
standby has been open N 16-DEC-2011 20:58:48
transport lag +00 00:00:06 day(2) to second(0) interval 16-DEC-2011 20:58:48
后续日志apply 正常