houyichong 发表于 2015-6-14 18:02
主备库 主库的tnsnames.ora: (SERVICE_NAME = orcl)
lsnrctl status看看侦听的状态
主库的监听器监听状态:
[oracle@dg1 dbhome_1]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-JUN-2015 19:24:32
Copyright (c) 1991, 2009, Oracle.All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dg1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias
LISTENER
Version
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date
14-JUN-2015 18:34:24
Uptime
0 days 0 hr. 50 min. 7 sec
Trace Level
off
Security
ON: Local OS Authentication
SNMP
OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dg1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg1)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "pdb" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
=====================================================
主库备库的tnsping都是没有问题的,说明配置的tnsnames.ora里面没有错误:
主库:
[oracle@dg1 dbhome_1]$ tnsping dg1
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 14-JUN-2015 19:25:28
Copyright (c) 1997, 2009, Oracle.All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
OK (0 msec)
[oracle@dg1 dbhome_1]$ tnsping dg2
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 14-JUN-2015 19:25:32
Copyright (c) 1997, 2009, Oracle.All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.133.101)(PORT=1521)))
OK (0 msec)
备库:
[oracle@dg2 admin]$ tnsping dg1
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 14-JUN-2015 19:25:50
Copyright (c) 1997, 2009, Oracle.All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.133.100)(PORT=1521)))
OK (10 msec)
[oracle@dg2 admin]$ tnsping dg2
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 14-JUN-2015 19:25:53
Copyright (c) 1997, 2009, Oracle.All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
OK (0 msec)
|