db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Linehan <lineh...@tcd.ie>
Subject How to log queries in Apache Derby?
Date Sat, 01 Feb 2014 20:14:27 GMT
Hi all,

I am trying to log queries to my Apache Derby server.


My $DERBY_HOME is as follows - Ubuntu Linux 64bit - Java jdk1.7.0_45.
Can access my database through Squirrel and ij.

=======================================
linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin/bin$ echo $DERBY_HOME
/users/ugrad/linehanp/derby/db-derby-10.10.1.1-bin
linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin/bin$
=======================================

I launch derby by issuing the command (from $DERBY_HOME)

java -jar $DERBY_HOME/lib/derbyrun.jar server start
or sometimes
./bin/startNetworkServer

I created a file called derby.properties in $DERBY_HOME/bin
in which there is one line

======================
linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin/bin$ more derby.properties
derby.language.logStatementText=true
linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin/bin$
======================

Restart server.

I run ij from $DERBY_HOME and issue a query.

==========================================
ij> connect 'jdbc:derby://localhost:1527/pdata/firstdb';
ij> set schema linehanp;
0 rows inserted/updated/deleted
ij> select * from analysis;
ANALYSIS_ID|CREATED
.... Result set deleted.
ij> commit;
ij> exit;
=============================

I've looked everywhere and can't find my logged query

======================
linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin$ find . -name "*.log"
./pdata/derby.log  <<====== same as ./derby.log below.
./derby.log  <<<<==== a line about shutting down, nothing else
./bin/derby.log  <<<=== empty file.
linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin$ cd bin/
============================

Could some kind soul tell me what I'm doing wrong - thanks.

If any other information is required, please don't hesitate to let me know.

Rgs,


Paul...

-- 

linehanp@tcd.ie

Mob: 00 353 86 864 5772

Mime
View raw message