ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-12537:TNS:Connection closed

ORA-12537:TNS:Connection closed

原创 Linux操作系统 作者:xdong436 时间:2013-03-14 16:20:29 0 删除 编辑

官方解释如下:

Applies to:
Oracle Net Services - Version: 8.1.7.0 to 11.2.0.1 - Release: 8.1.7 to 11.2
Generic UNIX
Checked for relevance on 30-Apr-2010
Symptoms
Connection to the database server fails with ORA-12546 or ORA-12537

Local connections working fine but the connection via listener fails with ORA-12537 or ORA-12547

[oracle@myhost]$ sqlplusmyuser/mypass@mytns

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Apr 30 21:32:18 2010

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

ERROR:
ORA-12537: TNS:connection closed

The listener log for the failing connection shows following error message -

TNS-12518: TNS:listener could not hand off client connection
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
Linux Error: 13: Permission denied

Or

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
IBM/AIX RISC System/6000 Error: 32: Broken pipe


Cause
Permissions on oracle binary ( $ORACLE_HOME/bin/oracle ) are not set correctly.

Solution
The OS level error message in the listener log "Linux Error: 13: Permission denied" indicates that the listener was not able to hand off the connection to oracle processes or not able to spawn a new dedicated user process because of lack of permission at the OS level. To resolve the error -

1. Check and correct the permission on /var/tmp/.oracle directory. Permissions on this directory should be 777 with sticky bit set.


# chmod 01777 /var/tmp/.oracle

2. Check and correct permissions on $ORACLE_HOME/bin/oracle binary and make sure that it is set to 6751.

$ chmod 6751 $ORACLE_HOME/bin/oracle

 

检查自己环境,确实发现不是正确的权限

[root@ract1 bin]# pwd
/oracle/product/11.2.0/bin
[root@ract1 bin]# ls -la oracle
-rwxr-s--x 1 oracle asmadmin 228886426 Jan 7 15:46 oracle
[root@ract1 bin]# chmod 6751 oracle- -注意使用root用户给权限
[root@ract1 bin]# ls -la oracle
-rwsr-s--x 1 oracle asmadmin 228886426 Jan 7 15:46 oracle

 

修改后登陆正常:

[oracle@ract2 ~]$ sqlplussys/oracle@10.20.31.36:1521/racdbas sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 17 14:48:25 2013

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28716724/viewspace-756161/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-03-13

  • 博文量
    4
  • 访问量
    13185