Sometimes, a firewall may not allow the HSQL DB to be run in HSQL Server mode. In such scenarios, the HTTP Server mode comes to our help. To run the HSQL DB in HTTP Server mode, we need to do the following:
1) Place the hsqldb.jar in a folder where you want to create the database
2) In command prompt, execute the command:
- "phonebook" is alais name used to refer to the database. This also hides the actual database from the clients.
- Settings to connect to the database from HSQL Database Manager is shown below:
1) Place the hsqldb.jar in a folder where you want to create the database
2) In command prompt, execute the command:
java -cp hsqldb.jar org.hsqldb.server.WebServer --database.0
file:/data/learning --dbname.0 phonebook
- /data/learning is the location where the database will be created.- "phonebook" is alais name used to refer to the database. This also hides the actual database from the clients.
- Settings to connect to the database from HSQL Database Manager is shown below:
No comments:
Post a Comment