查询Oracle以运行sql和绑定变量的值

查询Oracle以运行sql和绑定变量的值,oracle,bind,trace,Oracle,Bind,Trace,如果我运行下面图1中的SQL,它可能会返回如下内容: Select fname, lname from name_tbl where nam_key = :key 如果不使用一些奇特的DBA跟踪实用程序,我如何查询Oracle系统表以找到绑定变量“:key”的值 图1-列出当前正在运行的sql语句 Upd。或者,当然: select sql_id, value_string from v$sql_bind_capture where name = ':key' select name, v

如果我运行下面图1中的SQL,它可能会返回如下内容:

Select fname, lname from name_tbl where nam_key = :key 
如果不使用一些奇特的DBA跟踪实用程序,我如何查询Oracle系统表以找到绑定变量“:key”的值

图1-列出当前正在运行的sql语句

Upd。或者,当然:

select sql_id, value_string
from v$sql_bind_capture
where name = ':key'
select name, value_string
from v$sql_bind_capture
where sql_id = your_query_id
select sql_id, value_string
from v$sql_bind_capture
where name = ':key'