查詢Oracle數(shù)據(jù)庫中的游標(biāo)數(shù)
除了查詢Oracle數(shù)據(jù)庫的數(shù)據(jù)之外,我們還可以查詢Oracle數(shù)據(jù)庫的游標(biāo)數(shù),下面就為您詳細(xì)介紹該方法,希望對(duì)您學(xué)習(xí)查詢Oracle數(shù)據(jù)庫方面能有所幫助。
select o.sid,osuser,machine,count(*) num_curs from v$open_cursor o,v$session s where user_name='cportal' and o.sid=s.sid group by o.sid,osuser,machine order by num_curs desc;
查詢cportal用戶的游標(biāo)數(shù)。去掉user_name為所以用戶的游標(biāo)數(shù)。
show parameter open_cursors;
獲得配置文件(init.ora)中為oracle配置的***游標(biāo)數(shù)。
select q.sql_text from v$open_cursor o,v$sql q where q.hash_value=o.hash_value and o.sid=217;
獲取為游標(biāo)執(zhí)行的 SQL。
select count(*) from v$open_cursor;
查詢Oracle數(shù)據(jù)庫當(dāng)前游標(biāo)總數(shù)。
【編輯推薦】
Oracle內(nèi)存結(jié)構(gòu)--SGA