如何查看Oracle SQL绑定变量
1个回答
展开全部
查看Oracle SQL绑定变量方法如下:
alter session set nls_date_format = 'yyyy-mm-dd,hh24:mi:ss';
set linesize 400
col sql_Id format a20
col name format a20
col datatype_string format a14
col value_string format a20
--这个sql从内存中读取绑定变量值信息,若是不在内存中,则使用下一个sql
select
sql_id,name, datatype_string, last_captured,value_string from
v$sql_bind_capture where sql_id='dxfcacn4t4ppw' order by
LAST_CAPTURED,POSITION;
--这个sql从awr中读取绑定变量值信息
select
instance_number, sql_id,name, datatype_string,
last_captured,value_string from dba_hist_sqlbind where
sql_id='fahv8x6ngrb50'order by LAST_CAPTURED,POSITION;
alter session set nls_date_format = 'yyyy-mm-dd,hh24:mi:ss';
set linesize 400
col sql_Id format a20
col name format a20
col datatype_string format a14
col value_string format a20
--这个sql从内存中读取绑定变量值信息,若是不在内存中,则使用下一个sql
select
sql_id,name, datatype_string, last_captured,value_string from
v$sql_bind_capture where sql_id='dxfcacn4t4ppw' order by
LAST_CAPTURED,POSITION;
--这个sql从awr中读取绑定变量值信息
select
instance_number, sql_id,name, datatype_string,
last_captured,value_string from dba_hist_sqlbind where
sql_id='fahv8x6ngrb50'order by LAST_CAPTURED,POSITION;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询