偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

解決Linux下sqlplus無(wú)響應(yīng)的三種方法

數(shù)據(jù)庫(kù) Oracle
本文我們主要介紹了Oracle數(shù)據(jù)庫(kù)服務(wù)器中的系統(tǒng)資源高造成的sqlplus沒(méi)有反應(yīng)的情況,并介紹了三種解決方案,希望能夠?qū)δ兴鶐椭?/div>

Oracle數(shù)據(jù)庫(kù)的sqlplus無(wú)響應(yīng)掛起處理,網(wǎng)上查看資料得知是oracle的bug引起的,事實(shí)上只要Linux x86主機(jī)運(yùn)行天數(shù)是24.8的倍數(shù)都有可能引發(fā)該bug,因?yàn)閠ime()函數(shù)值為null,造成無(wú)限死循環(huán),從而耗盡cpu。接下來(lái)我們介紹一下解決辦法。

解決辦法三種:

1) 重啟主機(jī);

2) 打patch set,如升級(jí)到10.2.0.4;

3) 對(duì)該bug單獨(dú)打臨時(shí)patch 4612267。

第一種方法沒(méi)有徹底解決問(wèn)題,以后照舊;第二種方法,升級(jí)時(shí)間長(zhǎng),且要求停庫(kù)很久,當(dāng)前生產(chǎn)環(huán)境暫不適合;

參考文檔:

Doc ID: 338461.1 SQL*Plus 10.2.0.1 Hangs, When System Uptime Is Long Period of Time

Doc ID: 4612267.8 Bug 4612267 - OCI client spins when machine uptime >= 249 days

我采取的是第三種方法,打補(bǔ)丁包的方式。而且據(jù)oracle官方文檔說(shuō)明,oracle11已經(jīng)修復(fù)該問(wèn)題。

下面是pache 4612267補(bǔ)丁包的安裝及驗(yàn)證方法:

先停監(jiān)聽(tīng)、dbconsole和數(shù)據(jù)庫(kù)

 

  1. $ lsnrctl stop  
  2.  
  3. $ emctl stop dbconsole  
  4.  
  5. $ sqlplus / as sysdba  
  6.  
  7. SQL> shutdown immediate 

 

注意:dbconsole是在已經(jīng)裝了Oracle EM的情況下要停止,如果未安裝則無(wú)需干涉。

安裝patch

 

  1. $ mkdir $ORACLE_BASE/patches  
  2.  
  3. $ cd $ORACLE_BASE/patches  
  4.  
  5. $ rz    (SecureCRT里上傳 p4612267_10201_LINUX.zip 文件, 其它上傳方式也可以)  
  6.  
  7. $ unzip p4612267_10201_LINUX.zip    
  8.  
  9. $ cd 4612267/  
  10.  
  11. $ $ORACLE_HOME/OPatch/opatch apply  
  12.  
  13. Invoking OPatch 10.2.0.1.0  
  14.  
  15. ...  
  16.  
  17. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.  
  18.  
  19. (Oracle Home = '/u01/app/oracle/product/10.2.0/db_1')  
  20.  
  21. Is the local system ready for patching?  
  22.  
  23. Do you want to proceed? [y|n]  
  24.  
  25. y    (此處輸入y)  
  26.  
  27. User Responded with: Y  
  28.  
  29. ...  
  30.  
  31. ApplySession adding interim patch '4612267' to inventory  
  32.  
  33. The local system has been patched and can be restarted.  
  34.  
  35. OPatch succeeded. 

 

驗(yàn)證patch

 

  1. $ $ORACLE_HOME/OPatch/opatch lsinventory  
  2.  
  3. Invoking OPatch 10.2.0.1.0  
  4.  
  5. Oracle interim Patch Installer version 10.2.0.1.0  
  6.  
  7. Copyright (c) 2005, Oracle Corporation. All rights reserved..  
  8.  
  9. Oracle Home       : /u01/app/oracle/product/10.2.0/db_1  
  10.  
  11. Central Inventory : /u01/app/oracle/oraInventory  
  12.  
  13. from           : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc  
  14.  
  15. OPatch version    : 10.2.0.1.0  
  16.  
  17. OUI version       : 10.2.0.1.0  
  18.  
  19. OUI location      : /u01/app/oracle/product/10.2.0/db_1/oui  
  20.  
  21. Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch-2009_Jan_13_11-06-27-HKT_Tue.log  
  22.  
  23. Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2009_Jan_13_11-06-27-HKT_Tue.txt  
  24.  
  25. --------------------------------------------------------------------------------  
  26.  
  27. Installed Top-level Products (2):  
  28.  
  29. Oracle Database  
  30.  
  31. 10g                                                  10.2.0.1.0  
  32.  
  33. Oracle Database 10g Products                                         10.2.0.1.0  
  34.  
  35. There are 2 products installed in this Oracle Home.  
  36.  
  37. Interim patches (1) :  
  38.  
  39. Patch 4612267      : applied on Tue Jan 13 11:05:10 HKT 2009  
  40.  
  41.    Created on 5 Oct 2005, 13:48:00 hrs US/Pacific  
  42.  
  43.    Bugs fixed:  
  44.  
  45.      4612267  
  46.  
  47. --------------------------------------------------------------------------------  
  48.  
  49. OPatch succeeded. 

 

啟動(dòng)數(shù)據(jù)庫(kù)、監(jiān)聽(tīng)和dbconsole

 

  1. $ sqlplus / as sysdba  
  2.  
  3. SQL> startup  
  4.  
  5. $ lsnrctl start  
  6.  
  7. $ emctl start dbconsole 

 

如果有需要,還可以刪除patch,刪除前先停庫(kù)

 

  1. $ cd $ORACLE_BASE/patches/4612267  
  2.  
  3. $ $ORACLE_HOME/OPatch/opatch rollback -id 4612267  
  4.  
  5. Invoking OPatch 10.2.0.1.0  
  6.  
  7. ...  
  8.  
  9. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.  
  10.  
  11. (Oracle Home = '/u01/app/oracle/product/10.2.0/db_1')  
  12.  
  13. Is the local system ready for patching?  
  14.  
  15. Do you want to proceed? [y|n]  
  16.  
  17. y    (此處輸入y)  
  18.  
  19. User Responded with: Y  
  20.  
  21. ...  
  22.  
  23. RollbackSession removing interim patch '4612267' from inventory  
  24.  
  25. The local system has been patched and can be restarted.  
  26.  
  27. OPatch succeeded. 

 

此時(shí)再執(zhí)行上面的驗(yàn)證patch命令就會(huì)發(fā)現(xiàn)該patch已經(jīng)刪除了。

注:

 

  1. Running STRACE tool shows:  
  2.  
  3. $ strace /oracle/home/bin/sqlplus -V 2>&1 |less  
  4.  
  5. ......  
  6.  
  7. old_mmap(NULL, 385024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x41794000  
  8.  
  9. gettimeofday({1122996561, 411035}, NULL) = 0  
  10.  
  11. access("/usr/local/UD/conf/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)  
  12.  
  13. access("/usr/local/UD/lib/oracle/network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)  
  14.  
  15. access("/usr/local/UD/conf/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)  
  16.  
  17. access("/usr/local/UD/lib/oracle/network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)  
  18.  
  19. fcntl64(-1218313656, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor)  
  20.  
  21. It is looping on the times() function.--死循環(huán)中  
  22.  
  23. times(NULL) = -1825782405  
  24.  
  25. times(NULL) = -1825782405  
  26.  
  27. times(NULL) = -1825782405  
  28.  
  29. times(NULL) = -1825782405  
  30.  
  31. times(NULL) = -1825782405  
  32.  
  33. times(NULL) = -1825782405  
  34.  
  35. times(NULL) = -1825782405 

 

 關(guān)于Linux下sqlplus沒(méi)有反應(yīng)的問(wèn)題就介紹到這里了,希望通過(guò)本次的介紹能夠帶給您一些收獲!

【編輯推薦】

  1. Oracle數(shù)據(jù)庫(kù)基于用戶管理的備份與恢復(fù)
  2. Oracle 數(shù)據(jù)庫(kù)如何設(shè)置歸檔模式與非歸檔模式
  3. Oracle數(shù)據(jù)庫(kù)利用日志挖掘來(lái)恢復(fù)誤刪除的數(shù)據(jù)
  4. 只需兩步即可實(shí)現(xiàn)SQL Server數(shù)據(jù)庫(kù)降級(jí)的方法
  5. Linux環(huán)境下Oracle10G和Oracle11G并存的安裝和配置
責(zé)任編輯:趙鵬 來(lái)源: 網(wǎng)易博客
相關(guān)推薦

2016-09-09 13:07:56

CentOSJDKLinux

2009-07-08 12:56:32

編寫(xiě)Servlet

2022-08-19 11:17:09

Linux

2010-09-14 15:10:49

CSS注釋

2022-07-13 16:06:16

Python參數(shù)代碼

2009-12-11 18:49:39

預(yù)算編制博科資訊

2024-11-15 07:00:00

Python發(fā)送郵件

2011-04-18 15:32:45

游戲測(cè)試測(cè)試方法軟件測(cè)試

2023-08-14 17:58:13

RequestHTTP請(qǐng)求

2011-06-10 10:43:12

Ubuntu應(yīng)用安裝

2009-06-23 10:45:18

Hibernate支持

2009-12-09 14:22:44

2015-12-11 09:24:38

加密數(shù)據(jù)Linux

2022-08-24 08:07:11

MyBatisSQLMySQL

2009-07-03 10:18:31

JSP開(kāi)發(fā)

2021-07-13 12:31:27

IT組織改進(jìn)首席技術(shù)官

2023-05-16 16:07:07

大數(shù)據(jù)數(shù)據(jù)管理工具

2009-07-23 15:17:54

JDBC連接Acces

2023-09-25 15:08:43

Python方離群值

2021-09-10 18:09:42

SQL注入漏洞網(wǎng)絡(luò)攻擊
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)