您的位置:首页 > 数据库 > Oracle

修改Oracle目录权限造成ORA-12537

2013-03-13 09:06 423 查看
今天通过远程连接Oracle是出错连接不上

C:\Users\Nick>sqlplus scott/tiger@orcl

SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 12 19:21:12 2013

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

ERROR:

ORA-12537: TNS:connection closed

查看名称解析,发现侦听、服务名都是正常的。

C:\Users\Nick>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 12-3月 -2013 19:23:26

Copyright (c) 1997, 2010, Oracle. All rights reserved.

已使用的参数文件:

D:\Oracle\product\11.2.0\client_1\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名

尝试连接 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.2)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl.

example.com) (SERVER = DEDICATED)))

OK (100 毫秒)

登陆到服务器查看侦听状态

[grid@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-MAR-2013 19:28:06

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date 12-MAR-2013 19:13:11

Uptime 0 days 0 hr. 14 min. 55 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/grid/11.2.0/network/admin/listener.ora

Listener Log File /u01/app/grid/diag/tnslsnr/localhost/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

Services Summary...

Service "+ASM" has 1 instance(s).

Instance "+ASM", status READY, has 1 handler(s) for this service...

Service "orcl.example.com" has 1 instance(s).

Instance "orcl", status READY, has 1 handler(s) for this service...

The command completed successfully

在服务器上登陆是正常的

[oracle@localhost ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 12 19:26:16 2013

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options

SQL>

查看侦听日志文件 发现有错误

12-MAR-2013 19:29:34 * (CONNECT_DATA=(SERVICE_NAME=orcl.example.com)(SERVER=DEDICATED)(CID=(PROGRAM=D:\Oracle\product\11.2.0\client_1\sqlplus.exe)(HOST=NICK-PC)(USER=Nick))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.1)(PORT=49427)) * establish * orcl.example.com
* 12518

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

最后发现是修改了 oracle 的权限

因为用 srvctl -d database -h ORACLE_HOME

报错 grid 不像oracle用户

执行了 chmod 755 /u01/app/oracle

结果就成这样了

结果是这个原因造成的

oracle程序放在$ORACLE_HOME/bin目录下,其权限设置了SUID和SGID,默认的执行权限为6751
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: