You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Paul Linehan <li...@tcd.ie> on 2014/02/03 19:09:55 UTC

Re: How to log queries in Apache Derby - problem solved!

> First remove / rename all the previously created derby.log files.
> Then start your server.

> Look for a fresh derby.log file (if not the current dir when you start
> networkserver, also check under your home directory) and put the
> derby.properties file in *that* directory, then restart...
> You may also consider adding the following:
>     derby.stream.error.logSeverityLevel=0
>     derby.infolog.append=true


Hi Myrna,


Apache Derby query logging problem solved!


Create file derby.properties in $DERBY_HOME

derby.language.logStatementText=true
derby.stream.error.logSeverityLevel=0
derby.infolog.append=true


>From the $DERBY_HOME run (i.e. start server)

java -jar -Dderby.system.home=$DERBY_HOME
$DERBY_HOME/lib/derbyrun.jar server start

>From the $DERBY_HOME run ij.

Connect to your database
i.e. CONNECT 'jdbc:derby://localhost:1527/pdata/firstdb';

Run your query (I then committed - possibly unnecessary)

Exit ij.

cat/more/less derby.log and voilĂ  - my query is there!

Thank you very much - that's great. Now I can log my queries - I can
always play around
with the settings, but I know I can always get back to a working
setup! Yaay! And thanks
to everyone else who contributed.


Paul...


> Myrna



-- 

linehanp@tcd.ie

Mob: 00 353 86 864 5772