A-A+
11g物理备库重建出错RMAN-04006 RMAN-00554
准备在主库的节点1连接到备库使用rman重建物理备库的时候报错如下:
[oracle@XXX21DBRAC1 dbs]$ rman target / auxiliary sys/oracle@XXXDB_S Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 23 18:22:37 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: XXXDB (DBID=1566881586) RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied
注:在将备库和主库口令文件一致化后,以及在备库修改完sys密码后依然报相同的错误
解决过程:
查看备库告警日志,发现有个数据文件有问题,于是将该数据文件离线
[oracle@XXX21DBDG ~]$ sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 23 18:22:44 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> alter database mount; Database altered. SQL> alter database open; alter database open * ERROR at line 1: ORA-10458: standby database requires recovery ORA-01157: cannot identify/lock data file 8 - see DBWR trace file ORA-01111: name for data file 8 is unknown - rename to correct file ORA-01110: data file 8: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00008' SQL> alter database datafile 8 offline; alter database datafile 8 offline * ERROR at line 1: ORA-01668: standby database requires DROP option for offline of data file SQL> alter database datafile 8 offline drop; Database altered. SQL> shutdown immedaite; SP2-0717: illegal SHUTDOWN option SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup nomount; ORACLE instance started. Total System Global Area 1.0689E+10 bytes Fixed Size 2237776 bytes Variable Size 5637147312 bytes Database Buffers 5033164800 bytes Redo Buffers 16924672 bytes
注:再次在主库使用rman连接到备库重建备库报相同错误。
于是修改备库监听文件:
原监听文件:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = XXXdb_s)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = XXXdb)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.92)(PORT = 1521))
)
ADR_BASE_LISTENER = /u01/app/oracle
修改后:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = XXXdb_s)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = XXXdb)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.92)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
在完成以上修改后,可以正常重建备库。
[oracle@XXX21DBRAC1 ~]$ rman target / auxiliary sys/oracle@XXXDB_S
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Apr 23 18:45:45 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: XXXDB (DBID=1566881586)
connected to auxiliary database: XXXDB (not mounted)
RMAN> duplicate target database for standby;
Starting Duplicate Db at 23-APR-13
using target database control file instead of recovery catalog
allXXXted channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=394 device type=DISK
contents of Memory Script:
{
restore clone standby controlfile;
}
executing Memory Script
Starting restore at 23-APR-13
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: copied control file copy
input file name=/tmp/racdb_st.ctl
output file name=/oradata/XXXdb/controlfile/current.261.788703923
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/oradata/XXXdb/controlfile/current.260.788703923
Finished restore at 23-APR-13
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
... ...
