Re: [h2] What version to pick for production

2016-06-08 Thread Ryan How
Stability seems good to me. I sometimes get MS SQL and MySQL database corruptions either from power outages or OOM. I think you've done an insanely awesome job putting H2 together Thomas. Other more "Mainstream" products seem to get more hype and attention, but I don't think that makes them

Re: [h2] Semi-Unique String column

2016-05-03 Thread Ryan How
Hi, Can you try a unique constraint instead? See here http://osdir.com/ml/h2-database/2012-03/msg00141.html Ryan On 3/05/2016 10:36 PM, sd23gl via H2 Database wrote: Hello, I do save usernames in a VARCHAR_IGNORECASE column. However the user can stay anonymous until a username is picked.

Re: [h2] mail flow analytics for a company

2016-04-20 Thread Ryan How
Hi, You could make it work with that, but it would depend massively on how you architect your system. You won't just be able to put the records in a database and then query it with any kind of scalability and performance expectations. Ryan On 20/04/2016 10:12 PM, Valentin Popov wrote:

Re: [h2] h2 Database backup and restore while database is opned using hibernate ORM

2016-04-03 Thread Ryan How
You aren't executing the query, only creating it? |session.createSQLQuery("BACKUP TO '"+file.getCanonicalPath()+"'").executeUpdate();| On 4/04/2016 4:55 AM, abdou amer wrote: |I want to perform backup and restore using hibernate ORM, but i seems that the below code not do any thing.|

Re: [h2] Unique index or primary key violation in version 1.4.191

2016-02-17 Thread Ryan How
I've been using MVCC with PageStore for years. LOBS don't work very well (but I didn't want them in the db anyway, so we don't use LOBS). Haven't had any issues with anything else though. Doesn't mean bugs don't exist though. You only get the issue with MVCC on though hey? On 17/02/2016 1:18

Re: [h2] how can i delete all .db files when i uniinstall my java application

2016-01-19 Thread Ryan How
That would be the job of the uninstaller. eg. If they are all in a single directory then delete that directory. So I'd look up the documentation for the installer / uninstaller. On 19/01/2016 11:15 PM, AKHIL KOTTAKKAL AKHIL wrote: how can i delete all .db files when i uniinstall my java

Re: [h2] HAVING without GROUP BY

2015-10-27 Thread Ryan How
That's so good I just wanted to see it by itself and repeat it to everyone! :D On 27/10/2015 4:28 PM, Lukas Eder wrote: As far as I'm concerned, nothing beats a good glass of red wine whilst reading the SQL standard documents in front of the fireplace. Somehow, few people are with me on that

Re: [h2] Re: SQL synthax error

2015-10-15 Thread Ryan How
You need to create the Kunde table before the |RESERVIERUNG table. Otherwise it can't create the foreign key (because the table doesn't exist). | On 15/10/2015 6:04 PM, Steve McLeod wrote: Two things I can suggest: 1) You should ask this question on stackoverflow.com, not in this mailing

Re: [h2] Multiple independent H2 databases within one JVM

2015-07-04 Thread Ryan How
I'd be inclined to have a connection pool per session. Then create and destroy the connection pool. That way it will manage connections however you want to use them and you don't have to keep a control connection open on the database. But there are so many ways to do it!. It always confuses

Re: [h2] Multiple independent H2 databases within one JVM

2015-07-01 Thread Ryan How
Yep no probs at all. You can have multiple databases open at the same time and open and close them on different threads as you like. You'll just need to do the appropriate connection handling linked to the session open / close. Scaling is going to depend on your application architecture too.

Re: [h2] out of memory with big db

2015-06-01 Thread Ryan How
Maybe you are better off with a different database for each book, and open and close them 1 at a time? It really depends on your application... On 1/06/2015 9:23 PM, naseh wrote: version 1.4.187 i have designed the DB to have a table for every book. maybe it is not a good design but it is

Re: [h2] MVCC + Multithreaded

2015-05-08 Thread Ryan How
Isn't a bit unnerving if any client can actually corrupt the database?. I thought it is the servers job to keep the database safe? On 8/05/2015 7:10 PM, Rami Ojares wrote: Hold your horses! I found one more client that accesses the database with version 186. I had forgotten all about it. It

Re: [h2] Re: Backup mvcc+multithreaded

2015-05-07 Thread Ryan How
I think you have to turn off the space re-using or something like that while running the backup? Maybe that should happen automatically as part of the script tool? On 8/05/2015 7:48 AM, Rami Ojares wrote: I tested it out and it seems that the backup becomes completely corrupted. So one

Re: [h2] Backup mvcc+multithreaded

2015-05-07 Thread Ryan How
when doing a backup? Either this, or use the backup SQL statement. With the MVStore storage, this should work very well. With the PageStore, it should also work, but I didn't test as much. Regards, Thomas On Friday, May 8, 2015, Ryan How r...@bitworks.com.au mailto:r...@bitworks.com.au

Re: [h2] file corrupted

2015-03-04 Thread Ryan How
Heya, What's your connection string? On 5/03/2015 8:16 AM, Bashorun Olajide wrote: i am new to H2, i just started 2 days ago after reading about javafx. i got an error while trying to retrieve record in a database. i dont even know maybe successfully connection established. i got this error

Re: [h2] Is it safe and reasonable to open a read-only database in embedded mode from two processes without locking?

2015-02-28 Thread Ryan How
I'll let someone more qualified give you a better answer. But, yes I can't see any reason why it wouldn't work (The same as if it was on a read only filesystem?) I find embedded mode has better performance, but it is more profound in lots of smaller queries. If it is larger less frequent

Re: [h2] Is it safe and reasonable to open a read-only database in embedded mode from two processes without locking?

2015-02-28 Thread Ryan How
and without locking, while the first process opens it r/w and creates a lock file and would they interfere with each other? On 28 February 2015 at 17:43, Ryan How r...@bitworks.com.au mailto:r...@bitworks.com.au wrote: I'll let someone more qualified give you a better answer. But, yes

Re: [h2] TRANSACTION_READ_UNCOMMITTED Transaction isolation in H2

2015-02-27 Thread Ryan How
I think with the MVStore it only works with READ_COMMITTED. Other isolation levels don't work. If you use the page store it should work (or the latest stable version). On 28/02/2015 10:25 AM, Sachin Patil wrote: Hello there, I am trying use H2 database(1.4.185) in junit environment and

Re: [h2] 1.4.x stability

2015-02-17 Thread Ryan How
I use it on the 1.3 branch in production. It was considered experimental in 1.3. There are issues with blobs, I can't remember what it is, but we ended up not using them. Apart from that we've had no issues in production over the past 2 years with MVCC. It may have been blobs and FOR

Re: [h2] Could data corruption being caused by non-accurate .lock.db information ?

2015-01-23 Thread Ryan How
Just out of interest, something like an Access database works out of the box on windows (I've never seen any glaring corruption issues, they corrupt easily, but not as easily as a bug like this would indicate). I wonder if it works around it? I'm sure older versions like Access 2003 are

Re: [h2] does LIMIT improve performane

2015-01-04 Thread Ryan How
Hi, I don't know how it is actually implemented, but conceptually It depends on your query. If you do an order by and limit, it'll need to sort it all first before pulling the first record. So it isn't going to shortcut the query at all. The limit will improve performance because it only

Re: [h2] Backup.zip not immediately available

2014-12-10 Thread Ryan How
I've had similar issues with anti-viruses locking the file while it unzips it and scans it... On 10/12/2014 1:03 AM, Thomas Mueller wrote: Hi, Could you describe what you do exactly (how you create the backup, how you copy it)? How do you know the file is not available? Regards, Thomas

Re: [h2] H2DB select performance issue :(

2014-09-19 Thread Ryan How
Is it CPU bound or disk bound during that 90 seconds when the query is running? You can try increasing JVM memory? The the slow query the same as all the others?. perhaps it isn't using an index for that query? You really need to try and find out what is going on, or get it running in a

Re: [h2] Is 60 write operations/sec really the limit for H2?

2014-09-11 Thread Ryan How
I think it means that is why it doesn't sync for every commit, so it can get higher performance than that. If it syncs for every commit, then if you are committing each row and doing a lot of updates for example, then you get bad performance. Probably wouldn't matter much for an SSD, but on a

Re: [h2] H2 db getting corrupt on mac

2014-09-06 Thread Ryan How
Pretty sure he is using the backup command. Here's the code: String sqlStatement = BACKUP TO ?; try (Connection connection = getConnection()) { try (PreparedStatement preparedStatement =

Re: [h2] H2 db getting corrupt on mac

2014-09-03 Thread Ryan How
I have an application that uses BACKUP to copy the database to tablets for offline use. It fails and produces a corrupt database about once a year. It probably does 3000 or so copies a year. But like you, I'm not sure if it is in the backup code or the copy code and I can't reproduce it in a

Re: [h2] H2 db getting corrupt on mac

2014-09-02 Thread Ryan How
It isn't safe to backup the file that way. You need to use the inbuilt backup command if the database is in use. http://h2database.com/html/grammar.html#backup http://h2database.com/javadoc/org/h2/tools/Backup.html On 3/09/2014 6:27 AM, Kam wrote: I don't know what's causing it. We have a

Re: [h2] Reduce space usage with repeated strings column values

2014-07-08 Thread Ryan How
I thought it did this already? It just saves the string once and uses the hash or something? I can't find it, but I thought I read such a thing in my years or forum browsing on here... It was like an internal de-duplication that happened by default. Maybe I was dreaming... Ryan On

Re: [h2] mvcc, long-running insert from csv

2014-05-27 Thread Ryan How
H2 is not multi-threaded in this version. So a single long running statement will block everything else. You'll either need to split it up into smaller inserts (can still be a single transaction, just smaller queries), or you could try turning on MULTI_THREADED=1. There is multi-threaded

Re: [h2] Release 1.4.178 Beta

2014-05-04 Thread Ryan How
The 2nd digit incremented aswell from 1.3 to 1.4 On 4/05/2014 1:52 PM, Lukas Eder wrote: Am Samstag, 3. Mai 2014 14:10:11 UTC+2 schrieb Noel Grandin: On Sat, May 3, 2014 at 12:46 PM, Lukas Eder lukas...@gmail.com javascript: wrote: What does Beta mean when upgrading to any

Re: [h2] FILE_WRITE function needed to export BLOB and CLOB from H2 to filesystem (opposite to FILE_READ function)

2014-04-24 Thread Ryan How
Yeah hash comparison on writes is a bit of overkill. If you can't rely on what is written to disk to actually be written to disk we are all in major trouble! Also, java handles exceptions for permissions, out of disk space, etc, pretty well. just try, catch with appropriate handling as per

Re: [h2] Re: ODBC Error

2014-04-22 Thread Ryan How
Hi, I'd try using the latest 1.3 version. I've had it working from Access and Excel for quite some time, but I don't use it regularly. Ryan On 23/04/2014 3:56 AM, Sylvain Nault wrote: I can see the Support for the PG_CATALOG is part of the version 1.4.x roadmap. Will it work with the MS

Re: [h2] Re: insertion after drop is much slower than insertion in a new Table

2014-04-08 Thread Ryan How
Hi, I was just reading your previous posts. It may be possible you are filling up your disk buffers after so many writes, so it is quite fast, then slows down while the OS flushes to disk. So you probably find it is fast up to a point, then slows right down after then. So if you try with

Re: [h2] Re: H2 Database Corruption Issues

2014-04-04 Thread Ryan How
I'm really not sure sorry. I wouldn't think it would cause an issue if it doesn't OOM. Even in the event of OOM or power outage, process killed, etc, it still should be fairly safe. Can you post about your environment, JVM version, OS, JVM startup params etc? Do you access files on a network

Re: [h2] Re: H2 Database Corruption Issues

2014-04-03 Thread Ryan How
Just another note, you aren't getting Out of Memory Errors are you?. The docs say the Soft LRU cache is experimental and has been known to cause OOM? On 3/04/2014 10:29 PM, Steve McLeod wrote: Hi David, I use H2 as an embedded database in desktop software with a substantial user base. I

Re: [h2] H2 Web Client problem

2014-03-29 Thread Ryan How
You need to enter a jdbc url, not the file path. eg. jdbc:h2:file:c:\path\to\my\db Check the docs for valid URLs for h2. On 29/03/2014 1:42 PM, Axel wrote: Hiya my name is Alex. I am attempting to connect to a local DB but I get a error No suitable driver found and a java error. I have

Re: [h2] strange state db

2014-03-07 Thread Ryan How
Hi, I'm not sure multithreaded is 100% safe yet. I wonder if it was caused by an issue with that. On 7/03/2014 2:06 PM, Alex wrote: hi db 1.3.172 FILE_LOCK=FS;PAGE_SIZE=1024;CACHE_SIZE=400072;MULTI_THREADED=TRUE;DATABASE_TO_UPPER=FALSE i guess, some unclear way unique index has been

Re: [h2] Re: Console or Shell: Run a query from a script file and capture output

2014-02-17 Thread Ryan How
If it is a small script you can copy paste the script in I think. If you want to run from a file then issue the RUNSCRIPT sql command. If it is on a server, the script needs to be accessible on the server and use a path as it would be on the server.

Re: [h2] Missing lob entry

2014-02-15 Thread Ryan How
What connection string are you using? LOBs and MVCC are a bit stuffed... On 15/02/2014 2:08 AM, Darren S wrote: I seemed to hit the error Missing lob entry quite frequently for my particular application. I was wondering if there are some settings I should enable, or some information I can

Re: [h2] Hardware recommendations for H2 database ?

2014-01-29 Thread Ryan How
Yeah it doesn't actually affect my use cases, as long as there are no corruptions I'm happy. If I wanted to make sure everything is written to disk straight away I'd probably manually make a kernel call to flush system and disk caches and need to test it on each platform. Some RAID

Re: [h2] H2 startup error

2014-01-29 Thread Ryan How
Hi, What args are you actually putting into svrArgs? Perhaps on that machine svrArgs is incorrect? On 30/01/2014 7:18 AM, Subhash Agrawal wrote: Hi All, We are using H2 database in embedded mode and use Server.createTcpServer(svrArgs).start() to get instance of h2 server. It works fine

Re: [h2] H2 startup error

2014-01-29 Thread Ryan How
on this? On Wed, Jan 29, 2014 at 4:55 PM, Ryan How r...@exemail.com.au mailto:r...@exemail.com.au wrote: Hi, What args are you actually putting into svrArgs? Perhaps on that machine svrArgs is incorrect? On 30/01/2014 7:18 AM, Subhash Agrawal wrote: Hi All, We are using H2

Re: [h2] Clarification on h2.lobInDatabase deprecation

2014-01-27 Thread Ryan How
On 28/01/2014 3:41 AM, forkj...@gmail.com wrote: # Storing the content yourself on the filesystem and link the content to a path column on a database table? I do the latter in my project. But you lose any transactional consistency unless you create a complex mechanism. So I'm sure I have a

Re: [h2] Re: Hardware recommendations for H2 database ?

2014-01-16 Thread Ryan How
On 17/01/2014 3:29 AM, Thomas Mueller wrote: Hi, from my experience I can propose to use SSDs for the storage. Yes, that's a very good point. SSDs are much faster, specially for reading, and for writing larger blocks. SSD has much better random read and write, which is awesome for

Re: [h2] Re: Putting the H2 database file on a Java NIO2 based, custom filesystem.

2014-01-13 Thread Ryan How
I think Thomas would know this. But my gut feeling is no. I think it uses Java 6, so I can't imagine it using the Java 7 APIs. But it does have pluggable filesystems, so you could probably write your own Java 7 NIO2 plugin, then use the java 7 filesystems under that. But I have no

Re: [h2] Only show changes in GROUP BY

2014-01-11 Thread Ryan How
If the timestamps are unique you could try including a subquery which gets the next lowest date eg. (not sure if this is valid SQL syntax, I'm not meant to be on the PC :) Select data, datetimefield, (select top 1 datetimefield from table1 where datetimefield A.datetimefield order by

Re: [h2] Only show changes in GROUP BY

2014-01-10 Thread Ryan How
Wouldn't you usually do that in your reporting software? Or on any layer on top of the database? In MS Access I've done it using a custom function which stores the last value and then only outputs the next value if it is different. Not sure how to do that in H2 ? Probably via a custom

Re: [h2] Exception when using MULTI_THREADED=1

2014-01-02 Thread Ryan How
I've been using it in a production environment for several years without issue. But it isn't very high concurrency, so I've probably just been lucky that it hasn't had issues. On 2/01/2014 4:39 PM, Uli wrote: Hi Noel, what a pity! Thanks for digging into the synching problems! It sounds to

Re: [h2] H2 to create, serialize, distribute, and deserialize a sub-database?

2014-01-02 Thread Ryan How
On 2/01/2014 6:40 PM, Thomas Mueller wrote: Would be nice if there was some java in-memory file abstraction I don't understand, you can already use the file system abstraction of H2. You can also use databases that persist to an in-memory file system, using the database URL

Re: [h2] H2 to create, serialize, distribute, and deserialize a sub-database?

2014-01-02 Thread Ryan How
[] script = IOUtils.readBytesAndClose(in, -1); System.out.println(new String(script, UTF-8)); } } Or you can just run script and process the result set. Regards, Thomas On Thu, Jan 2, 2014 at 12:14 PM, Ryan How r...@exemail.com.au mailto:r...@exemail.com.au wrote: On 2/01/2014

Re: [h2] H2 to create, serialize, distribute, and deserialize a sub-database?

2014-01-02 Thread Ryan How
On Thu, Jan 2, 2014 at 12:14 PM, Ryan How rh...@exemail.com.au javascript: wrote: On 2/01/2014 6:40 PM, Thomas Mueller wrote: Would be nice if there was some java in-memory file abstraction I don't understand, you can already use the file system abstraction

Re: [h2] H2 to create, serialize, distribute, and deserialize a sub-database?

2014-01-01 Thread Ryan How
On 2/01/2014 12:43 PM, Rob Oaks wrote: Thank you both for your assistance. Ryan, it’s comforting to know that someone has accomplished something similar, which inclines me to go ahead and build a prototype. I have just a couple more questions: 1. I would prefer to avoid

Re: [h2] jdbc:h2:mem: threadsafe?

2013-12-30 Thread Ryan How
It will be 2. and the second create table will fail because the table already exists. But I don't see how that has anything to do with being thread safe? The in memory database is per process, so all threads access the same database. If you want a separate database per thread then give the

Re: [h2] Very slow / read-only exception when connecting to a database the first time after moving it

2013-12-10 Thread Ryan How
Are you possibly copying the database while it is still open on system A? On 11/12/2013 12:47 AM, Johann Petrak wrote: I created a database (two files) on system A, then moved the files to system B and when I want to connect to that DB on system B, the first time just establishing the

Re: [h2] using H2 with JOOQ

2013-12-08 Thread Ryan How
I use it with H2 every day. Works great. You are quite possibly pointing to an empty database as suggested... Here is my jooq.xml file I use to generate the classes. Note that because the h2 database path is relative, I need to have the working directory set correctly. ?xml version=1.0

Re: [h2] remove database??help me

2013-12-02 Thread Ryan How
Are you using an in memory database? They don't persist so will be blank each time you open it. On 3/12/2013 11:29 AM, ??? wrote: Do not know why.. 11:17:41,719 INFO ~ Connected to jdbc:h2:tcp://10.1.1.222/~/test;CACHE_SIZE=131 072;CACHE_TYPE=SOFT_LRU;WRITE_DELAY=2000 11:17:41,747 INFO

Re: [h2] A big file or many small files?

2013-12-02 Thread Ryan How
Not sure if I would choose H2 for a 2TB database. I don't think it has been tested too well with databases of that size. It would probably need a lot of RAM. I'd be inclined to try smaller files rather than a single 2TB file. For instance backing up, or recovery of corrupt databases will be

Re: [h2] remove database??help me

2013-12-02 Thread Ryan How
No idea. Must be an issue in your config. Try opening another connection to your DB from the H2 console and see what happens to the tables. On 3/12/2013 1:32 PM, 董藝興 wrote: NO,i setting file application.conf is connection http://www.h2database.com/html/features.html#embedded_databases database

Re: [h2] Questions about MVCC

2013-11-24 Thread Ryan How
This is interesting :) Does MVCC even support different isolation modes?. I thought it was it's own isolation mode? The different isolation modes don't seem to make sense in an MVCC context? Thanks, Ryan On 24/11/2013 11:50 PM, cowwoc wrote: Hi Thomas, It was my understanding that

Re: [h2] Move database files after shutdown

2013-11-11 Thread Ryan How
possible case and get that working first. I have had other problems with deleting files from java on windows 7. - mike On Mon, Nov 11, 2013 at 5:16 AM, Ryan How r...@exemail.com.au mailto:r...@exemail.com.au wrote: The database will close when all connections to it are closed. So you

Re: [h2] Move database files after shutdown

2013-11-10 Thread Ryan How
The database will close when all connections to it are closed. So you must still have some connections open (Are you using a connection pool??) Also see http://h2database.com/html/grammar.html#set_db_close_delay Is there still the lock file present?. If that is still present then there is an

Re: [h2] Re: updates much slower than inserts

2013-10-29 Thread Ryan How
No Worries :). If you run Explain Analyze update tre_combinedtestday set compoundpercent=-13.373487168551002, totalpercent=-5.466540999057416, dollaramount=0.9453345900094259 where id=230827 what do you get? On 29/10/2013 2:12 PM, TrendTimer.com wrote: Kartweel, I forgot to say thanks for

Re: [h2] Re: updates much slower than inserts

2013-10-29 Thread Ryan How
Have you got an index on the ID column?, it doesn't appear to be using an index. Usually you would have ID as the primary key which would create an index... On 29/10/2013 3:17 PM, TrendTimer.com wrote: Explain Analyze update tre_combinedtestday set compoundpercent=-13.373487168551002,

Re: [h2] org.h2.tools.XXXX NOT FOUND!

2013-10-24 Thread Ryan How
Can you type in the dir command and show the directory listing, then the java -cp h2*.jar etc command and copy paste the output here?. On 24/10/2013 5:58 PM, sheing3003 wrote: Hello All, When I tried to do jave -cp h2*.jar org.h2.tools.Server (or any others like Shell), windows command

Re: [h2] org.h2.tools.XXXX NOT FOUND!

2013-10-24 Thread Ryan How
I you can paste the entire output and directory listing, I'm not sure what you are doing. It seems like a basic java classpath issue. Nothing H2 related. On 25/10/2013 12:17 AM, sheing3003 wrote: Could not find the main class: org.h2.tools.Server in

Re: [h2] threads and where .. in queries

2013-10-07 Thread Ryan How
I quite often use a huge IN clause as a quick way to combine lots of small queries. I'm fairly sure it uses the index (although I must admit I haven't checked). But it usually speeds up the queries considerably. Much faster than lots of small queries. Even in embedded mode for me. On

Re: [h2] Re: Known issues with large databases

2013-09-18 Thread Ryan How
The larger the database the more RAM you need generally. It depends what you mean by large. I have databases of a few GB that run without very high memory usage, but if you start running large transactions it requires more memory. So it is probably more how you use the database rather than

Re: [h2] strategies for large transactions

2013-09-11 Thread Ryan How
. Regards, Thomas On Tue, Sep 10, 2013 at 10:51 AM, Ryan How rh...@exemail.com.au wrote: Howcome it is getting OOM on import? It shouldn't do that should it? I've imported several GB of data before, I did

Re: [h2] strategies for large transactions

2013-09-10 Thread Ryan How
Howcome it is getting OOM on import? It shouldn't do that should it? I've imported several GB of data before, I did get OOM, but increasing heap size to around 1GB worked for me. I didn't need to go to crazy sizes... On 10/09/2013 4:32 PM, Noel Grandin wrote: On 2013-09-06 20:15, Brian Craft

Re: [h2] Data loss with H2 HA / Clustered Mode

2013-09-06 Thread Ryan How
On 6/09/2013 11:48 PM, Daniel Stone wrote: We did also experience many problems with a “missing lob” error which actually triggered the cluster issue in the first place. We have managed to work around this but is this still a bug with H2 (I have seen this problem mentioned on the web)?

Re: [h2] Corrupted H2 Database

2013-09-04 Thread Ryan How
It sounds like your configuration is corrupted. It cannot find the H2 driver. Just make sure you still have the H2 driver on the classpath. On 4/09/2013 9:47 PM, James Ball wrote: I have been using Jubula to programme test cases and during the middle of one Jubula froze and would not respond.

Re: [h2] How to query whether a table exists?

2013-08-21 Thread Ryan How
works for me. you want IS NOT NULL, IS NULL instead of = null This is what I did SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'FILE_RESOURCE' SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'FILE_RESOURCE';

Re: [h2] H2 database and connection pool

2013-08-13 Thread Ryan How
Sounds like you're on the right path. It's usually good practice to have a connection per thread. A H2 connection is thread safe, but I don't think that is the case for all DBs. But anyway, a connection per thread is better, because then if you turn on multithreaded mode for H2 you will get

Re: [h2] Re: Version for production use?

2013-07-21 Thread Ryan How
On 21/07/2013 1:03 AM, Thomas Mueller wrote: But still, there is a risk. This was one reason for me to start working on the new storage engine MVStore: to reduce the risk of corruption (the MVStore is quite a bit simpler than the current, traditional storage engine). It is still work in

Re: [h2] mydb.trace.db despite TRACE_LEVEL_FILE=0;TRACE_LEVEL_SYSTEM_OUT=0

2013-07-18 Thread Ryan How
If you look inside the zip file of your backup are there trace files in there? On 18/07/2013 4:14 PM, EDV-Services wrote: Hi Thomas, I thought the same, I thought it could be a bug in my application. Then I restored my latest backup file by using the web interface of H2 by clicking on Tools

Re: [h2] Avoiding corruptions in frequent unclean-shutdown scenario

2013-07-07 Thread Ryan How
I shut it down about 50 times a day uncleanly during development and never had an issue. As the database gets larger startup time takes longer. I guess as it checks the database. It all happens automatically. I can't vouch for ext4, I've had a lot of corruptions on that (not H2, but just the

Re: [h2] Missing lob, lob: null table, when selecting CLOB for update (MVCC setting)

2013-06-24 Thread Ryan How
Hi, Yeah this doesn't work. And nobody is currently supporting MVCC until the new Storage engine is out. So options are: Don't use MVCC. Don't use For Update with LOBS. Try and fix H2 code. Also, Other people have noted problems with lots of LOBS and MVCC when not using for update. Ryan

Re: [h2] Limiting database size on disk

2013-06-14 Thread Ryan How
But it does re-use space. So if you delete data, then insert new data, the database won't grow, it will overwrite the deleted data. Please correct me if I am wrong. On 14/06/2013 2:33 PM, Noel Grandin wrote: You can use DISK_SPACE_USED to get the approx amount of space used by a table

Re: [h2] why one query at a time

2013-06-12 Thread Ryan How
By Default H2 run single threaded, so when a statement is executing, it blocks everything else. See http://h2database.com/html/features.html#multiple_connections You can turn on multithreaded mode if you really need the concurrency, or have single long running statements and don't want to

Re: [h2] Re: NPE when shutting H2 down after integration tests run

2013-06-03 Thread Ryan How
The stack trace indicates version 1.3.170 ? On 3/06/2013 5:51 AM, Martin Lichtin wrote: We are using 1.3.172 and have seen a very similar NPE. 2013-06-01 14:48:14,035 [Atomikos:1 ] WARN XAResourceTransaction - XA resource 'JDBC-H2RuleExecCamelITest': rollback for XID

Re: [h2] Re: H2 database and Excel VBA

2013-06-03 Thread Ryan How
Have you got the pgserver running in H2 ? on Port 5432? From memory the default Postgres port default H2 pgserver port might be different... On 3/06/2013 10:41 AM, Balaji M wrote: Hi, When i try to connect through DSN less connection i am getting error pls help /Could not Connect to

Re: [h2] Re: NPE when shutting H2 down after integration tests run

2013-06-03 Thread Ryan How
Sorry, so do you mean you are still getting a very similar stack in 1.3.172?, You just don't have a record of it? On 3/06/2013 3:12 PM, Martin Lichtin wrote: Yeah, you're right. I already updated the version, but the stack indeed came from 1.3.170. On Monday, June 3, 2013 8:58:13 AM UTC+2,

Re: [h2] Re: H2 database and Excel VBA

2013-06-03 Thread Ryan How
When you start the PGServer you can also set the port it is listening on. [-pgPort port]The port (default: 5435) On 3/06/2013 3:55 PM, Balaji M wrote: Hi , I am new to the H2 ... For ODBC DSN connection by default the port no is 5435 ..it is working fine For ODBC DSN less

Re: [h2]

2013-06-03 Thread Ryan How
I imagine you could probably change the source of the shell tool fairly easily to change the max length, or make it configurable as a command line option? And also make header output optional. Or you could probably strip the header by piping it through some awk command or something (I'm a

Re: Missing LOB issue

2013-05-30 Thread Ryan How
I'm using MVCC and the only problems I've come across appear to be with LOBS (that's ok for me, don't really need them for my use case). What I mean is that it may have been less work for you to try and fix the H2 source (Seeing the issues seem to all be with LOBS) rather than change to

Re: H2, LibreOffice and Java

2013-05-30 Thread Ryan How
I'd try the connection pooling :). I imagine that means it keeps a pool of connections open to the database underneath, then when it needs a connection in the GUI there is always one available. I'd imagine the connection string would be the same, connection pooling would be handled by

Re: How do I allow TCP connections from specified IP addresses only?

2013-05-26 Thread Ryan How
Hi, You can't currently do that in H2. You need to do it in the firewall on the machine. Ryan On 26/05/2013 12:33 PM, Jay Lee wrote: Hi All, I am using H2DB in TCP server mode. The only thing missing or I can't find is that how to block clinet connection based on IP address. For example

Re: Weird H2 Database error

2013-05-24 Thread Ryan How
I'm seeing 171 on the 2nd line and 169 on the 4th line? On 24/05/2013 11:25 PM, Thomas Mueller wrote: Hi, The error message Caused by: java.lang.NoClassDefFoundError: org/h2/engine/Constants doesn't say much about the state of the database file. All it says is that you have a classloading

Re: H2 in-memory database with MVCC enabled - what are the risks?

2013-05-23 Thread Ryan How
I've been using MVCC for quite a while. It appears pretty stable, but there is a bug with FOR UPDATE and LOBS. (It doesn't work), so there are still bugs. Furthermore MVCC is not really supported by anyone, so if you come across bugs you'll probably need to fix them yourself. I think once the

Re: How to remove Thousands separator from decimal

2013-05-22 Thread Ryan How
Hi, Wouldn't that indicate each value is in a new column, being a CSV file? I'd imagine in your export process to get the CSV you'd need to not export the commas ? Ryan On 23/05/2013 3:30 AM, pkod...@uic.edu wrote: Hi, I would like to know if there is any in built function to remove

Re: How to remove thousands separator from decimal type?

2013-05-22 Thread Ryan How
I don't know of anything inbuilt. You could dump it into a varchar column, remove all the commas (SET field = REPLACE(field, ' ')), then alter column type to decimal? Ryan On 23/05/2013 3:41 AM, Rnj wrote: I'm trying to import a csv file into a h2 database table. I have a number 786,960,000

Re: IDENTITY column increments even after error in previous SQL statement

2013-05-21 Thread Ryan How
Hi, That is how the identity columns work. Also if a failed transaction then they will still increment. If the database is not closed correctly they may jump by a large number. There is no guarantee that they will be in increments of 1, just that they will be higher in value than the last.

Re: Are deadlocks preventable?

2013-05-20 Thread Ryan How
Well you could get a global database lock with every transaction, it would kill concurrency, but you'd be ensured to never get a deadlock :P Sorry, not very helpful :), but no-one else has replied on here :) On 18/05/2013 7:58 AM, Gili wrote: Hi, I wanted to get your opinion regarding

Re: Dropbox and H2

2013-05-09 Thread Ryan How
I'm not sure how dropbox handles open files, but regarding multiple files h2 should be fine as everything is in 1 file. If you have separate lobs or fulltext index that might be a problem. You could regenerate full text index, but if lobs are out of sync I don't know how it would handle it. So

Re: H2 error when running.

2013-05-08 Thread Ryan How
Can you paste a stack trace of what error you are getting? And what URL are you using to connect to the database? Thanks, Ryan On 8/05/2013 1:54 PM, khang phamngoc wrote: I used H2DB for my project, well evrything seem good but 2 days ago when I'm using it, my computer shut down so when I

Re: Dropbox and H2

2013-05-08 Thread Ryan How
Dropbox just syncs a folder on the local PC. So it depends on what you want to do with it? If you want to use it on more than 1 PC at a time it won't work (You'll just get conflicts). Otherwise it should work ok I think. ? I'm not sure how dropbox accesses in use files. But it might only sync

Re: CPU utilization is 100% for huge records transaction

2013-05-01 Thread Ryan How
Sounds like you are running out of memory. What is the memory usage of the java process? and what JVM parameters are you using? You'd expect CPU to be maxed out for an in-memory database. Something would have to max out. On 1/05/2013 9:40 PM, neelima kaliki wrote: Below are my System

Re: CPU utilization is 100% for huge records transaction

2013-05-01 Thread Ryan How
You can try it and see if it works.-Xmx7000m or something like that. But you may keep running out of memory. It might just be too much data to fit. You might be better off trying using a file based database on an SSD? On 2/05/2013 12:03 AM, neelima kaliki wrote: So, if i increase my memory

Re: Is it possible to renew the execution plan for a view?

2013-05-01 Thread Ryan How
Strange that it took 10 minutes to reproduce it? That would almost be consistent with the sub-optimally executed view? I'm wondering whether it might be a caching thing? It's hard without a reproducible test case. I'm just guessing what it might be and trying to narrow down the

Re: Is it possible to renew the execution plan for a view?

2013-04-24 Thread Ryan How
Wow, that isn't a simple query is it :) Nothing seems obvious does it. And if you re-create the view then you get the same execution plan as running the select directly? I think you'll need someone much more knowledgeable than me helping. Hope you get it sorted! I'd only be trying different

  1   2   3   >