關於oracle的連接時ORA-12519錯誤的解決方案


系統在運行時出現了ORA-12519的錯誤,無法連接數據庫,后來在網上找了下,找到了如下的解決方法,共享下。 
OERR: ORA-12519 TNS:no appropriate service handler found 客戶端連接間歇性失敗,報錯ORA-12519 
Cause: the listener could not find any available service handlers that are         appropriate for the client connection. 
Action:  檢查lsnrctl service ,instance已經注冊,狀態顯示ready時,可以連接。 When the listener believes the current number of connections has reached maximum load,  it may set the state of the service handler for an instance to "blocked" and begin refusing  incoming client connections with either of the following errors: ora-12519 or ora-12516 
采用服務動態注冊的方式,由PMON 通過SERVICE_UPDATE 來得到目前連接情況,但SERVICE_UPDATE 有時間間隔, 
所以,listener顯示的連接數和當前實際的連接數可能不同。 
解決方法就是修改ORACLE的processes的值。 1.process 和session的概念:  
process:這個參數限制了能夠連接到SGA的操作系統進程數(或者是Windows 系統中的線程數),這個總數必須足夠大,從而能夠適用於后台進程與所有的專用服務器進程,此外,共享服務器進程與調度進程的數目也被計算在內.此外,共享服務器進程與調度進程的數目也被計算在內.因此,在專用服務器環境中,這是一種限制並發連接數的方法.   
疑點一:能夠連接到SGA的操作系統進程數,這種進程包括哪些進程? Windows系統中的線程數,是指所有與oracle相關的進程的線程數之和?   
疑點二:在共享服務器和專用服務器環境中,算法有什么不同?   
哪位兄弟了解比較透徹,請指點一下,拜謝!   
Sessions:是被應用於oracle層次而非操作系統層次.在不考慮通過專用服務器或共享服務器進行登錄的情況下,這個參數限制了對指定實例的並發登陸數.   
疑問:在C/架構中,是指Oracle用戶登陸建立的會話數?在B/S架構中又怎么算呢?   
2,盡管概念不是很明白,遇到這種問題還得干活先:   
1).通過SQLPlus修改  
Oracle的sessions和processes的關系是  sessions=1.1*processes + 5  

 

 


 
使用sys,以sysdba權限登錄:  SQL> show parameter processes;  NAME TYPE VALUE  
------------------------------------ ----------- ---------------------------------------  aq_tm_processes integer 1  db_writer_processes integer 1  job_queue_processes integer 10  log_archive_max_processes integer 1  processes integer 150  
SQL> alter system set processes=400 scope = spfile;  系統已更改。  
SQL> show parameter processes;  NAME TYPE VALUE  
------------------------------------ ----------- -----------------------------------------  aq_tm_processes integer 1  db_writer_processes integer 1  job_queue_processes integer 10  log_archive_max_processes integer 1  processes integer 150  SQL> create pfile from spfile;  文件已創建。    
重啟數據庫,OK!   
SQL> shutdown immediate;  數據庫已經關閉。  已經卸載數據庫。  ORACLE 例程已經關閉。  SQL> startup  
ORACLE 例程已經啟動。   
Total System Global Area  171966464 bytes  Fixed Size                   787988 bytes  Variable Size             145488364 bytes  Database Buffers           25165824 bytes  Redo Buffers                 524288 bytes  數據庫裝載完畢。  數據庫已經打開。  
SQL> show parameter processes;   

 

 


NAME                                 TYPE        VALUE  ------------------------------------ ----------- ----------------  aq_tm_processes                      integer     0  db_writer_processes                  integer     1  gcs_server_processes                 integer     0  job_queue_processes                  integer     10  log_archive_max_processes            integer     2  processes                            integer     400  SQL> show parameter session;   
NAME                                 TYPE        VALUE  ------------------------------------ ----------- ----------------  java_max_sessionspace_size           integer     0  java_soft_sessionspace_limit         integer     0  license_max_sessions                 integer     0  license_sessions_warning             integer     0  logmnr_max_persistent_sessions       integer     1  session_cached_cursors               integer     0  session_max_open_files               integer     10  sessions                             integer     445  shared_server_sessions               integer  SQL>    
【注:sessions是個派生值,由processes的值決定,公式sessions=1.1*process + 5】 


免責聲明!

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



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