修改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
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
相关文章推荐
- grid软件安装目录权限被修改引起登陆ASM出现ORA-12547 TNSlost contact
- 修改文件目录权限导致数据库连接报错ORA-12547
- linux创建、进入、修改目录或者文件权限 ‘ACM’时间是什么?怎么修改?
- 在Linux系统中修改目录的权限如何恢复
- 用FTP工具修改linux下目录权限
- Oracle 11gR2 RAC 数据库不能连接(ORA-12537: TNS:connection closed)的解决
- CentOS系统中修改目录的权限后恢复
- ubuntu 修改文件目录所有者/权限
- 修改了Ubuntu下的/usr目录权限,导致不能使用sudo命令的修复
- 以sysdba身份登录oracle报ORA-1031权限不足错误之完美分析
- Oracle 创建用户、修改用户信息、为用户分配权限、为用户分配表空间配额、删除用户
- ORA-12547: TNS:lost contact - Oracle执行文件权限问题
- 修改文件目录权限
- Oracle在Linux内核参数的修改 ora-27102
- mac home目录创建文件夹,修改权限
- 以sysdba身份登录oracle报ORA-1031权限不足错误之完美分析
- ORACLE 修改 MEMORY_TARGET,查看oracle错误号oerr ORA
- Oracle 11gR2 RAC 数据库不能连接(ORA-12537: TNS:connection closed)的解决
- ORACLE连接超限修改,ORA-00064,ORA-12571,ORA-24324及用户连接查看
- 解决Oracle 11g修改多路复用控制文件后出现ORA-01507/ORA-00105