问题描述:新安装的11g r2,用sql*plus登陆数据库,操作系统验证(sqlplus hr/hr)可以登陆,但是通过监听登陆(sqlplus hr/hr@prod)报ORA-12537: TNS:connection closed。用其他机器连接也一样。tnsping都能ping通。服务器端监听正常。这个问题困扰了我好久了,请大神给些建议。
具体配置如下:
[oracle@shenc Desktop]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-JAN-2015 11:13:58
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-JAN-2015 10:14:49
Uptime 0 days 0 hr. 59 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/shenc/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.133)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "prod.xydy.cn" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
Service "prodXDB.xydy.cn" has 1 instance(s).
Instance "prod", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@shenc Desktop]$ vim /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
DIRECT_HANDOFF_TTC_LISTENER = OFF
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.133)(PORT = 1521))
# (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/grid
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
[oracle@shenc Desktop]$ vim /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
PROD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.133)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = prod.xydy.cn)
)
)
[oracle@shenc Desktop]$ vim /u01/app/grid/diag/tnslsnr/shenc/listener/alert/log.xml
<msg time='2015-01-18T11:09:31.993+08:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='shenc.xydy'
host_addr='192.168.0.133'>
<txt>
18-JAN-2015 11:09:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=prod.xydy.cn)(CID=(PROGRAM=sqlplus)(HOST=shenc.xydy)
(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.133)(PORT=43525)) * establish * prod.xydy.cn * 12518
</txt>
</msg>
<msg time='2015-01-18T11:09:31.993+08:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='shenc.xydy'
host_addr='192.168.0.133'>
<txt>
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
</txt>
</msg>
[oracle@shenc admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 18 11:35:46 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SYS@prod>
SYS@prod>conn hr/hr@prod
ERROR:
ORA-12537: TNS:connection closed
Warning: You are no longer connected to ORACLE.
SYS@prod>
--友情转载