重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 846|回复: 0
打印 上一主题 下一主题

[Oracle] sqlplus登录时ORA-12547: TNS:lost contact

[复制链接]
跳转到指定楼层
楼主
发表于 2023-11-12 13:27:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
有一些应用系统的OS用户需要与ORACLE用户具有一样的权限,可以用sqlplus登录并操作数据库。
一般是在安装ORACLE软件时与ORACLE用户一起创建,在创建此类用户时主要需要注意的是目录及文件的权限。
安装完成后应用系统用户执行sqlplus命令时报错。
[scmadmin@app11 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 28 22:42:57 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact

Enter user-name:
ERROR:
ORA-12547: TNS:lost contact
oracle用户是正常的。
[oracle@app11 bin]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 28 23:19:41 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
根据mos上的文档 Local SQL*Plus Connection and DBCA Fails With: ORA-12547: TNS:Lost Contact (文档 ID 422173.1)
对sqlplus命令跟踪
strace -f -o /tmp/trace.1.log $ORACLE_HOME/bin/sqlplus / as sysdba
在跟踪文件中发现以下错误信息
22232 write(5, "ORA-12753: The Oracle home user "..., 131) = 131
22232 write(5, "\n", 1) = 1
22232 write(5, "ORA-27300: OS system dependent o"..., 91) = 91
22232 write(5, "\n", 1) = 1
22232 write(5, "ORA-27301: OS failure message: E"..., 38) = 38
22232 write(5, "\n", 1) = 1
22232 write(5, "ORA-27302: failure occurred at: "..., 39) = 39
22232 write(5, "\n", 1) = 1
22232 write(5, "ORA-27303: additional informatio"..., 94) = 94
应该是$ORACLE_HOME/bin/oracle权限不对
查看了一下权限是775
[scmadmin@app11 bin]$ ls -l oracle
-rwxrwxr-x 1 oracle dba 407988856 Jul 28 17:16 oracle
执行以下命令修复后,再次执行正常。
cd $ORACLE_HOME/bin
chmod 6751 oracle

[scmadmin@app11 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 28 23:29:23 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL>

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-1 22:32 , Processed in 0.080891 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表