
HSQLInspect
Table of Contents [-]
This page describes a simple way to inspect the in-memory HSQL database that is used in the default Liferay bundles. You should stop the application server that's accessing the database before inspecting / modifying it with the procedure below.
Obtain HSQL JDBC Driver #
The HSQLDB JDBC driver is bundled in the main HSQL JAR. Download the HSQL distribution. In the lib directory you should find hsql.jar. Make a note of the location.
Obtain SquirrelSQL #
SquirrelSQL is an open-source database explorer that supports any JDBC accessible database.
Configure the HSQL Driver #
In the "drivers" pane in SquirrelSQL, you should see "HSQLDB In-Memory". It will have a red X in front of it meaning that you have not yet configured the JDBC driver location. Edit this driver (the pen icon). In the opened window, click the "extra class path" tab. Click "add" and navigate to hsqldb.jar from the HSQL distribution. The "class name" field below should now be filled in with "org.hsqldb.jdbcDriver".
Create an Alias #
An alias is a pre-configured connection to a particular database. In the alias pane, click new (the + icon). The URL should be of the form jdbc:hsqldb:file:<path>/lportal, where <path> is the current working directory of the application server, which is usually the directory where you executed the application server's start command. Look for lportal.script, lportal.log, etc. to validate that you have the correct path.
For example: jdbc:hsqldb:file:/Users/jtb/glassfish/lportal
The user name should be "sa", and the password "" (blank).
Connect #
Make the connection by double-clicking on the alias. Liferay's tables are under PUBLIC/TABLES.