Re: [h2] Re: Remote Connection to a single database.

2016-07-29 Thread Mike Goodwin
Does it sanitise the paths that are passed to it (so they cannot go up a
directory with '..')?

I mean that's not mentioned in the documentation (on that page I cannot
find any reference to 'baseDir' and the command line help merely says 'The
base directory for H2 databases' and it's not immediately obvious from the
source whether sanitation takes place).

Also it still doesn't allow for having say http://mydomain:1234/ as the
location of the tcp connection to a single database.

I can see the issue, why it is like it is. To configure the mapping in a
flexible and standard way you would have to come up with some kind of
horrendous mapping file format,  which would just another thing to learn...

Anyway, I'm quite happy with how it works for me now. Unfortunately it
feels at first like something that it should just be possible to configure
without writing any code and I found the documentation and searching google
in general not very illuminating and even somewhat confounding. Perhaps not
unsurprising that the documentation doesn't talk about things that aren't
actually quite possible.

(Not trying to sound ungrateful or critical, just hopefully save the odd
person an hour or four in the future trying to work out how to configure
the tcp server)


On Fri, Jul 29, 2016 at 8:33 AM, Noel Grandin  wrote:

> I think you want to run H2 like this on your server:
>
> java -cp h2*.jar org.h2.tools.Server -baseDir -ifExists
>
> to only allow users to open databases in a selected folder, and only if
> the DB already exists.
>
> See documentation here:
>
> http://h2database.com/html/tutorial.html
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: The DB size increases from 100 MB to 1GB

2016-07-29 Thread IntensiveH2

>
> Sorry I checked the version again and I used h2-1.4.192.jar
>

Thierry

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: The DB size increases from 100 MB to 1GB

2016-07-29 Thread Steve McLeod
> I'm using 1.4.161

Do you mean 1.3.161? If so, the first step would be to update to either 
1.3.176 (release, stable) or 1.4.192 (beta, latest).

Many bugs have been fixed since 1.3.161


On Friday, 29 July 2016 08:28:39 UTC+2, IntensiveH2 wrote:
>
> Hello,
>
> I'm using 1.4.161 in 
> mode 
> ;MVCC=TRUE;AUTOCOMMIT=OFF;LOCK_MODE=3;LOG=2;CACHE_TYPE=LRU;MV_STORE=FALSE".
> Sometime, I have the error bellow:
> 2016-07-21 13:20:25 *pageStore: Transaction log could not be truncated; 
> size: 96 MB* because the h2 db size was increased just after.
> and after the size of the DB increases from 100 MB to 1GB in one day.
> The only way to decreases the size is stopping  the application server 
> (calling a "shutdown defrag") and restarting it just after.
>
> Maybe the trace "Transaction log could not be truncated" is due to a 
> transaction not closed (It's my understanding of the message and discussion 
> in this google group).
>
> *Qestion: *
> How to detect which transaction is the root cause of the issue? 
> It is possible to have latest SQL statements executed on this transaction?
> Something else helping me to debug this issue?
>
> Regards,
> Thierry. 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: The DB size increases from 100 MB to 1GB

2016-07-29 Thread Noel Grandin

you can check the sessions meta-table to see if a transaction is held open

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: The DB size increases from 100 MB to 1GB

2016-07-29 Thread IntensiveH2
OK but the issue occurs on customer side.
How to detect which transaction is the root cause of the issue? 
It is possible to have latest SQL statements executed on this transaction?
Something else helping me to debug this issue?

and also
it is better in case of MV_STORE=TRUE

Thierry.

Le vendredi 29 juillet 2016 08:28:39 UTC+2, IntensiveH2 a écrit :
>
> Hello,
>
> I'm using 1.4.161 in 
> mode 
> ;MVCC=TRUE;AUTOCOMMIT=OFF;LOCK_MODE=3;LOG=2;CACHE_TYPE=LRU;MV_STORE=FALSE".
> Sometime, I have the error bellow:
> 2016-07-21 13:20:25 *pageStore: Transaction log could not be truncated; 
> size: 96 MB* because the h2 db size was increased just after.
> and after the size of the DB increases from 100 MB to 1GB in one day.
> The only way to decreases the size is stopping  the application server 
> (calling a "shutdown defrag") and restarting it just after.
>
> Maybe the trace "Transaction log could not be truncated" is due to a 
> transaction not closed (It's my understanding of the message and discussion 
> in this google group).
>
> *Qestion: *
> How to detect which transaction is the root cause of the issue? 
> It is possible to have latest SQL statements executed on this transaction?
> Something else helping me to debug this issue?
>
> Regards,
> Thierry. 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] The DB size increases from 100 MB to 1GB

2016-07-29 Thread Noel Grandin

MVCC=TRUE still has issues. If it works for you, great, if it doesn't, be 
prepared to debug :-)

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: Remote Connection to a single database.

2016-07-29 Thread Noel Grandin

I think you want to run H2 like this on your server:

java -cp h2*.jar org.h2.tools.Server -baseDir -ifExists

to only allow users to open databases in a selected folder, and only if the DB 
already exists.

See documentation here:

http://h2database.com/html/tutorial.html

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.