ORA-12547: TNS:lost contact 问题处理

这段时间公司服务技术负责人离职,手头工作全部交接到我这边,仓促交接连个文档都没有,只能边看边学研究如何解决遗留问题,刚好一个开发人员在使用oracle客户端时突然说不能用了,我以为是后台服务出问题于是重启了下发现 提示:ORA-12547: TNS:lost contact,无法正常重启。

通过查看oralce文件存储目录,发现设置的权限问题,重新赋权下,

cd $ORACLE_HOME/bin

[root@ap bin]# ls -l oracle
-rwxr-x--x 1 dgss dgss 210704056 6月   5 2020 oracle

而正常安装软件后的权限应该是:-rwsr-s--x,很明显,的确少了s权限,只需要赋予用户和所在组的s权限:

chmod ug+s oracle 或者chmod 6751 oracle

[root@ap bin]# chmod 6751 oracle

[root@ap bin]# ls -lrt

-rwsr-s--x 1 dgss dgss 210704056 6月   5 2020 oracle

 

然后重启服务:
[oracle@ap ~]$ lsnrctl  ---- start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-NOV-2021 11:11:41

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

Starting /data/oracle/product/11.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /data/oracle/product/11.2.0/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/ap/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ap.fore.run)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                12-NOV-2021 11:11:43
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/ap/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ap.fore.run)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@ap ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Nov 12 11:11:51 2021

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

SQL> conn sys/sys as sysdba 
Connected to an idle instance.
SQL> Startup
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size                  2213776 bytes
Variable Size            1023412336 bytes
Database Buffers          570425344 bytes
Redo Buffers                7360512 bytes
Database mounted.
Database opened.
SQL> 

 正常连接:

 

  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值