Tuesday, January 26, 2010

Find Bind Variables for a statement

Recently executed statement look in v$sql_bind_capture


select sql_id, name, datatype_string, value_string, last_captured
from v$sql_bind_capture
where sql_id = 'xxxxxx';



Statement in the past we can try the AWR


select sql_id, name, datatype_string, value_string, last_captured
from dba_hist_sqlbind where sql_id = 'xxxxxx'
order by last_captured;




Bind capture is disabled when STATISTIC_LEVEL=basic

******************************************
keywords: bind variable
******************************************
rdbms version: 10g
******************************************

No comments: