Oracle 视图 DBA_SQLSET_BINDS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_SQLSET_BINDS被用来查询当前数据库中正在运行的SQL指令在哪些变量上有绑定。When you run an SQL statement that has bind variables, Oracle parses your statement and assigns values to each bind. The assigned values are called Binds and they are stored in memory. Binds are usually referred to by the variable name (parameter name) which starts with one or two colons (:KEY, :VARIABLE_NAME, etc.).
The DBA_SQLSET_BINDS view is a queryable view of Oracle’s in-memory SQL bind parameters. It does not provide the values of each bind, just the bind name and associated information.
下面是一个使用DBA_SQLSET_BINDS视图的示例:
SELECT b.*
FROM v$sql s
JOIN dba_sqlset_binds b ON (b.sql_id = s.SqlId)
WHERE s.SQL_FULLTEXT LIKE ‘%SELECT * FROM emp WHERE emp_name = :name%’;
上面的查询将返回包含有一个SQL指令,它拥有一个名为:name的绑定变量,被关联的相关信息。它也可以使用来查看某一SQL指令中,绑定变量的数量。
官方英文解释
DBA_SQLSET_BINDS
displays the bind values associated with all SQL tuning sets in the database. Its columns are the same as those in ALL_SQLSET_BINDS
.
See Also:
“ALL_SQLSET_BINDS”