Re: Automatic database and schema creation

2005-04-25 Thread Øystein Grøvlen
ØG == Øystein Grøvlen - Sun Norway [EMAIL PROTECTED] writes: ØG Peter Nabbefeld wrote: Hello, I just want to create a database, if it does not yet exist. Database creation works, schema creation does not. I'm using the following syntax (in Java): Statement stmt

Re: Behaviour of SYSCS_COMPRESS_TABLE

2005-06-01 Thread Øystein Grøvlen
MM == Mike Matrigali [EMAIL PROTECTED] writes: MM Note that cloudscape automatically reuses space from deleted rows when MM new rows are inserted into the table. The main problem MM SYSCS_COMPRESS_TABLE is solving is if there are a number of deletes MM which will not be followed

Re: Behaviour of SYSCS_COMPRESS_TABLE

2005-06-01 Thread Øystein Grøvlen
TW == The Wogster [EMAIL PROTECTED] writes: TW Øystein Grøvlen wrote: Is this also true for B-tree indexes? I would imagine that if you have a index on a monotocally increasing key (e.g., a timestamp) and where you regularly delete old records, there may be a lot of empty

Re: Behaviour of SYSCS_COMPRESS_TABLE

2005-06-02 Thread Øystein Grøvlen
MM == Mike Matrigali [EMAIL PROTECTED] writes: MM Derby will also reclaim space automatically in btree indexes for this MM case as long as all the old rows on a given leaf are deleted and MM the background process gets a chance to get a table level lock MM at some point - the

Re: Simple question about Derby and Transactions

2005-08-22 Thread Øystein Grøvlen
KK == Kostas Karadamoglou [EMAIL PROTECTED] writes: KK Hello, KK I am new to Derby and to Transactions in general. KK I want to perform some tasks to my databases using one thread and lock KK the table that it uses from the remaining threads. KK My qyestion is simple!

Re: Derby ClientDriver versus EmbeddedDriver 10.1.1.0 and a question about the Eclipse plugin

2005-08-23 Thread Øystein Grøvlen
PB == Piet Blok [EMAIL PROTECTED] writes: PB Hi, PB I noticed some different behaviour between Derby EmbeddedDriver and ClientDriver. This was a disappointment, because I wanted to develop a Derby application that may switch between the two drivers. PB Differences I noticed are:

Re: suppress connection %d message on console

2005-09-13 Thread Øystein Grøvlen
XV == Xavier Vigouroux [EMAIL PROTECTED] writes: XV hi, XV is there a way to remove the message on console indicating new XV connection to the server ? As far as I can see from the code, these messages will always go to System.out. Please file a JIRA issue if you want this

Re: suppress connection %d message on console

2005-09-14 Thread Øystein Grøvlen
KM == Kathey Marsden [EMAIL PROTECTED] writes: KM Øystein Grøvlen wrote: XV == Xavier Vigouroux [EMAIL PROTECTED] writes: XV hi, XV is there a way to remove the message on console indicating new XV connection to the server ? As far as I

Re: embeddedServer vs NetworkServer: any differences in terms of provileges

2005-09-21 Thread Øystein Grøvlen
XV == Xavier Vigouroux [EMAIL PROTECTED] writes: XV hi, XV I used to spawn a networkserver that I access through JDBC. XV I have to change my design to a Embedded Server. XV I have now a PriviledgeActionException (on client side) when opening XV socket to the server XV

Re: derby performance and 'order by'

2005-09-21 Thread Øystein Grøvlen
SAD == Suavi Ali Demir [EMAIL PROTECTED] writes: SAD Another little detail about optimization is that SAD Statement.setMaxRows() kind of functions on the JDBC side may SAD not be sufficient since it is called after SQL statement is SAD prepared and returned as an object (after

Re: Distributed databases

2005-09-22 Thread Øystein Grøvlen
JAC == James A Craig/O/VCU [EMAIL PROTECTED] writes: JAC Hi, I'm fairly new to Derby but I was curious if its possible JAC to use it in a distributed setup. I currently have a small JAC cluster and want to set it up so that I have a distributed JAC database on it using Derby. So

Re: Locks not released on error

2005-09-23 Thread Øystein Grøvlen
LC == Lars Clausen [EMAIL PROTECTED] writes: LC Hi! LC We're using Derby version 10.1 (Bundle-Version: 10.1.100.208786) LC embeddedly in our system. Even though I've put extensive rollback and LC statement closing handling in the code, we still occasionally see cases LC

Re: cant' get user defined function to work

2005-09-26 Thread Øystein Grøvlen
EB == Erik Bengtson [EMAIL PROTECTED] writes: EB Dan, EB That doesn't help. I already tried variations of the same function, using EB the same code. EB While using any java.lang.Math or other EB java.lang.Class.operation, derby was able to retrieve and run EB the

Re: transient priviledgeException

2005-10-04 Thread Øystein Grøvlen
XV == Xavier Vigouroux [EMAIL PROTECTED] writes: XV Hi, XV I have a transient priviledgeException when connection to the DB with XV ij. XV here is the scenario: XV 1/ I start an embeddedServer XV 2/ wait for the ping() be ok (tested in the JVM creating the server)

Re: transient priviledgeException

2005-10-10 Thread Øystein Grøvlen
XV == Xavier Vigouroux [EMAIL PROTECTED] writes: XV If I understand you, you propose to improve my call to ping with a XV loop on the creation (ie. url with create=true) of a *FAKE* schema XV until it succeeds. XV Then I have to delete all the associated files.

Re: How to update cardinality statistics

2005-10-19 Thread Øystein Grøvlen
MM == Mike Matrigali [EMAIL PROTECTED] writes: MM I 2nd Satheesh's query, it is useful to know why you care. Derby MM unlike most other database's automatically maintains histogram MM type information about the tables (this does require indexes to MM exist). This information is

Re: How to update cardinality statistics

2005-10-20 Thread Øystein Grøvlen
MM == Mike Matrigali [EMAIL PROTECTED] writes: MM Would need to see the exact documentation reference, but this is not MM the case. The storage system keeps an estimate of the number of MM rows in a table. For performance reasons this estimate is not exact MM (ie. we don't

Re: How to update cardinality statistics

2005-10-31 Thread Øystein Grøvlen
I did not get any replies to this email. It would be useful if someone could clarify whether the statistics are automatically updated or not. -- Øystein ØG == Øystein Grøvlen [EMAIL PROTECTED] writes: MM == Mike Matrigali [EMAIL PROTECTED] writes: MM Would need to see the exact

Re: I need some advice to choose database for an upcomming job

2005-11-01 Thread Øystein Grøvlen
BP == Bryan Pendleton [EMAIL PROTECTED] writes: A Guidelines section starts on slide 19. Slide 24 lists 100-500 updates per second -- but, of course, your actual performance will depend on the complexity of your transactions. BP Is there a simple way that I can observe

Re: What is wrong with this sql script , im sure that it is ok , but derby return error.

2006-01-03 Thread Øystein Grøvlen
LW == Legolas Woodland [EMAIL PROTECTED] writes: LW Hi LW Thank you for reading my post. LW can some one please check and see what is wrong with this scripts ? LW im sure that they should execute but derby return errors like : LW org.apache.derby.client.am.SqlException:

Re: [DERBY-39] An ON clause associated with a JOIN operator is not valid

2006-02-14 Thread Øystein Grøvlen
[EMAIL PROTECTED] wrote: Hi, This is issue DERBY-39, can someone give an opinion on this? It works in MSSQL and DB2 SELECT UNBOUND_P.PROJID FROM applicationidentity0.PERSONS THIS, applicationidentity0.PROJECTS UNBOUND_P WHERE EXISTS (SELECT 1 FROM applicationidentity0.PROJECT_MEMBER

Re: clustered index

2006-02-28 Thread Øystein Grøvlen
Thomas Vatter wrote: A clustered index should be the fastest access for retrieving ordered columns. 'Create index' command does not yet support it. Since ordering is my main problem at the moment I post this as request for enhancement. What do you mean by a clustered index? It usually means

Re: clustered index

2006-02-28 Thread Øystein Grøvlen
tom wrote: I mean an index that kept up to date on disk permanently. This is the definition that I know from the time I was using Informix Online. The syntax was 'create clustered index ...'. I don't mean to put it on the primary key as SQL-Server does, but having the possibility to create one

Re: ERROR 40XD1:container was opened in read-only mode

2006-03-25 Thread Øystein Grøvlen
is full. -- Øystein Grøvlen, Senior Staff Engineer Sun Microsystems, Database Technology Group Trondheim, Norway

Re: ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.

2006-04-21 Thread Øystein Grøvlen
Thomas J. Taylor wrote: Hi There, I have a Derby database that is giving me a read-only error (25502), and I don't know why. The database was working fine, up until about a month ago. Now, I cannot INSERT, UPDATE, or DELETE from the database - I always get ERROR 25502. I checked Windows

Re: JMX Extensions to Derby

2006-06-01 Thread Øystein Grøvlen
Sanket Sharma wrote: I would also appreciate your suggestions on features the community would like to see being implemented as JMX extensions. On the top of my head: - Performancs statistics (e.g., transactions committed/aborted per second) - Change dynamic properties (e.g.,

Re: GROUP_BY with user functions

2006-09-18 Thread Øystein Grøvlen
Robert Enyedi wrote: If I need to group the values returned by the MY_USER_FUNCTION, I simply cannot do so because the following query is invalid in Derby: SELECT MY_USER_FUNCTION(t1.field1) AS MY_VALUE FROM T1 GROUP BY MY_VALUE I have not tried this, but maybe something like this will

Re: GROUP_BY with user functions

2006-09-18 Thread Øystein Grøvlen
Robert Enyedi wrote: Thanks for the tip. I tried this, but it has the same problem with alias referencing. Sorry, I should have tried this first. Fernanda has given you the right solution. -- Øystein

Re: SQLSTATE: XSDG0Page Page(7,Container(0, 848)) could not be read from disk.

2006-10-12 Thread Øystein Grøvlen
David Sitsky wrote: Some causes in the past are: o DERBY-700 o DERBY-1838 o using durability=test mode o running on hardware that doesn't actually sync disk when asked o running separate jvm's on 2 machines accessing the same db across a networked file system. This is running on windows, we

Re: renaming columns

2006-12-29 Thread Øystein Grøvlen
Ralf Wiebicke wrote: Hi! I try to rename a column using the following statements: create table t (a int) rename column t.a to b The second statement throws an exception: [Error Code: 3, SQL State: 42X01] Syntax error: Encountered column at ine 1, column 8. Although this feature is

Re: Derby row locking semantic

2007-01-18 Thread Øystein Grøvlen
Alex Boisvert wrote: Hi, I stumbled upon an interesting locking behavior in Derby 10.2.2.0 http://10.2.2.0 yesterday and thought I'd post to the list to get a better understanding of what's happening under the covers. Assume a table with two indexes: create table MY_TABLE ( ID

Re: out of memory when writing blobs

2007-03-14 Thread Øystein Grøvlen
For tables with Blob or Clob columns, the default page size for the will be 32 kB. (Ref. http://db.apache.org/derby/docs/dev/tuning/ctunperf816059.html ) -- Øystein Anders Morken wrote: Anders Morken: [...] the page size (Seemed to be 32K in this case [...] Aha. Those 32 kilobyte pages

Re: Bug in Embedded Driver?

2007-03-31 Thread Øystein Grøvlen
Xavier Hanin wrote: con.createStatement().executeUpdate(create table Issue ( ID char(50) )); PreparedStatement st = con.prepareStatement(select count(*) from Issue where ? is null); st.setNull(1, Types.VARBINARY); I do not think that CHAR and VARBINARY

Re: Bug in Embedded Driver?

2007-03-31 Thread Øystein Grøvlen
Xavier Hanin wrote: On 3/31/07, *Øystein Grøvlen* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Xavier Hanin wrote: con.createStatement().executeUpdate(create table Issue ( ID char(50) )); PreparedStatement st = con.prepareStatement(select

Re: [n00b] Recovering from program crashes

2007-04-02 Thread Øystein Grøvlen
John C. Turnbull wrote: I have just started to use Derby for configuration data for an application and have found that whenever the app terminates unexpectedly then Derby will not start the next time I start the application as it complains that it’s already been opened. At the moment, I need

Re: Can I pass an array to a stored procedure?

2007-04-02 Thread Øystein Grøvlen
Brown, Andrew W (Rosetta) wrote: After reading through the documentation it doesn't seem like passing an array to a stored procedure is possible: Derby does not support the SQL ARRAY type. So it will not be possible to pass arrays as stored procedures. -- Øystein

Re: Derby select query speed questions

2007-04-14 Thread Øystein Grøvlen
Adam Bovill wrote: Hi Olav, Thanks. That seems to have improved things. I was wondering whether or not there was a way to create one PreparedStatement from another. I have the first one that I've created and would like to clone or duplicate this, w/o needing to recompile it. So when

Re: ERROR XSAI2: The conglomerate requested does not exist.

2007-05-14 Thread Øystein Grøvlen
I observed this error a few times during some experiments I did some time ago. See DERBY-637. Not the same setting, though. Client/server, 30 GB database. When this started to occur, all my transaction fail with this error. Restarting the database, made the error disappear. -- Øystein

Re: SQLTransientConnectionException with BLOB reads

2007-08-18 Thread Øystein Grøvlen
Arthur Blake wrote: Hello, I have been using Apache Derby 10.2.2.0 for a few months, and it has been working quite well for me. I upgrade to 10.3.1.4 just after the release came out, and I have been testing it out with my application. It seems to work fine, except when I read some BLOB

Re: SQLTransientConnectionException with BLOB reads

2007-08-18 Thread Øystein Grøvlen
Arthur Blake wrote: Yes, that was the problem. If I change my code to keep the Connection open after I have a Blob in hand, and then read the Blob it works. It appears that also the ResultSet and PreparedStatement I used to fetch the Blob must also remain open until I'm done reading the

Re: [ANNOUNCE] Apache Derby 10.3.1.4 released

2007-08-24 Thread Øystein Grøvlen
Rahul Dwivedi wrote: Are there any plans for implementing such a feature where lob locators are stored in tables and LOB are stored some where else, or such similar functionality to enhance performance with multiple lobs in single table. I do not think that anyone has so far indicated that

Re: SYSCS_GET_DATABASE_PROPERTY not working?

2007-09-13 Thread Øystein Grøvlen
David Van Couvering wrote: OK, fair enough. So, how *do* I find out what derby.system.home is set to?? I would think it is the same way as with any Java System property (Kathey implicity told you that): System.getProperty(derby.system.home); I have not tried it, but it is possible

Re: Why need JDBC driver?

2007-09-13 Thread Øystein Grøvlen
jiangshachina wrote: Hello, The question may be so stupid, but I really have some puzzles. Generally, JDBC is the connector between Java application and RDBMSs. But I think that's because the RDBMSs aren't written by Java, then we need the middleware. Now that, Derby is pure Java application,

Re: Hibernate: table/view does not exist

2007-09-27 Thread Øystein Grøvlen
Mathias Conradt wrote: Thanks for the hint, the schema is app. It seems that when I use ij (EmbeddedMode) to connect to jdbc:derby:realty;(create=true) and use hibernate, it creates/connects the database in two different physical location. When I use ij, the database folder is created

Re: Problem with valueSpecification() grammar rule

2007-10-28 Thread Øystein Grøvlen
Dhananjay Muli wrote: Hello, I am facing problem with a query in postgresql having following condition in where clause bullyear=(acadyear-year+1) where acadyear, bullyear and year are columns of table. The existing sqlgrammar.jj file has a problem parsing the 'year' token occurence

Re: having a problem with not in

2007-10-29 Thread Øystein Grøvlen
Jørgen Løland wrote: tyoup wrote: i'm having problems with the following query select a,b,c from ta where (b,c) not in (select bb,cc from tb where dd = 3) wich won't work in derby how can i work this around ? Hi Tyoup If I remember correctly, IN clauses can only take handle one

Re: Network protocol error in prepareStatement()

2007-11-12 Thread Øystein Grøvlen
Daniel Noll wrote: Hi all. I'm getting this unusual exception during prepareStatement(): Caused by: org.apache.derby.client.am.DisconnectException: A network protocol error was encountered and the connection has been terminated: the requested command encountered an unarchitected and

Re: Newbie Blues : Unable to connect to derby database using JDBC

2007-11-15 Thread Øystein Grøvlen
Aneez, Can you provide the call stack for the exception you get? -- Øystein Aneez Backer wrote: Hi Am trying to connect to derby database, but have not been successful. I have created a database called 24k , and have also populated the tables Here's the code:

Re: Failed to start database

2008-01-05 Thread Øystein Grøvlen
tom_ wrote: I have tried with the latest bits/trunk, here the problem is an exception upgrade from 10.3 to 10.4 is not supported. Have you followed my advice about setting the derby.database.allowPreReleaseUpgrade property? -- Øystein

Re: Iterating through large result set in network mode causes OutOfMemoryException

2008-02-11 Thread Øystein Grøvlen
Briggs wrote: Well, unfortunately, freeing the Blob didn't work, the app still runs out of memory. The app? Your first posting indicated that the server ran out of memory. Also, the occasional commit is also causing a problem. I end up eventually getting this: java.sql.SQLException: The

Re: using SELECT as an SQL triggered action

2008-02-12 Thread Øystein Grøvlen
musky wrote: i will make my aim more clearer here: i have created an AFTER insert trigger on a table called chattable which has two fields(ID INT,Message VARCHAR(255)).here is the trigger: CREATE TRIGGER insert_trigger AFTER INSERT ON chattable REFERENCING NEW_TABLE AS chattableupdate FOR EACH

Re: using SELECT as an SQL triggered action

2008-02-12 Thread Øystein Grøvlen
Øystein Grøvlen wrote: I do not think doing a select in a trigger does not make sense. Sorry, to many negations here. I mean of course that doing a select in a trigger does not make sense. JDBC does not provide you with any way to get hold of the result set. From your description, I think

Re: Derby, identity columns locks on syscolumns

2008-03-03 Thread Øystein Grøvlen
Andrew Lawrenson wrote: I've done some more experimentation testing. At the moment, when syscolumns is updated, if a sub-transction is done, the update is done with an expicit no-wait on locks. I've tried changing this so that it will use the same wait policy as the parent transaction - when

Re: Re-using an existing db and archiving data

2008-03-17 Thread Øystein Grøvlen
Mark Hiles wrote: I've just started using Derby for a uni project and have a couple of quick questions. When creating an embedded database, it seems to get overridden each time I run my application. How can I make it create a database the first time it runs, and then re-use it in the future?

Re: Re-using an existing db and archiving data

2008-03-17 Thread Øystein Grøvlen
Mark Hiles wrote: I've been using create=true and it just keeps overriding the existing db.. Someone mentioned to me that it might have something to do with the fact that I'm running an embedded version.. I'm not sure why that would matter but could that be it? What do you mean by

Re: limit, offset and random

2008-04-09 Thread Øystein Grøvlen
unludo wrote: OK thanks a lot for your answers. Regarding the 'ORDER BY RANDOM()', you also plan to have something similar? ORDER BY RANDOM() already works for me. Example: ij select i from t where i 5; I --- 1 2 3 4 4 rows selected ij select i from t where i 5 order by random();

Re: A network protocol error was encountered and the connection has been terminated

2008-04-10 Thread Øystein Grøvlen
Vic Ricker wrote: Sorry about that. I added something to dump follow getNextException() and getCause(). I got the following exception from getCause(), I believe. I don't think getNextException() returned anything. org.apache.derby.client.am.DisconnectException: A network protocol error

Re: Derby get-together at Java One

2008-04-14 Thread Øystein Grøvlen
Rick Hillegas wrote: A number of Derby people have expressed interest in getting together the week of Java One. I'm thinking that people may be busy attending sessions during Java One itself, so it might be better to meet the first day before the Java One sessions start. That would be the

Re: Null Pointer ? any idea how to solve

2008-04-15 Thread Øystein Grøvlen
Templexp Tan wrote: Hi, There are some problem like the following: java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: java.lang.NullPointerException#20;#20;XJ001.U at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at

Re: Database connection not bound to default database schema when authenticating through LDAP?

2008-06-06 Thread Øystein Grøvlen
Andreas Kyrmegalos wrote: Hello again, I don't know what to make of this. I blame it to the late hour though. After successfully authenticating user usertest through LDAP to establish a connection , I get this message ERROR 42Y07: Schema 'usertest' does not exist when executing a

Re: ShutdownException when I haven't asked the database to shut down

2008-06-06 Thread Øystein Grøvlen
Daniel Noll wrote: Hi all. I'm getting a load of errors like this. They seem to happen at random times; sometimes I see it when creating a statement, sometimes when executing, sometimes when iterating over a result set. Once I even had it happen when creating the connection itself, which is

Re: Speed of using Derby DB

2008-06-11 Thread Øystein Grøvlen
vodarus vodarus wrote: it takes up to 12 seconds to calculate TESTTOTALS. Oracle PL/SQL procedure with the same algorithm need 1,5 second. *How can i improve performance? Or Derby is so slow because of Java / JVM issues???* Thanks. I do not have any experience with performance of stored

Re: Speed of using Derby DB

2008-06-11 Thread Øystein Grøvlen
And what tools can you use to analyse big amount of relation-data? SQL can not be used in many cases. So people usually use stored procedures in RDBMS - PL/SQL in Oracle. I have idea: replase Oracle with Java application. And that Java application have RDBMS inside (like Derby in Embedded

Re: Speed of using Derby DB

2008-06-11 Thread Øystein Grøvlen
vodarus vodarus wrote: I thought tt using stored procedure will avoid transferring data from DataEngine to Application. That cost is very little when using embedded where both are executing in the same VM. Using Java + Oracle will be slower than usage of PL/SQL code. But Java + Oracle

Re: Seg file not updating?

2008-08-13 Thread Øystein Grøvlen
Curry, David CIV NAVAIR 41K300D wrote: Vista, NetBeans 6.0, using embedded Derby driver. I have 2 apps that share a database. admin.jar is the admin app, demo.jar is a simple client that cannot change data in the database. Both apps are in the same folder, along with the database folder.

Re: Cant update my database anymore

2008-10-13 Thread Øystein Grøvlen
Jamel Meslamani wrote: Dear all, I am using Derby10..3 with a chemical program JChem to update my database. But now, I am facing this problem when I try to add more structures. Error that I get is : ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.

Re: performance issue

2008-10-16 Thread Øystein Grøvlen
Jonas Ahlinder wrote: The benchmark client is single-threaded atm. To run it multi-threaded some sort of locking will most likely have ot me implemented ( which will be done as soon as we can confirmt he performance is ok ). I have tried running more threads, and it does seem to give better

Re: Record not found in some SQL - Bug?

2009-01-28 Thread Øystein Grøvlen
Have you tried to run the Derby consistency checker? (See http://wiki.apache.org/db-derby/DatabaseConsistencyCheck). Maybe that could give some clue about what is wrong. -- Øystein jrgchip wrote: I have reported the problem as https://issues.apache.org/jira/browse/DERBY-4032. The problem is

Re: Automatic database and schema creation

2005-04-22 Thread Øystein Grøvlen - Sun Norway
Peter Nabbefeld wrote: Hello, I just want to create a database, if it does not yet exist. Database creation works, schema creation does not. I'm using the following syntax (in Java): Statement stmt = con.createStatement(); stmt.execute(CREATE SCHEMA USER); The result is an SQLException