SQL*Plus 报错 ORA-12547: TNS:Lost Contact

随笔5天前发布 爱夏
1 0 0

SQL*Plus Connection and DBCA Fails With: ORA-12547: TNS:Lost Contact

背景:某个SAP 的数据库的系统盘有问题了,需要迁移,当时数据库文件尚未损坏,于是将数据库软件连同数据文件一起 scp 到新的服务器
OS version:
DB version:11.2.0.2.0

报错:从SAPadmin 用户登录数据库时报错如下

cnmdb04203:cnmadm 74> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 11 15:51:57 2024

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

ERROR:
ORA-12547: TNS:lost contact

环境变量、sqlnet 等检查均正常,开始怀疑是不是拷贝过程中 文件权限发生了变化

解决:

通过starce 查看,有如下信息

strace sqlplus / as sysdba
···
12154 open("/oracle/CNM/saptrace/diag/rdbms/cnm/CNM/alert/log.xml", O_WRONLY|O_CREAT|O_APPEND, 0660) = -1 EACCES (Permission denied)
···
12154 open("/oracle/CNM/saptrace/diag/rdbms/cnm/CNM/trace/alert_CNM.log", O_WRONLY|O_CREAT|O_APPEND, 0660) = -1 EACCES (Permission denied)
···

查看 oracle 文件权限

cnmdb04203:oracnm 51>   cd $ORACLE_HOME/bin
cnmdb04203:oracnm 52> ls -l oracle
-rwxr-x--x 1 oracnm dba 229535310 Apr 11 10:30 oracle

发现权限并不是 6751,用oracle 的用户改之
cnmdb04203:oracnm 53> chmod 6751 oracle
cnmdb04203:oracnm 54> ls -l oracle
-rwsr-s--x 1 oracnm dba 229535310 Apr 11 10:30 oracle

验证 解决

cnmdb04203:cnmadm 53> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 11 16:17:19 2024

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, OLAP, Data Mining and Real Application Testing options

SQL>                   
SQL> 
© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...