Вопрос

I have to use the H2 database for only 2 PCs connected over LAN. I find it quite difficult to implement connection for server mode for 2 PCs over LAN. The LAN connection is such that the database is stored in 1 PC and is accessed from the other. So, I decided that I would run the database in server mode in 1 PC and file-mode from the other PC. Would it show the error that the database is "LOCKED BY ANOTHER PROCESS" (in the PC from which I am accessing the database in file-mode) or would it run perfectly fine?

Это было полезно?

Решение

Yes, this works, if the database server is started within the same process as the embedded connection(s) to the database. The reason is, you can open multiple connection to the same database within the same process, so the server needs to run within the same process.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top