ITPub博客

首页 > 数据库 > 数据库开发技术 > V$SQL_BIND_CAPTURE

V$SQL_BIND_CAPTURE

原创 数据库开发技术 作者:jss001 时间:2009-02-12 17:17:41 0 删除 编辑
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"=;
[@more@]

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

上一篇: latch
请登录后发表评论 登录
全部评论
  • 博文量
    306
  • 访问量
    871833