今天在作RAC的备份恢复测试(用veritas),测试的同事说RMAN无法使用,我连接进去之后发现如下问题:
[oracle@racdb01 ~]$srvctl stop database -d rac
[oracle@racdb01 ~]$srvctl start database -d rac -o nomount
[oracle@racdb01 ~]$RMAN
RMAN> connect target sys/orale@rac1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR racSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
RMAN>
在网上找了一篇文章,说是listener要修改成静态注册,并给出了测试结果,比照他的方法,果然成功.
增加红色部分
[oracle@racdb01 ~]$ vi /u01/oracle/product/10.2/db1/network/admin/listener.ora
SID_LIST_LISTENER_rac_racDB01 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle/product/10.2/db1/)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = rac)
(ORACLE_HOME = /u01/oracle/product/10.2/db_1)
(SID_NAME = rac1)
)
)
[oracle@racdb01 ~]$ vi /u01/oracle/product/10.2/db1/network/admin/tnsnames.ora
rac1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = racdb01-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
(UR=A)
)
)
[oracle@racdb01 ~]$lsnrctl
LSNRCTL>
LSNRCTL> stop
LSNRCTL> start
RMAN> connect target sys/oracle@rac1
connected to target database: rac (not mounted)
RMAN>