Adam, I haven't looked at this issue enough but I am wondering if you need to use the property derby.infolog.append=true in order to avoid the log getting emptied after the session.
Mamta On 5/9/08, adam jvok <[EMAIL PROTECTED]> wrote: > Thanks to John for his reply. > > I seem to have found the source of my problem, but it seems to point > to another issue. > > Previously I had been working in a single terminal window and only > checking the derby.log after running the query in ij. > By keeping an eye on the derby.log (in another terminal) while I'm > using ij, I see what's going on: The derby.log is being written to as > expected, but when I terminate ij, the derby.log is emptied (zero > bytes). > I have tried terminating ij with 'quit;', 'exit;', 'disconnect; > quit;', 'disconnect; exit;', all with the same result (empty log > file). > However, if I terminate ij with ctrl-C or ctrl-D, the log file remains intact. > > Why is this? > > Also worth noting: > - delete derby.log > - start network server; > - check log: 502 bytes. > - run query (in ij); > - check log: 1303 bytes, content as expected. > - quit ij > - check log: 0 bytes > - run query (in ij); > - check log: 2104 bytes, first 1303 bytes are null, rest as expected. Odd. > > The upshot is, I can now read what I want from the derby.log but am > confused by what terminating ij does to the log. Any thoughts? > > > On 5/9/08, John Embretsen <[EMAIL PROTECTED]> wrote: > > adam jvok wrote: > >> I have a similar problem. > >> I'm using 10.4.1.3 on linux and, following John's advice, yes, I can > >> get the query plan logged if I use the embedded driver. But I don't > >> want to use the embedded driver. > >> So far I have failed to make this work with the network server. > >> My derby.log remains empty running the same query with the network > >> server, even with derby.properties containing: > >> derby.language.logQueryPlan=true > >> and DERBY_OPTS=-Dderby.language.logQueryPlan=true > >> Any ideas how to get this to work with the network server? > > > > I just tried with the bin\startNetworkServer.bat script as well, having > > derby.language.logQueryPlan=true in derby.properties, and the query plan > > ended > > up in derby.log. > > > > In this experiment, I put derby.properties in > > C:\tmp\john\db-derby-10.4.1.3-bin > > and ran the commands > > > > "set DERBY_HOME=c:\tmp\john\db-derby-10.4.1.3-bin" > > > > and > > > > "bin\startNetworkServer.bat" > > > > from that directory. > > Then I connected to the server via IJ using the client driver: > > > > "java -jar lib\derbyrun.jar ij" > > > > > > Some questions that may help folks along: > > > > How exactly are you starting the server, and from which directory? > > > > Are you sure that derby.properties is in the server's "system home"? > > This is either the network server's working directory, or the directory > > pointed > > to by the system property derby.system.home if set. > > > > If you add the property > > derby.drda.logConnections=true > > to derby.properties, do you see connection logging in the server console > > after > > you restart the server and connect to it via JDBC (e.g. IJ)? > > If you do, the problem is property-specific. If you don't, the server does > > not > > seem see your derby.properties file at all. > > > > Did you try the "java <properties> -jar derbyrun.jar server start" approach? > > This makes it more likely that the server sees you settings, in case there > > are > > "system home" issues. > > > > > > -- > > John > > > > > > > > > > >
