Tagged jdbc on Rasmus.krats.sehttps://rasmus.krats.se/tag/jdbc.en2017-06-24T12:00:00+00:00Reminiscing this and that, on the web since 1994.Logdriverhttps://rasmus.krats.se/2009/logdriver.en2017-06-24T12:00:00+00:00Rasmus Kajhttps://rasmus.krats.se/rkaj2009-06-03T18:10:00+00:00<p>When developing code with Hibernate (or other Java tools that create
SQL statements for you) it is often a good idea to take a close look
at the generated SQL code, for example if you have performerance
issues.</p>
<p>A very nice and simple way to do that is logdriver by
Ryan Bloom.
(Update 2017-06-24: Unfortunatley, the domain seems to have been lost
to a spam site).</p>
<p>And it’s simple to use! I’ve got a <code>.properties</code> file where I’ve
commented out the ordinary db driver and use logdriver instead. As
simple as this:</p>
<pre data-lang="properties"><span class="syhsource syhjava-props"><span class="syhcomment syhline syhnumber-sign syhjava-props"><span class="syhpunctuation syhdefinition syhcomment syhjava-props">#</span> DB_DRIVER=oracle.jdbc.driver.OracleDriver
</span><span class="syhcomment syhline syhnumber-sign syhjava-props"><span class="syhpunctuation syhdefinition syhcomment syhjava-props">#</span> DB_URL=jdbc:oracle:thin:@dbhost.mydomain:1523:db
</span><span class="syhkeyword syhother syhjava-props">DB_DRIVER</span><span class="syhpunctuation syhseparator syhkey-value syhjava-props">=</span>net.rkbloom.logdriver.LogDriver
<span class="syhkeyword syhother syhjava-props">DB_URL</span><span class="syhpunctuation syhseparator syhkey-value syhjava-props">=</span>jdbc:log:oracle.jdbc.driver.OracleDriver:oracle:thin:@dbhost.mydomain:1523:db
</span></pre>
<p class='readmore'><a href='https://rasmus.krats.se/2009/logdriver.en'>Be the first to comment.</a></p>