• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » Oracle Database » How to find the bind variable of the sql id

How to find the bind variable of the sql id

March 15, 2023 by techgoeasy Leave a Comment

Sometimes a sql_id might show a different plan because of a particular value of the bind variable. So we would like to find out the bind variable. Also, we might want to know the bind variable for the sql_id being executed by the session. In this post, we will check out How to find the bind variable of the sql id

SET PAUSE ON
SET PAUSE 'Press Return to Continue'
SET PAGESIZE 60
SET LINESIZE 300
COLUMN sql_text FORMAT A120
COLUMN sql_id FORMAT A13
COLUMN bind_name FORMAT A10
COLUMN bind_value FORMAT A26
SELECT sql_id, t.sql_text sql_text, b.name bind_name, b.value_string bind_value FROM 
v$sql t JOIN v$sql_bind_capture b 
using (sql_id) WHERE b.value_string is not null AND sql_id='&sqlid' 
/

or

SELECT name, position, datatype_string, value_string
FROM v$sql_bind_capture
WHERE sql_id = '&1‘;

Related Articles
Bind Variable in Oracle

Filed Under: Oracle, Oracle Database

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • How to find the bind variable of the sql id
  • How to list parameter set at session level in Oracle
  • How to generate tkprof in EBS in 19c
  • Oracle tkprof utility
  • What is Skew in Database?

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us