zoukankan      html  css  js  c++  java
  • Sqlplus报错ORA-12547

    一、问题现象

    Linux Oracle Db11.2.0.4 OGG19.1
    
    操作系统使用OGG用户,启动进程提示无法连接DB,OGG SQLPLUS报错ORA 12547! Oracle用户本地SQLPLUS正常!

    二、问题处理

    2.1 跟踪日志

    https://www.cnblogs.com/historynote/p/13394557.html

    $strace -f -o /tmp/trace.1.log $ORACLE_HOME/bin/sqlplus / as sysdba

    $ tail -500 /tmp/trace.1.log 

    13021 times({tms_utime=10, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 430640604
    13021 close(3) = 0
    13021 close(4) = 0

    ······

    13018 open("/u01/app/oracle/product/11.2.0/dbhome_1//rdbms/mesg/oraus.msb", O_RDONLY) = 10
    13018 fcntl(10, F_SETFD, FD_CLOEXEC) = 0
    13018 lseek(10, 0, SEEK_SET) = 0
    13018 read(10, "2523"1233 "..., 256) = 256
    13018 lseek(10, 512, SEEK_SET) = 512
    13018 read(10, "f312603gJ>h265z342207C226]310m374"..., 512) = 512
    13018 lseek(10, 1536, SEEK_SET) = 1536
    13018 read(10, "q31|312103122231234312453125631302313133132731/32B32X32d32s3220732"..., 512) = 512
    13018 lseek(10, 244736, SEEK_SET) = 244736
    13018 read(10, " 3710V3720k373020737402453750314"..., 512) = 512
    13018 close(10) = 0
    13018 write(1, "ERROR: ", 7) = 7
    13018 write(1, "ORA-12547: TNS:lost contact ", 28) = 28
    13018 write(1, " ", 1) = 1
    13018 write(1, " ", 1) = 1

    说实话这里的日志参考意义不大,没有看出什么毛病

    排除了sqlnet.ora; 环境变量; 文件权限等调用,lib包等问题

    2.2 MOS 552979.1

    SYMPTOMS
    Oracle 10.2 has been installed in a new Oracle_Home
    Preparing to perform post-upgrade steps
    SQLPLUS command fails with following error ...
    $ sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 5 10:04:01 2008 
    Copyright (c) 1982, 2005, Oracle. All rights reserved. 
    ERROR: 
    ORA-12547: TNS:lost contact 
    Enter user-name:
    CHANGES
    CAUSE
    The make log shows a problem with config.o ...
    
    Linking OSM Discovery utility (kfod) 
    ld +s -G -b -o libsrvm10.sl { LINK OPTIONS } 
    /<$ORACLE_HOME>/rdbms/lib/config.o { LINK OPTIONS } 
    ld: I/O error, file "/<$ORACLE_HOME>/rdbms 
    /lib/config.o": Invalid argument 
    Fatal error. 
    *** Error exit code 1 
    
    Stop.
    On further diagnosis, it found that OH/bin/oracle binary is of zero file size ...
    
    $ ls -ld bin/ora* 
    -rwsr-s--x 1 oracle dba 0 Aug 15 2005 bin/oracle 
    -rwxr-xr-x 1 oracle dba 0 Jun 22 2005 bin/oracleO 
    
    ... and the <$ORACLE_HOME>/rdbms/lib/config.o object file is zero filesize as well ... 
    $ cd $ORACLE_HOME/rdbms/lib 
    $ ls -l config* 
    -rw-r----- 1 oracle dba 255 Jan 18 11:43 config.c 
    -rw-r----- 1 oracle dba   0 Jan 18 11:53 config.o
    SOLUTION
    config.o was not generated during the installation, and it will not be re-compiled if it already exists. Remove the zero-length config.o 
    and then re-compile oracle as mentioned below $ cd $ORACLE_HOME/rdbms/lib $ rm config.o $ make -f ins_rdbms.mk config.o ioracle $ ls -l config* -rw-r----- 1 oracle dba 255 Jan 18 11:43 config.c -rw-r--r-- 1 oracle dba 1448 Feb 6 14:56 config.o $ cd $ORACLE HOME/bin $ ls -l oracle* -rwsr-s--x 1 oracle dba 112842648 Feb 6 14:57 oracle -rwsr-s--x 1 oracle dba 0 Aug 15 2005 oracleO Now, the problem should be solved and SQLPLUS should work.

    实际环境与MOS并不是完全一致的!MOS有两个文件都为0,编译后config.o文件不为0;
    实际情况,config.o文件是非零值, oracle0为0,编译后oracle0文件非0
    因为是测试环境,因此尝试编译后有效!但是生产环境建议甚至考虑! 又遇到相同trace跟踪报错的可以考虑进行尝试,另外一个现象是这个测试库使用-R mysql:mysql /修改权限恢复导致本次的问题
    and the <$ORACLE_HOME>/rdbms/lib/config.o object file is zero filesize as well

    [oracle@t2 bin]$ ls -lrt oracle*
    -rwxr-x---. 1 oracle oinstall 0 Aug 24 2013 oracleO
    -rwxr-x--x. 1 oracle oinstall 239501456 Mar 27 2020 oracle

     

    -rwxr-x--x. 1 oracle oinstall 239501456 Mar 27 2020 oracleO
    -rwsr-s--x. 1 oracle oinstall 239501456 Jun 12 13:52 oracle


    本次编译过程中,测试库单实例正在运行,DB alert存在告警!建议还是关库执行!

    Sat Jun 12 14:01:57 2021
    WARNING: Oracle executable binary mismatch detected.
    Binary of new process does not match binary which started instance
    issue alter system set "_disable_image_check" = true to disable these messages

     
  • 相关阅读:
    Java实现 蓝桥杯 算法训练 画图(暴力)
    Java实现 蓝桥杯 算法训练 画图(暴力)
    Java实现 蓝桥杯 算法训练 相邻数对(暴力)
    Java实现 蓝桥杯 算法训练 相邻数对(暴力)
    Java实现 蓝桥杯 算法训练 相邻数对(暴力)
    Java实现 蓝桥杯 算法训练 Cowboys
    Java实现 蓝桥杯 算法训练 Cowboys
    55. Jump Game
    54. Spiral Matrix
    50. Pow(x, n)
  • 原文地址:https://www.cnblogs.com/lvcha001/p/14879000.html
Copyright © 2011-2022 走看看