How to log queries in Apache Derby?
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... -- lineh...@tcd.ie Mob: 00 353 86 864 5772
Re: Can't open more than one connection to database?
Hi again all, > I normally connect to derby using either ij or SQuirreL SQL > or both. Found it! Using connect 'jdbc:derby://localhost:1527/pdata/firstdb'; I can use multiple connections - I was using a different connection string CONNECT 'jdbc:derby:firstdb'; which obviously picks up the embedded driver in some shape or form! Sorry about the panic! Paul... -- lineh...@tcd.ie Mob: 00 353 86 864 5772
Can't open more than one connection to database?
Hi all, A curious one is happening today. I normally connect to derby using either ij or SQuirreL SQL or both. Today though, if I connect with Squirrel, I can't connect with ij and vice versa. Error is here == linehanp@lg12l9:~/derby/db-derby-10.10.1.1-bin/pdata$ ij ij version 10.10 ij> CONNECT 'jdbc:derby:firstdb'; ERROR XJ040: Failed to start database 'firstdb' with class loader sun.misc.Launcher$AppClassLoader@591ce4fe, see the next exception for details. ERROR XSDB6: Another instance of Derby may have already booted the database /users/ugrad/linehanp/derby/db-derby-10.10.1.1-bin/pdata/firstdb. ij> == I'm using the Client/Server version - and I'm *_almost_* certain this didn't happen before. Any ideas? TIA and rgs, Paul... -- lineh...@tcd.ie Mob: 00 353 86 864 5772
Re: Configuring a Server Policy for Derby on Windows
On 1/31/2014 8:43 AM, John I. Moore, Jr. wrote: One final point of clarification to my original email: John, thanks for sharing all your findings, and thanks all of you for the pointers to detailed information. I've tried to collect it all at: https://wiki.apache.org/db-derby/SecurityPolicyTips thanks, bryan