Trace: how_to_get_bind_variables_values_from_oracle

Table of Contents


How to get bind variables values from Oracle

If you already used JDBC prepared statement, you know what are bind variables : the '?' in the query, like in : SELECT col1,col2 from t_table where col1 in (?,?,?) AND col2 = ? For the record, all compiled queries with the same number of '?' are cached by Oracle, hence (most of the time) faster to execute. But how to debug passed values ? This is often valuable like yesterday where one of our services tried to insert value too large for a column (a 4 digits integer into a NUMBER(5,2)).

There is several ways to achieve it, one is using a 'wrapper' JDBC driver (like log4jdbc) that audit and log the values but it's a bit intrusive.

A very simple non-intrusive way for a specific need is to query the v$sql table, the Oracle internal log. A sample query is given bellow (source Stack Overflow) :

select s.sql_id, 
       bc.position, 
       bc.value_string, 
       s.last_load_time, 
       bc.last_captured
from v$sql s
  left join v$sql_bind_capture bc 
         on bc.sql_id = s.sql_id 
        and bc.child_number = s.child_number
where s.sql_text like 'delete from tableA where fk%' -- or any other method to identify the SQL statement
order by s.sql_id, bc.position;

It works like a charm !

search?q=&btnI=lucky

Discussion

kakakaookakakaoo, 2018/05/12 05:51

http://www.jordanshoesforsale.us.com

http://www.coach-factoryoutletonline.us.org

http://www.canadagoose-outlet.name

http://www.pandora.us.com

http://www.yeezyboost-350.co.uk

http://www.montblanc-pens.us.org

http://www.rolex-replicawatches.com.co

http://www.cheapoakleysunglassesofficial.us.com

http://www.coachfactory-outlet.in.net

http://www.okaleysunglasseses.us.com

http://www.airmaxoutletsaleus.com

http://www.pandorajewelry.in.net

http://www.raybansunglasses.net.co

http://www.cheapjordans.com.co

http://www.adidas-superstar.us.com

http://www.outletcoachoutlet.us.com

http://www.outletlouisvuitton.us.com

http://www.michael-korsoutlets.eu.com

http://www.uggsoutlet-clearance.us.com

http://www.oakleysunglasses-wholesales.us.com

http://www.christianlouboutinshoesuk.org.uk

http://www.pandorajewelryus.us.com

http://www.abercrombieand-fitch.ca

http://www.timberland-boots.us.com

http://www.cheapjordans.us.com

http://www.fitflopssaleuk.me.uk

http://www.thenorthfacejacketsoutlet.us.com

http://www.raybanssunglasseses.us.com

http://www.coachcanadaoutlet.ca

http://www.canadagoosesoutlet.ca

http://www.philipppleinshirt.com

http://www.nikeoutletshoes.us.com

http://www.uggscanadaugg.ca

http://wwwcanadagoose-uk.com.co

http://www.suprashoes.us.org

http://www.canadagoosejacketssale.com.co

http://www.uggsoutletofficials.us.com

http://www.harden-vol1.com

http://www.oakley--sunglasses.us.org

http://www.airmax-2018.com

http://www.cheapjordans.in.net

http://www.coachfactoryoutlet-online.in.net

http://www.jewelleryscharm.com

http://www.tiffanyandcojewelry.in.net

http://www.jordanshoes.in.net

http://www.ralphlauren.me.uk

http://www.nikeoutletonlinestore.us.com

http://www.adidasoutlet.us.com

http://www.raybansunglassessalecheap.us.com

http://www.fitflopssale-clearance.us.org

http://www.coachfactory-outlet.us.com

http://www.canadagoosesalejackets.us.com

http://www.moncleroutlet.me.uk

http://www.timberlandbootsoutlets.us.com

http://www.coachoutletmalls.us.com

http://www.asicsshoes-outlet.us.com

http://www.katespadehandbagsclearance.us.com

http://www.nike-shoes.in.net

http://www.oakleysunglassesforwomen.us.com

http://www.cheapmlbjerseyschina.us.com

http://www.coachfactoryonlineoutlet.com.co

http://www.adidas-shoes.us.com

http://www.moncleroutlets.us.org

http://www.kate-spade.us.com

http://www.monclerjacketssale.us.com

http://www.toryburch-outletstores.us.com

http://www.canadagooseoutlet.net.co

http://www.jacketscanadagoose.org.uk

http://www.ralphlauren-outlet.me.uk

http://www.adidasnmdr1.us.com

http://www.burberry-outlet-canada.ca

http://www.cheapjordan-shoes.in.net

http://www.coachoutletonlinestore.in.net

http://www.converseshoes-outlet.us.com

http://www.toryburch-outletonline.in.net

http://www.canadagooseoutletcheap.us.com

http://www.ultraboost.us

http://www.katespadeoutletstoreonline.us.com

http://www.mulberry-bags.me.uk

http://www.pandora-charms.us.org

http://www.canadagoosejacketscoats.org.uk

http://www.jordanretro.name

http://www.nikeairmax.in.net

http://www.jordansshoes.us.com

http://www.salvatoreferragamoshoes.us.com

http://www.coach-outletonline.eu.com

http://www.vuittonlouis.us.com

http://www.pumashoesoutlet.us.com

http://www.air-max90.org.uk

http://www.uggs.net.co

http://www.ralph-laurenoutlet.us.org

http://www.adidasshoe.us.com

http://www.nike-store.us.com

http://www.pandora-jewelrycanada.ca

http://www.2017nikeairmax.us

http://www.polo-outlet.in.net

http://www.oakleysunglassessalecheap.us.com

http://www.raybanssunglassesoutlet.us.com

http://wwwcanadagoose-jacketsuk.com.co

http://www.outletpandora.us.com

http://www.ralph-laurenoutlet.org.uk

http://www.burberryoutlet.in.net

http://www.northface-jackets.us.com

http://www.pandoracharms.name

http://www.canada-goose-jackets.ca

http://www.cheapmlbjerseys-wholesale.us.com

http://www.mcm-outlet.us.org

http://www.tiffany-andcooutlet.us.com

http://www.guccioutlets.us.org

http://www.outlettoms.us.com

http://www.katespadeoutletonline.in.net

http://www.valentino-shoes.us.com

http://www.michaelkorsoutletonlineclearance.in.net

http://www.michaelkors-outlets.ca

http://www.supreme-clothing.us.com

http://www.coachfactory-outletonline.us.org

http://www.ralphlaurensale-clearance.me.uk

http://www.christianlouboutinshoes.us.org

http://www.cheapnfljerseysofficial.us.com

http://www.yeezyboost-350.us.com

http://www.airmax-97.us.com

http://www.michaelkors-outlet.ca

http://www.nikefreerun.name

http://www.michaelkors-outlet.com.co

http://www.adidas-yeezyboost.us.com

http://www.nikeshoes.us.com

http://www.canadagoosejackets-outlet.us

http://www.adidascampusshoes.us

http://www.supremenewyork.us.com

http://www.ugg-boots.net.co

http://www.air-jordans.us.com

http://www.yeezyboost.org.uk

http://www.birkenstocks.us

http://www.airjordans.us.com

http://www.ferragamo-outlet.us.com

http://www.vans-shoesoutlet.us.com

http://www.coachoutletus.us.com

http://www.canadagoosesaleoutlet.us.com

http://www.fitflops-saleclearance.us.org

http://www.pradaoutlets.us.com

http://www.ralphlaurenoutletsonline.us.com

http://www.burberry-outlet.name

http://www.uggsoutletstoress.us.com

http://www.airjordanshoes.in.net

http://www.adidas-nmd.us.com

http://www.katespadeoutletclearance.us.com

http://www.adidas-outlet.us.com

http://www.adidasyeezyboost-350.us.com

http://www.valentinoshoesoutlets.us.com

http://www.monclerjacketsoutlet.in.net

http://www.cheapoakleysunglasses.com.co

http://www.hermes.us.org

http://www.poloralphlaurenoutletpolo.us.com

http://www.cheapnfljerseysnflwholesale.us.com

http://www.reebokshoes.us.org

http://www.christianlouboutinoutlet.us

http://www.canadagoosejackets.net.co

http://www.coachoutletstoreonlineclearances.in.net

http://www.louboutinshoesuk.org.uk

http://www.red-bottoms.us.com

http://www.katespade.in.net

http://www.michaelkorsoutletclearance.in.net

http://www.nike-huarache.in.net

http://www.airmax-97.us

http://www.polo-ralphlauren.in.net

http://www.adidasnmd-shoes.us

http://www.michaelkors-outlet.in.net

http://www.supremeclothing.us.org

http://www.coachoutletcanada.ca

http://www.birkenstocksandalsuk.co.uk

http://www.ralphlaurensaleclearanceuk.me.uk

http://www.poloralphlaurenoutlet.in.net

http://www.birkenstockoutletus.us.com

http://www.coachoutletstore-online.us.com

http://www.outletcoachonline.us.com

http://www.louboutinshoes.in.net

http://www.michaelkorsoutlets.us.com

http://www.rolexreplica-watches.us.com

http://www.nikeoutletonline.us.com

http://www.redbottomsshoes.us.com

http://www.outletmichaelkors.us.com

http://www.coachfactoryoutlet-storeonline.us.com

http://www.moncler-outlet.us.org

http://www.mbtshoes.name

http://www.ralphlauren.net.co

http://www.air-max2018.us.com

http://www.fredperrypoloshirts.in.net

http://www.moncleroutletonlines.us.com

http://www.toryburchoutletonline.com.co

http://www.supremeclothing.org.uk

http://www.moncler-outlets.us.com

http://www.cheapjordans-shoes.us.com

http://www.ugg.net.co

http://www.pandoracharmssale-clearance.us.com

http://www.pandora-jewelryoutlet.us.com

http://www.cheapnbajerseys-wholesale.us.com

http://www.hollisterclothingstore.in.net

http://www.uggbootssales.us.com

http://www.michaelkorsoutletshopping.us.com

http://www.monclerjacketsuk.com.co

http://www.raybansunglasses.name

http://www.coach-factory-outlet.us.org

http://www.canadagoosejacket.com.co

http://www.outletcoachstore.us.com

http://www.katespadeoutlet.in.net

http://www.oakley.nom.co

http://www.fitflopssale.us.com

http://www.todsoutlet.in.net

http://www.kevindurantshoes.name

http://www.pandorajewelrypandora.us.com

http://www.coachoutletstoreonline.com.co

http://www.katespadehandbags.us.com

http://www.suprashoes.name

http://www.hermesbirkin.in.net

http://www.coachfactory-outletstore.us.com

http://www.kobebryantshoes.name

http://www.yeezyboost.us.com

http://www.fitflops-sale-clearance.us.com

http://www.oakleysunglasses-outlet.name

http://www.pandora-outlet.us.com

http://www.mulberryoutlet.org.uk

http://www.michaelkorshandbags.eu.com

http://www.timberlandbootsoutlet.us.com

http://www.katespadeoutlet.us.org

http://www.airmax2019.us.com

http://www.nikeoutlet.us.com

http://www.outlettoms.org

http://www.pandoracharms.us.com

http://www.adidas.us.com

http://www.longchampoutletus.us.com

http://www.nikezoom.us

http://www.coach-factoryoutletsonline.us.com

http://www.michaelkorsfactoryoutletsale.us.com

http://www.polooutlet.in.net

http://www.canadagooseukjackets.org.uk

http://www.adidasoriginals.in.net

http://www.pandoracharms-uk.org.uk

http://www.coachoutletonlinecoachfactoryoutlet.us.com

http://www.skechersshoes-outlet.us.com

http://www.eccoshoesstore.us.com

http://www.canadagooseoutletjackets.com.co

http://www.philippplein-outlet.com

http://www.coach-outletonlines.us.com

http://www.hermes-handbags.us

http://www.pandorastore.us.com

http://www.michael-korsoutlet.in.net

http://www.pandoracharms.com.co

http://www.birkenstockoutlets.us.org

http://www.airmax90.org

http://www.cheapjordanshoes.in.net

http://www.mbtshoessale.us.com

http://www.louisvuitton-outlet.us.com

http://www.longchamp-outlet.us.com

http://www.michael-korsoutlet.ca

http://www.nikeshoes.in.net

http://www.kobeshoes.cc

http://www.hermesbag.us.com

http://www.birkenstockshoesoutlet.us.com

http://www.canadagooseoutlet.name

http://www.adidas-yeezyshoes.us.com

http://www.coach-outlets.us.com

http://www.nmd-adidas.us.com

http://www.guccihandbagsoutlet.in.net

http://www.pandorajewelryoutlet.in.net

http://www.michael-korsoutlets.us.com

http://www.ralph-laurenoutlet.com.co

http://www.adidasyeezyshoes.us.com

http://www.timberland-outlets.us

http://www.coachoutlet-onlinesale.us.com

http://www.cheapraybans.com.co

http://www.uggsaustralia.fr

http://www.vuitton-louis.us.com

http://www.adadassuperstar.com

http://www.newbalance-outlet.us.com

http://www.cheapuggs.net.co

180512yueqin

Enter your comment. Wiki syntax is allowed:
 
blog_tech/5/how_to_get_bind_variables_values_from_oracle.txt · Last modified: 2015/04/06 21:12 by bflorat