Bind Variables Checker for Oracle – now install-free

I've finally managed to implement an install-free version of my utility to check for bind variables usage. The new script is named bvc_check.sql and when run, it examines the SQL statements stored in the library cache (through gv$sql) and dumps the ones that would be the same if the literals were replaced by bind variables.

An example of the output:

------------------
statements count :  0000000003
bound    : select*from t where x=:n
example 1: select * from t where x = 2
example 2: select * from t where x = 3
------------------

So we have 3 statements that are the same once literals are replaced with bind variables. Two examples are provided; the action of replacing the literals 2 and 3 with the bind variable :n makes the statements the same.

The script are available on this page, that also explains the script workings in more detail and describes other scripts that might be of interest.


  1. Coskan

    Thursday, July 23, 2009

    Did not dig into all sqls one by one but initial expression is that is is very cool. thank you very much for sharing Alberto.

  2. Blogroll Report 17/07/2009 – 24/07/2009 « Coskan’s Approach to Oracle

    Monday, July 27, 2009

    [...] Alberto Dell’Era – Bind Variables Checker for Oracle – now install-free [...]

Leave a Comment

Please enclose SQL code inside the tag pair [sql] ... [/sql]

Subscribe without commenting

Links (alphabetical order)

Blogroll (alphabetical order)

Blog Aggregators (alphabetical order)


Switch to our mobile site