Running multiple "Server-mode" Split Databases

Discuss the database features
Post Reply
SLOShane
Posts: 21
Joined: Wed Aug 07, 2013 12:06 am

Running multiple "Server-mode" Split Databases

Post by SLOShane »

A couple of weeks ago DACM helped me create a split database in server-mode so multiple employees could access and work on the database at one time. I used the method described here : http://forum.openoffice.org/en/forum/vi ... 85#p257585. The first database I made works fantastic. The server shuts down and needs to be restarted every couple of days, but that isn't really a big problem because there doesn't appear to be any data loss. The problems started when I created a second split database using the same method and tried to run it from the same server as the first one. Apparently only one database server can be running at one time because whenever I run both, the tables from whichever server I started second appear to link to both of the front end database files. Here is an example:

I have two split databases set up using the server method (linked above): DB1 and DB2

I run the START.vbs file on each database starting with DB1 and then followed by DB2. I started them both from the same server, the server entered in the DatasourceURL.

When I open DB2 it appears to be working fine. It accesses the correct tables and the form works fine.

When I access DB1 it opens fine but it connects to the tables that belong to DB2 and therefore the form will not work.

When I only run one database server at a time it works. (obviously only the one that is running)

I have yet to observe if any data was lost from this cross-linking of back-end files. I have the back-end files for each database named with different prefixes, and have entered the correct prefix in the corresponding server.start.bat and server.stop.bat for each server. I thought for sure that would fix the cross-linking, but it did not. Is it possible to run two database servers from one host server without this happening? Thank you.
OpenOffice 4.00.9702 on Windows 8
User avatar
Villeroy
Volunteer
Posts: 31344
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Running multiple "Server-mode" Split Databases

Post by Villeroy »

You start only one server instance and configure many databases in the configuration file.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
SLOShane
Posts: 21
Joined: Wed Aug 07, 2013 12:06 am

Re: Running multiple "Server-mode" Split Databases

Post by SLOShane »

So what you're saying is that instead of having two separate databases with separate tables and forms, just combine them all into one database?
OpenOffice 4.00.9702 on Windows 8
User avatar
Villeroy
Volunteer
Posts: 31344
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Running multiple "Server-mode" Split Databases

Post by Villeroy »

No, that is not what I'm saying. It's all documented in your hsqldb package.
Among other things, the configuration file "server.properties" lists all databases with their path names. You do not start multiple databases. You start one server program which is configured to handle many connections to many databases.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
DACM
Volunteer
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Re: Running multiple "Server-mode" Split Databases

Post by DACM »

You can host multiple HSQL databases using a single instance of the HSQLDB server. Otherwise, we get into port deconfliction.

You simply need to specify all databases within a single set of batch files: server.start.bat and server.stop.bat. Or as Villeroy mentions, you can use a server.properties file and associated command-line syntax to start a server hosting multiple databases.
  • Here's a thread covering the [Windows] batch file setup: [Solved] How to set up 2 databases

    NOTE: 'rem' and '::' effectively accomplish the same thing (a remark) in a Windows batch file.
    NOTE: As I recall 'localhost' suffices in the batch files, but the client .odb file (Data Source URL setting) must reflect the static IP Address or Network Computer Name of the database-host computer.
AOO 4.1.x; LO 4.2.x; Windows 7/8 64-bit
Warning: Avoid embedded databases --> Solution: Adopt a portable 'split database' folder
Soli Deo gloria
Post Reply