ORACLE STANDBY 修复ORA-19505问题记录
2017-06-20 10:06
351 查看
备库down了,经过检查,坏块无法做增量修复,所以需要重新搭建的方式来修复standby库,oracle11g里面有duplicate的方式远程在线修复命令:
意外的是,修复过程中报错ORA-19505,如下:
【解决办法】
(1)关闭备库standby
(2)在备库上覆盖控制文件,启动到nomount
(3)在master主库上重新拉active数据进行恢复操作
bty,如果执行命令:duplicate target database for standby from active database nofilenamecheck;在线恢复standby库的话,需要特别慎重,因为这会在线锁表的,建议在业务低峰期间做,不然会影响业务使用。
run { allocate auxiliary channel c1 device type disk; allocate auxiliary channel c2 device type disk; duplicate target database for standby from active database nofilenamecheck; release channel c1; release channel c2; }
意外的是,修复过程中报错ORA-19505,如下:
[oracle@odbm1 dbs]$ rlwrap rman target sys/pwd_0978@odbm1 auxiliary sys/pwd_0978@odbs1 Recovery Manager: Release 11.2.0.4.0 - Production on Mon Jun 5 19:49:04 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: orcldb (DBID=3391761643) connected to auxiliary database: orcldb (not mounted) run { allocate auxiliary channel c1 device type disk; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found "identifier": expecting one of: "device, type" RMAN-01008: the bad identifier was: devicetype RMAN-01007: at line 2 column 31 file: standard input allocate auxiliary channel c2 device type disk; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found "auxiliary": expecting one of: "channel" RMAN-01007: at line 1 column 10 file: standard input duplicate target database for standby nofilenamecheck dorecover; Starting Duplicate Db at 05-JUN-17 release channel c1; release channel c2; using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=4708 device type=DISK contents of Memory Script: { set until scn 14430447592; restore clone standby controlfile; } executing Memory Script executing command: SET until clause Starting restore at 05-JUN-17 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: restoring control file channel ORA_AUX_DISK_1: reading from backup piece /oracle/backup/data/controlfiles/c-3391761643-20170605-00 channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /oracle/backup/data/controlfiles/c-3391761643-20170605-00 ORA-19505: failed to identify file "/oracle/backup/data/controlfiles/c-3391761643-20170605-00" ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 failover to previous backup channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: restoring control file channel ORA_AUX_DISK_1: reading from backup piece /oracle/backup/data/controlfiles/c-3391761643-20170604-00 channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /oracle/backup/data/controlfiles/c-3391761643-20170604-00 ORA-19505: failed to identify file "/oracle/backup/data/controlfiles/c-3391761643-20170604-00" ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 failover to previous backup channel ORA_AUX_DISK_1: starting datafile backup set restore channel ORA_AUX_DISK_1: restoring control file channel ORA_AUX_DISK_1: reading from backup piece /oracle/backup/data/controlfiles/c-3391761643-20170603-00 channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece /oracle/backup/data/controlfiles/c-3391761643-20170603-00 ORA-19505: failed to identify file "/oracle/backup/data/controlfiles/c-3391761643-20170603-00" ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 failover to previous backup
【解决办法】
(1)关闭备库standby
SQL> select open_mode from v$database; OPEN_MODE -------------------- MOUNTED SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL>
(2)在备库上覆盖控制文件,启动到nomount
[oracle@pldb02 dbs]$ cp /home/oracle/ctlfile4.bak /oracle/app/oracle/oradata/orcldb/control01.ctl [oracle@pldb02 dbs]$ rlwrap sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 5 19:57:14 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount ORACLE instance started. Total System Global Area 4409401344 bytes Fixed Size 2260408 bytes Variable Size 2936013384 bytes Database Buffers 1459617792 bytes Redo Buffers 11509760 bytes SQL>
(3)在master主库上重新拉active数据进行恢复操作
[oracle@odbm1 dbs]$ rlwrap rman target sys/pwd_0978@odbm1 auxiliary sys/pwd_0978@odbs1 Recovery Manager: Release 11.2.0.4.0 - Production on Mon Jun 5 19:57:27 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: orcldb (DBID=3391761643) connected to auxiliary database: orcldb (not mounted) RMAN> duplicate target database for standby from active database nofilenamecheck; Starting Duplicate Db at 05-JUN-17 using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=5649 device type=DISK contents of Memory Script: { backup as copy reuse targetfile '/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/orapworcldb' auxiliary format '/oracle/app/oracle/product/11.2.0.4/dbhome_1/dbs/orapworcldb' ; } executing Memory Script Starting backup at 05-JUN-17 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1430 device type=DISK Finished backup at 05-JUN-17 contents of Memory Script: { backup as copy current controlfile for standby auxiliary format '/oracle/app/oracle/oradata/orcldb/control01.ctl'; restore clone controlfile to '/oracle/app/oracle/fast_recovery_area/orcldb/control02.ctl' from '/oracle/app/oracle/oradata/orcldb/control01.ctl'; } executing Memory Script Starting backup at 05-JUN-17 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy copying standby control file output file name=/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcldb.f tag=TAG20170605T195936 RECID=30 STAMP=945892777 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 Finished backup at 05-JUN-17 Starting restore at 05-JUN-17 using channel ORA_AUX_DISK_1 ......
bty,如果执行命令:duplicate target database for standby from active database nofilenamecheck;在线恢复standby库的话,需要特别慎重,因为这会在线锁表的,建议在业务低峰期间做,不然会影响业务使用。
相关文章推荐
- Oracle问题解决记录:报错信息为-ORA-12505: TNS: 监听程序当前无法识别连接描述符中所给出的 SID
- 【问题记录】ORA-00600[ktspNextL1:4]_bug5649098_11.1.0.7之后已修复
- 记录今天遇见的oracle ora-00060死锁问题
- 【oracle】有关 ORA-00600: internal error code, arguments: [kkqcscpopn_Int: 0] 错误,问题记录
- Oracle自动导入数据文件(类似bcp的功能)及问题记录SQL*LOADER-704,ORA-12504
- Oracle登录报ORA-01031: insufficient privileges的问题记录
- ORACLE11.2.0.4 版本升级ORA-39700: database must be opened with UPGRADE option问题解决记录
- 关于ORACLE的ora-12505报错以及连接问题的解决及相关资料
- 关于ORACLE的ora-12505报错以及连接问题的解决及相关资料
- 关于oracle中ora-0091 无效字符问题
- oracle安装areasqueries问题和ora-00988问题解决
- 一个oracle随机取记录的问题
- oracle 连接超时问题 ora-12535:TNS
- 解决问题记录(1)-使用OleDbProvider连接Oracle出错
- Oracle 有关ORA-12560: TNS:协议适配器错误 的问题
- Oracle 10g ORA-12154: TNS: could not resolve the connect identifier specified 问题解决!
- ORACLE RAC安装问题解决记录(2)- ORA-01031,ORA-01005
- ora-01652问题 oracle 如何缩小和重建temp表空间的数据文件
- 关于用OracleInProcServer.XOraSession连接oracle 的问题。
- plsql连oracle服务器时,ORA-12154的奇怪问题