ora-12542(Windows2003下 Oracle監聽器啟動後自動關閉)
今天發現Windows 2003server上的Oracle 監聽器無法啟動,在Windows服務裡啟動後立即停止,在cmd環境下執行lsnrctl start命令會報ora-12542錯誤。
實際上以上監聽器異常現象在前幾天偶爾出現,後來監聽器埠被佔用原因,應用系統所對應的資料庫使用者無法連結資料庫。
處理過程:
1、重建監聽器沒有用,重啟伺服器後也是沒法連線資料庫(sys / as sysdba可以連線,並可以正常啟動和關閉資料庫);
2、因資料庫小,因此先備份(expdp)好資料後重新安裝Oracle並重建資料庫,還是不行。
[@more@]3、以上方法都失敗後,我開始搜尋網路,如下是從
Cause
Problem is caused due to the fact that the free ports in the windows client has been exhausted and it is trying to make use of a port which is in TIME_WAIT state which gives the error TNS-12542: Address already in use.
Solution
There are 2 solutions available:
1.) Increase the free port range:
======================
Start Registry Editor (Regedt32.exe).
Locate the following key in the registry:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters
On the Edit menu, click Add Value, and then add the following registry value:
Value Name: MaxUserPort Data Type: REG_DWORD Value: 65534
Valid Range: 5000-65534 (decimal) Default: 0x1388 (5000 decimal)
Description: This parameter controls the maximum port number used when an application requests any available user port from the system. Normally, ephemeral (that is, short-lived) ports are allocated between the values of 1024 and 5000 inclusive.
2.) Decrease the value for TIME_WAIT state:
================================
TcpTimedWaitDelay (new in Windows NT versions 3.51 SP5 and later)
Key: TcpipParameters
Value Type: REG_DWORD - Time in seconds
Valid Range: 30-300 (decimal)
Default: 0xF0 (240 decimal)
Description: This parameter determines the length of time that a connection will stay in the TIME_WAIT state when being closed. While a connection is in the TIME_WAIT state, the socket pair cannot be re- used. This is also known as the "2MSL" state, as by RFC the value should be twice the maximum segment lifetime on the network. See RFC793 for further details.
這主要是由於作業系統的臨時埠不夠用而引起的。一般系統的臨時埠為 1024-5000,這在多使用者的環境下,3000多個oracle連結就用光了。由於每個連結斷開以後,還要有一個等待時間,例如在 windows 系統中,這個時間是 120秒。
這就導致了一個現象: 一會可以聯通,一會又出現 ora-12542 address in used 。如果有臨時埠可以使用,可以聯通oracle;如果暫時埠沒有了,就連不通了。
一下是在 windows 系統下的解決辦法。
1、 進入登錄檔編輯器(regedit),在 HKEY_LOCAL_MACHINEsystemCurrentControlSetServicesTcpipParameters 裡,編譯-> 新增-> MaxUserPort (型別 REG_DWORD ), 值中填寫 65534,(十進位制,可以的範圍是5000-65534).
2 、退出 登錄檔編輯器,重新啟動機器.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1055122/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle啟動兩個監聽Oracle
- 在duplicate時,出現監聽BLOCKED的情況,導致監聽自動關閉BloC
- win10 自動重啟關閉方法_win10自動重啟怎麼關閉Win10
- centos下nginx啟動、重啟、關閉CentOSNginx
- windows10系統下ie瀏覽器開啟後自動關閉怎麼解決Windows瀏覽器
- 如何監聽頁面關閉或重新整理動作
- Win10 1909系統關閉自動更新後自動開啟的解決方法Win10
- 2.5.4. 測試Oracle net——2.5.4.1. 啟動監聽程式Oracle
- zabbix-agent啟動之後10050埠未監聽
- 啟動資料庫監聽資料庫
- Oracle 12.2 Heavy swapping 資料庫自動關閉OracleAPP資料庫
- Oracle 19c 利用觸發器在資料庫啟動後自動開啟 PDBOracle觸發器資料庫
- Linux下的MongoDB安裝&啟動&關閉LinuxMongoDB
- Oracle RAC自啟動Oracle
- win10啟動管理器關閉的方法_win10關閉啟動管理器的方法Win10
- 使用laradock啟動容器elasticsearch遇到啟動後幾秒鐘又自動關閉的問題以及解決方法Elasticsearch
- OracleLinux上的Oracle開關機自啟動OracleLinux
- Win10系統下自動更新關閉後又自動開啟怎麼解決Win10
- 3 啟動和關閉
- 如何在cmd視窗關閉情況下保持後臺啟動docsify?
- win10開機自啟動程式關閉方法_win10怎麼關閉開機啟動項Win10
- 如何關閉Win10自動更新 win10永久關閉自動更新Win10
- win10系統onenote自動啟動怎麼取消_win10系統onenote自動啟動如何關閉Win10
- win10應用商店自動啟動怎麼辦 win10微軟商店自動啟動如何關閉Win10微軟
- 【DB寶49】Oracle如何設定DB、監聽和EM開機啟動Oracle
- win10 edge瀏覽器自啟動怎麼關閉_win10電腦edge瀏覽器自啟動解決方法Win10瀏覽器
- win10系統快速啟動怎麼關閉 關閉Windows快速啟動Win10Windows
- 如何關閉Windows自動更新Windows
- WebStorm關閉自動拆疊WebORM
- filebeat自動關閉解決
- win10為什麼關機後自動重啟 win10關機後自動重啟的方法Win10
- 記一次springboot的開機啟動自動關閉問題Spring Boot
- 怎樣在Mac上安排自動啟動或關閉,技巧來啦~Mac
- 9. 啟動、關閉tomcatTomcat
- 啟動與關閉服務
- 01啟動(關閉)套接字
- 怎樣關閉win10自動更新 如何關閉windows10自動更新Win10Windows
- oracle資料庫的啟動關閉與各種服務Oracle資料庫
- Oracle11g RAC啟動關閉情況大概總結Oracle