Re: sql problem

From: Kerry Osborne <kerry.osborne_at_enkitec.com>
Date: Wed, 17 Mar 2010 07:40:11 -0500
Message-Id: <154F4A3A-71FC-41C0-BAF0-77B3D57F435F_at_enkitec.com>



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.

Kerry Osborne
Enkitec
blog: kerryosborne.oracle-guy.com

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;
>
> Tony

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 17 2010 - 07:40:11 CDT

Original text of this message