Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I've come across an excellent article by Jeff Smith recently that describes how to enable debug mode in SQL Developer. This has been a useful source of information in my recent quest to solve some connectivity issues with certain databases, however it wasn't the final answer I was after.

Jeff's article wasn't completely useful because SQL Developer was doing this...
sqldevconnerr.png


Every second or so the Reconnect dialog would tell me 'Your database connection has been reset. Any pending transactions or session state has been lost.' Over and over again with no chance of having a glimpse at the debug log inside SQL Developer itself.

So I got thinking that the SQL Developer debug logging looks like standard Java logging with some custom properties set so a standard FileHandler should work...and it does!

This is what I added to the end of the sqldeveloper/sqldeveloper/bin/logging-debug.conf file...


 sqldeveloper/sqldeveloper/bin/logging-debug.conf
...
java.util.logging.FileHandler.pattern=/tmp/sqldeveloper.log
java.util.logging.FileHandler.level=ALL
handlers=java.util.logging.FileHandler


Don't forget to add 'IncludeConfFile sqldeveloper-debug.conf' to the sqldeveloper.conf file to make this work, as per Jeff's article.

Adjust the path to your log file to suit.

After doing this I could see my log file filled with messages and didn't have to try and debug these inside SQL Developer itself...
 Log Output
...
<record>
<date>2016-01-24T08:01:13</date>
<millis>1453586473870</millis>
<sequence>3627</sequence>
<logger>oracle.javatools.db.execute.ConnectionWrapper</logger>
<level>INFO</level>
<class>oracle.javatools.db.execute.ConnectionWrapper</class>
<method>call</method>
<thread>56</thread>
<message>RaptorTask: Object Selection: The connection to database MY_DATABASE is closed.</message>
</record>
...


-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.