Oracle 11gR2 RAC 使用scan IP无法连接数据库(ORA-12545)

简介

oracle 11gR2 RAC安装配置scan ip有三种方式,
1、DNS
2、GNS
3、hosts文件
通常情况下我们采用DNS的方式,但是平时测试的时候我们一般均采用hosts文件的方式,使用hosts时,安装完数据库scan ip通常访问不了。

环境

[root@rac-orcl01 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
#public
192.168.5.101   rac-orcl01
192.168.5.102   rac-orcl02
#virtual 
192.168.5.103   rac-orcl01-vip
192.168.5.104   rac-orcl02-vip
#private
10.10.10.101    rac-orcl01-pri
10.10.10.102    rac-orcl02-pri
#scan
192.168.5.105   scan-cluster

客户端通过scan ip连接数据库

[oracle@rac-orcl01 ~]$ sqlplus sys/oracle@192.168.5.105:1521/orcl as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 9 16:05:38 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-12545: Connect failed because target host or object does not exist

资源状态

[grid@rac-orcl01 ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    rac-orcl01  
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    rac-orcl01  
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac-orcl01  
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    rac-orcl01  
ora.eons       ora.eons.type  0/3    

你可能感兴趣的:(Oracle,RAC,数据库,oracle,RAC)