ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10g中关于绑定变量终于有了可查询的地方,不错啊!

10g中关于绑定变量终于有了可查询的地方,不错啊!

原创 Linux操作系统 作者:nmgzw 时间:2019-05-17 16:06:05 0 删除 编辑
V$SQL_BIND_CAPTURE

As of Oracle 10g, view V$SQL_BIND_CAPTURE is available, which stores the contents of bind variables for the executed SQL statements. On this basis, the bind variable contents specified for an SQL statement can be determined with the following query:

SELECT
SUBSTR(SBC.NAME, 1, 10) BIND,
SUBSTR(SBC.VALUE_STRING, 1, 50) VALUE,
COUNT(*) "NUMBER"
FROM
V$SQL_BIND_CAPTURE SBC, V$SQL S
WHERE
S.SQL_TEXT LIKE '' AND
S.SQL_ID = SBC.SQL_ID
GROUP BY NAME, VALUE_STRING
ORDER BY 1, 2;

The bind variable contents are refreshed in V$SQL_BIND_CAPTURE at the earliest every 15 minutes. If you require a faster refresh for analysis purposes, you can temporarily set the underlying underscore parameter _CURSOR_BIND_CAPTURE_INTERVAL to a value lower than 900 seconds (-> the default 15 minutes) as follows:

ALTER SYSTEM SET "_CURSOR_BIND_CAPTURE_INTERVAL"=;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25702/viewspace-464268/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2002-10-18

  • 博文量
    71
  • 访问量
    65487