1.查看游標數
show parameter open_cursors
2.修改游標數
alter system set open_cursors = 10000;
3.獲取打開的游標數
1
2
3
4
5
6
7
|
select o.sid, osuser, machine, count (*) num_curs from v$open_cursor o, v$session s where user_name = 'AF651_U8' and o.sid = s.sid group by o.sid, osuser, machine order by num_curs desc ; SID OSUSER MACHINE NUM_CURS |
4.查詢某游標執行的sql
1
2
3
4
|
select q.sql_text from v$open_cursor o, v$sql q where q.hash_value = o.hash_value and o.sid = 396; |

5.解決問題的辦法:
--1.查找代碼不合理的地方,修改代碼。
--2.重啟oracle數據庫
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持服務器之家。
原文鏈接:https://www.cnblogs.com/helq/p/13260426.html