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
- 自動重新啟動oracle監聽程式 for windowsOracleWindows
- linux平臺下監聽器和Oracle的自動啟動與停止LinuxOracle
- oracle自動啟動和關閉的方法Oracle
- Linux 下 Oracle隨系統自動啟動和關閉LinuxOracle
- 配置作業系統重啟後,Oracle資料庫和監聽自動啟動作業系統Oracle資料庫
- Oracle自動啟動和關閉的方法 (轉)Oracle
- ORACLE AS 自動關閉Oracle
- Oracle啟動兩個監聽Oracle
- rhel as3下自動啟動和關閉oracle的指令碼S3Oracle指令碼
- linux下oracle11g R2的啟動與關閉監聽、資料庫LinuxOracle資料庫
- 關閉自動收集 for oracleOracle
- Oracle 11g linstener啟動後隔幾秒鐘自動關閉Oracle
- 資料庫自動啟動關閉資料庫
- oracle啟動與關閉Oracle
- ORACLE DataGuard 關閉啟動Oracle
- mysql啟動與關閉(手動與自動)MySql
- Oracle監聽服務無法啟動Oracle
- Oracle監聽日誌2g-監聽啟動報錯Oracle
- ORACLE啟動模式及關閉Oracle模式
- Oracle RAC 啟動與關閉Oracle
- 再談用指令碼自動啟動關閉LINUX下的ORACLE資料庫指令碼LinuxOracle資料庫
- LINUX開機自動啟動ORACLE資料庫和監聽指令碼LinuxOracle資料庫指令碼
- SHELL指令碼實現Oracle自啟動與關閉指令碼Oracle
- win10 自動重啟關閉方法_win10自動重啟怎麼關閉Win10
- windows10系統下ie瀏覽器開啟後自動關閉怎麼解決Windows瀏覽器
- centos下nginx啟動、重啟、關閉CentOSNginx
- Oracle 記憶體自動管理--關閉自動管理Oracle記憶體
- Oracle12c多租戶如何啟動關閉CDB或PDB (PDB自動啟動)Oracle
- Oracle11g RAC在例項關閉後自動在啟動例項上歸檔Oracle
- ORACLE啟動監聽器 The listener supports no services 問題解決方法Oracle
- MySQL Windows下關閉和啟動MySqlWindows
- ORACLE動態監聽與靜態監聽Oracle
- oracle靜態監聽和動態監聽Oracle
- 【oracle】動態監聽與靜態監聽Oracle
- Orale自動啟動以及關閉指令碼_linux指令碼Linux
- 關於監聽不能啟動的解決方法
- linux下oracle的自動啟動LinuxOracle