Gets the value passed in the binding variable statement

Source: Internet
Author: User

Look at the value of the bound variable--and one more way--to first query the hash_valueselect of the SQL statement A.sql_id,a.hash_value,a.child_number,a.sql_text from V$sql a where a . Sql_text like ' SELECT t_lte_card_info. pk,% ' 2621316314 0 SELECT t_lte_card_info. pk,%.--The value of the incoming Hash_value select * FROM table (Dbms_xplan.display_cursor (2621316314,0, ' advanced ')); select * FROM table (Dbms_xplan.display_cursor (2621316314,0, ' Advanced allstats last Peeked_binds '), or select t.* from V$sql s,table (dbms_ Xplan.display_cursor (S.sql_id,s.child_number, ' Advanced allstats last Peeked_binds ')) t where s.sql_id = ' 6g0tcbdcr08b9 ‘;
The following values in the query result are the values and types that are passed in peeked binds (identifiedBy Position):
--------------------------------------

   1 - (Number): 99
   2 - (Number): 100
--use view to get "View V$sql_bind_capture" sql> Select name,datatype_string,value_string from V$sql_bind_capture where sql_id= ' xxx ';  There are three points to note: 1. This view is a snapshot view, and does not save all of the executed SQL binding variables, can see completely by luck 2. This view retains only the binding variable 3 that was last captured by the same SQL. If the binding variable is a date type, you cannot see it directly, but you will see the following tips View Dba_hist_sqlbind "This view is a historical data of v$sql_bind_capture, with a binding variable value of the same SQL at different times. But it's not complete. --This SQL reads the binding variable value information from the 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;

From for notes (Wiz)

Gets the value passed in the binding variable statement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.