標籤:
執行rman恢複的時候報錯
RMAN> alter database mount;RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of alter db command at 02/03/2016 21:29:13ORA-01103: database name ‘POWERDES‘ in control file is not ‘PDUNQ‘RMAN> exit
解決方案:
SQL> create pfile=‘/oracle/pfile.12‘ from spfile;File created.SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[[email protected] ~]$ vim /oracle/pfile.12*.db_name=‘powerdes‘ #這裡原來是pdunq,將之換成powerdes即可,然後儲存退出[[email protected] ~]$ rlwrap sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 3 21:39:56 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>SQL> create spfile from pfile=‘/oracle/pfile.12‘;File created.SQL> startup nomountORACLE instance started.Total System Global Area 1453092864 bytesFixed Size 2213416 bytesVariable Size 855640536 bytesDatabase Buffers 587202560 bytesRedo Buffers 8036352 bytesSQL>
然後重新rman退出登入執行alter操作搞定,可以alter database mount了
[[email protected] ~]$ rlwrap rman target /Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 3 21:40:55 2016Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.connected to target database: POWERDES (not mounted)RMAN> restore controlfile to ‘/home/oradata/powerdes/control01.ctl‘ from ‘/oracle/c-3391761643-20160203-01‘;Starting restore at 03-FEB-16using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=20 device type=DISKchannel ORA_DISK_1: restoring control filechannel ORA_DISK_1: restore complete, elapsed time: 00:00:03Finished restore at 03-FEB-16RMAN> restore controlfile to ‘/oracle/app/oracle/flash_recovery_area/powerdes/control02.ctl‘ from ‘/oracle/c-3391761643-20160203-01‘;Starting restore at 03-FEB-16using channel ORA_DISK_1channel ORA_DISK_1: restoring control filechannel ORA_DISK_1: restore complete, elapsed time: 00:00:03Finished restore at 03-FEB-16RMAN> alter database mount;database mountedreleased channel: ORA_DISK_1RMAN>
RMAN恢複報錯: ORA-01103: database name 'POWERDES' in control file is not 'PDUNQ'