ORA-12516:TNS:listener could not find available handler with matching protocol stack

登錄時報:sql

ORA-12516:TNS:listener could not find available handler with matching protocol stack數據庫

解決方法:服務器

1.切換到oracle用戶下:session

su - oracle併發

2.中止數據庫監聽器:oracle

 lsnrctl stop進程

3.等鏈接數下來後,登錄數據庫:it

sqlplus / as sysdba io

4.修改processes和sessions參數:file

1)查看processes和sessions參數

SQL> show parameter processes;

SQL>show parameter sessions ;

2)修改processes和sessions參數

SQL> alter system set processes=300 scope=spfile;

SQL>alter system set sessions=335 scope=spfile ;

SQL>commit ;

3)重啓數據庫

重啓Oracle服務器才能生效

4)相關說明

ORACLE的鏈接數(sessions)與其參數文件中的進程數(process)有關,它們的關係:sessions=(1.1*process+5)

5)相關查詢

a.查詢數據庫當前進程的鏈接數:select count(*) from v$process;

b.查看數據庫當前會話的鏈接數:elect count(*) from v$session;

c.查看數據庫的併發鏈接數:select count(*) from v$session where status='ACTIVE';

d.查看當前數據庫創建的會話狀況:select sid,serial#,username,program,machine,status from v$session;

e.查詢數據庫容許的最大鏈接數:select value from v$parameter where name = 'processes'; 或者:show parameter processes;

f.修改數據庫容許的最大鏈接數:alter system set processes = 300 scope = spfile;

g.查看當前有哪些用戶正在使用數據:

select osuser,a.username,cpu_time/executions/1000000||'s',sql_fulltext,machinefrom v$session a,v$sqlarea bwhere a.sql_address = b.addressorder by cpu_time/executions desc;

相關文章
相關標籤/搜索