Hi,

I want to copy data from one database to another.
For that I use basic select and insert statements.

My procedure is something like this:

Select all rows from table A in db X and for every row insert it into table A in db Y.
Then move on to table B and so forth.

But at the same time db X is being modified.
It might be that table A has a foreign key pointing to table B.
So a row that was in A that I already copied might have become an orphan
because the parent row was deleted when I started copying table B.

So basically my question is, how could I select the data so that it would show
the state of the db at the time when the whole copy process started?

One way is to set exclusive to 2 but that is a bit harsh.

Documentation has this to say that might have something to do with my issue:
"the |BACKUP| statement does not lock the database objects when using the multi-threaded mode, and therefore does not block other users. The resulting backup is transactionally consistent."

How is this possible?
How can I achieve the same with basic jdbc or do I need to poke the internals?
What exactly does transactionally consistent mean in this context?

- Rami


--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to