脚本:格式化的V$SQL_SHARED_CURSOR报告

The function generates a summary report of the v$sql_shared_cursor view and additional diagnostic information depending on the reason code.
Counts all the versions that have ‘Y’ in any of the columns and if any have all ‘N’ too.

This script may be useful to diagnose ORA-600 [17059] errors

Running the Script
— Generate reports for all cursors with more than 100 versions using SQL_ID (10g and up)
select b.* from v$sqlarea a ,table(version_rpt(a.sql_id)) b where loaded_versions >=100;

— Generate reports for all cursors with more than 100 versions using HASH_VALUE
select b.* from v$sqlarea a ,table(version_rpt(null,a.hash_value)) b where loaded_versions>=100;

— Generate the report for cursor with sql_id cyzznbykb509s
select * from table(version_rpt(‘cyzznbykb509s’));

version_rpt3_12.sql


Posted

in

by

Tags:

Comments

2 responses to “脚本:格式化的V$SQL_SHARED_CURSOR报告”

  1. 玉面飞龙 Avatar

    12g都出来了阿,13还是g吗

    1. admin Avatar
      admin

      Hello Dragon ,
      http://www.oracledatabase12g.com/archives/oracle-12g-coming-soon.html
      在2012面前一切都是浮云

Leave a Reply

Your email address will not be published. Required fields are marked *