Re: sql problem
Date: Wed, 17 Mar 2010 07:40:11 -0500
v$sql_bind_capture contains sampled values that change as the statement is run with different sets of values. The other_xml field has the values used ("peeked") when the statement is parsed. If you set _optim_peek_user_binds to false there will be no bind values in the other_xml field, but they will still be in v$sql_bind_capture - just no guarantee they are the values that were used when the statement was parsed. Dion Cho has a good post on the topic on his blog.
On Mar 16, 2010, at 5:43 PM, Tony Adolph wrote:
> What about:
> select '(child '||child_number||') B' || bc.POSITION || ':' bind,
> bc.VALUE_STRING, bc.DATATYPE_STRING
> from gv$sql_bind_capture bc
> where sql_id = '&var_sql'
> order by child_number, position;