1.看本地的机器tnsnames.ora 有否别人机器的连接字符 2.看别人机器的listener 是否起来了,是正常的( lsnrctl status) 可以 tnsping 连接字符 验证情况$ hostname cctt1 $ lsnrctl statusLSNRCTL for HPUX: Version 10.2.0.4.0 - Production on 14-OCT-2009 18:27:23Copyright (c) 1991, 2007, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER_CCTT1 Version TNSLSNR for HPUX: Version 10.2.0.4.0 - Production Start Date 14-OCT-2009 11:55:57 Uptime 0 days 6 hr. 31 min. 26 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/product/asm/network/admin/listener.ora Listener Log File /oracle/product/asm/network/log/listener_cctt1.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.154.92.31)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.154.92.29)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service... Service "+ASM_XPT" has 1 instance(s). Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "cctt" has 2 instance(s). Instance "cctt1", status READY, has 2 handler(s) for this service... Instance "cctt2", status READY, has 1 handler(s) for this service... Service "cctt1" has 1 instance(s). Instance "cctt1", status UNKNOWN, has 1 handler(s) for this service... Service "ccttXDB" has 2 instance(s). Instance "cctt1", status READY, has 1 handler(s) for this service... Instance "cctt2", status READY, has 1 handler(s) for this service... Service "cctt_XPT" has 2 instance(s). Instance "cctt1", status READY, has 2 handler(s) for this service... Instance "cctt2", status READY, has 1 handler(s) for this service... The command completed successfully $hostname cctt2 $ tnsping ccttTNS Ping Utility for HPUX: Version 10.2.0.4.0 - Production on 14-OCT-2009 18:27:53Copyright (c) 1997, 2007, Oracle. All rights reserved.Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cctt1-v)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = cctt2-v)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cctt))) OK (0 msec) $
2.看别人机器的listener 是否起来了,是正常的( lsnrctl status)
可以 tnsping 连接字符 验证情况$ hostname
cctt1
$ lsnrctl statusLSNRCTL for HPUX: Version 10.2.0.4.0 - Production on 14-OCT-2009 18:27:23Copyright (c) 1991, 2007, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_CCTT1
Version TNSLSNR for HPUX: Version 10.2.0.4.0 - Production
Start Date 14-OCT-2009 11:55:57
Uptime 0 days 6 hr. 31 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/asm/network/admin/listener.ora
Listener Log File /oracle/product/asm/network/log/listener_cctt1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.154.92.31)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.154.92.29)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "cctt" has 2 instance(s).
Instance "cctt1", status READY, has 2 handler(s) for this service...
Instance "cctt2", status READY, has 1 handler(s) for this service...
Service "cctt1" has 1 instance(s).
Instance "cctt1", status UNKNOWN, has 1 handler(s) for this service...
Service "ccttXDB" has 2 instance(s).
Instance "cctt1", status READY, has 1 handler(s) for this service...
Instance "cctt2", status READY, has 1 handler(s) for this service...
Service "cctt_XPT" has 2 instance(s).
Instance "cctt1", status READY, has 2 handler(s) for this service...
Instance "cctt2", status READY, has 1 handler(s) for this service...
The command completed successfully
$hostname
cctt2
$ tnsping ccttTNS Ping Utility for HPUX: Version 10.2.0.4.0 - Production on 14-OCT-2009 18:27:53Copyright (c) 1997, 2007, Oracle. All rights reserved.Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = cctt1-v)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = cctt2-v)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cctt)))
OK (0 msec)
$
2、添加网络配置
3、数据库实例名LY
4、默认两步
5、输入要连接的ip地址:192.168.0.251
6、注意:LY_192.168.0.251
7、完成
注意:最好是用这个可视化界面来配置,而不要自己去修改tnsname.ora文件