rac scan ip怎么连接不上数据库
发布网友
发布时间:2022-05-05 08:16
我来回答
共2个回答
懂视网
时间:2022-05-05 12:37
安装完Oracle 11g rac后,在10g的客户端的 tnsnames.ora中配置好,scanip,但是无法访问,报错为目标主机不存在,折腾了很久,没弄明白,后面查到,系统初始化参数里有local_listener这一项,在这里可以对host的值加以修改,将scanip注册进来、在监听器中使用v
安装完Oracle 11g rac后,在10g的客户端的 tnsnames.ora中配置好,scanip,但是无法访问,报错为目标主机不存在,折腾了很久,没弄明白,后面查到,系统初始化参数里有local_listener这一项,在这里可以对host的值加以修改,将scanip注册进来、在监听器中使用vip!
--------------------------------------------------------------------------
在racnode1服务器上:
[root@racdb1 ~]# su - Oracle
[Oracle@racdb1 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Wed Apr 21 13:44:12 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> show parameter local_listener;
NAME TYPE VALUE
--------------------------------------------------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=rac1_vip)(PORT=1521))))
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=racscan)(PORT=1521))))' scope=both sid='racdb1';
System altered.
SQL>
-------------------------------------------------------------------------
节点二上面也是,一样的修改。
热心网友
时间:2022-05-05 09:45
解决办法:
rac1:
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=rac1
-vip)(PORT=1521))))
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.111)(PORT=1521))))' scope=both sid='orcl1';
SQL> alter system register;
rac2:
SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=rac2
-vip)(PORT=1521))))
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.112)(PORT=1521))))' scope=both sid='orcl2';
SQL> alter system register;
随后使用windows客户端连接成功:
C:\Users\WJW>sqlplus system/qweasd@192.168.2.200:1521/orcl
SQL*Plus: Release 11.2.0.1.0 Proction on Thu May 17 13:14:39 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Proction
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options