sqlplus / as sysdba無法連接ORA-12547 TNS: Lost Contact


問題現象:

ORA-12547 TNS: Lost Contact

Getting the following error when trying to connect using Sql*Plus

ERROR:

$sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 – Production on Wed Mar 30 11:59:06 2011
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact

CAUSE:

1) to kernel parameters settings
2) Incorrect permissions on the ORACLE executable
3) Insufficient ulimit setting for stack
4) $ORACLE_HOME/rdbms/lib/config.o is 0 bytes
5) Oracle binaries have not been linked correctly

SOLUTION:

1) Please check the notes below that provide the required settings for kernel parameters
Note 169706.1 Oracle Database on AIX,HP-UX,Linux,MacOSX,Solaris,Tru64

2) Please check permissions by running:

$ cd $ORACLE_HOME/bin
$ ls -l oracle

The output should show the correct permission which is:

-rwsr-s–x 1 oracle dba

If not, then please execute the following to correct the permissions:

$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle

3) Check the current ulimit setting for stack:

ulimit -a

Check the install guide for your specific platform and version of Oracle and set the stack appropriately.

4) Check to ensure the following two files are not 0 bytes:

$ORACLE_HOME/bin/oracle
$ORACLE_HOME/rdbms/lib/config.o

If yes, rename the following file:

$ cd $ORACLE_HOME/rdbms/lib
$ mv config.o config.o.bad

Then, relink the oracle binary:

$ relink oracle

5) Check the alert log for any errors (ORA-00020: maximum number of processes) and solve.

select * from v$resource_limit and check maximum utilization and limit values.

RESOURCE_NAME      MAX_UTILIZATION LIMIT_VALUE
————-           ————————– ————————–
processes      350                350
sessions      380                380

6) If the above does not resolve I suggest that you shutdown the database and listener and then “relink all”

Please refer the ORACLE SUPPORT DOCUMENT ID 422173.1

 

Thank You !!

原文:https://oracledbamasters.wordpress.com/tag/ora-12547/

 

Make FAILED to invoke "/usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/opt/oracle/product/11gR2/db"....'/opt/oracle/product/11gR2/db/rdbms/lib/config.o: file not recognized: File truncated,

 

可能原因1:

1,  有位同事寫了一個Makefile導致文件被truncated的經驗文檔,其中有段分析----在較老的gcc版本上(不知道多老,至少4.1.2能叫老),編譯器不會檢查這種自己鏈接自己的語法錯誤,於是一股腦的把so庫生成了,在運行時再去尋找動態庫和其中的具體實現,而運行時這個so庫已經在那里了,於是,你好我好大家好,程序一直運行的很好,這個Makefile中的語法錯誤也沒有被發現。不過一旦到了新的gcc版本(當然,至少4.4.3能算是新),在編譯庫的時候,編譯器會去被鏈接的動態庫中去找它需要找的函數實現,於是,它讀到了一個只生成了一部分的文件,當然就不認識了,告訴我們這個文件被截短了。

2,  之后在部署oracle的單板上執行rpm –qa gcc,發現有gcc兩個版本

SZV1000105780:/etc/init.d # rpm -qa gcc
gcc-4.3-62.198
gcc-4.1.2_20070115-0.29.6

3,  繼續執行gcc –v,發現真正使用的是gcc-4.1.2的版本,這個版本過低,導致編譯失敗。

但是查看了本地環境不是由於gcc版本過低造成的。繼續排查。。。

4,  下面要做的是將gcc版本切到4.3,按照如下命令執行,再次執行gcc –v發現gcc版本已經更改。

cd   /usr/bin
mv gcc gcc.bak    //將原來的gcc文件備份
ln -s gcc-4.3 gcc   //再建立一個名字為gcc,鏈接到想要的版本文件上去

 

 

 

 


免責聲明!

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



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