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, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
13018 lseek(10, 512, SEEK_SET) = 512
13018 read(10, "f\31\2603gJ>h\265z\342\207C\226]\310m\374\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
13018 lseek(10, 1536, SEEK_SET) = 1536
13018 read(10, "q\31|\31\210\31\222\31\234\31\245\31\256\31\302\31\313\31\327\31/\32B\32X\32d\32s\32\207\32"..., 512) = 512
13018 lseek(10, 244736, SEEK_SET) = 244736
13018 read(10, "\r\0\3710\0\0V\0\3720\0\0k\0\3730\0\0\207\0\3740\0\0\245\0\3750\0\0\314\0"..., 512) = 512
13018 close(10) = 0
13018 write(1, "ERROR:\n", 7) = 7
13018 write(1, "ORA-12547: TNS:lost contact\n", 28) = 28
13018 write(1, "\n", 1) = 1
13018 write(1, "\n", 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

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM