How to run SQL queries on HSQLDB?

Last modified by Vincent Massol on 2017/03/25

If you've installed the XWiki Standalone version which includes HSQLDB, you might be interested to know how to check the content of your database.

You can of course run SQL commands directly from a wiki page.

However HSQLDB comes with a nice tool to browse its database and run SQL queries.

Go to the directory where you've unzipped the standalone zip and run the following (adapt the version of the hsqldb JAR to your version of course):

java -cp webapps/xwiki/WEB-INF/lib/hsqldb-*.jar org.hsqldb.util.DatabaseManagerSwing -driver org.hsqldb.jdbcDriver -url jdbc:hsqldb:file:data/database/xwiki_db -user sa

You'll get a nice tool like this one:

dbmanager.png

Get Connected