Run HyperSQL as a Windows Service with AlwaysUp

How to Setup HyperSQL as a Windows Service with AlwaysUp

Automatically start HSQLDB immediately after a reboot and keep it running 24/7. No need to login to manually launch the database.

The HyperSQL (HSQLDB) is a mature, open-source relational database implemented entirely in Java.

To install your HyperSQL database server as a Windows Service:

  1. If necessary, download and install HyperSQL for Windows. Please ensure that HSQLDB is properly configured and that you can start it normally.

    Note that we have placed the software in C:\hsqldb and we'll use that folder throughout this tutorial.

  2. Formulate the command line you use to launch HSQLDB. The User Guide notes the preferred format and we will use that method for this tutorial:

    C:\ProgramData\Oracle\Java\javapath\java.exe -cp C:\hsqldb\lib\hsqldb.jar org.hsqldb.server.Server --database.0 file:mydb --dbname.0 xdb

  3. Download and install AlwaysUp, if necessary.

  4. Start AlwaysUp.

  5. Select Application > Add to open the Add Application window:

    Add Application

  6. On the General tab:

    • In the Application field, enter the full path to the Java executable file. It will most likely be available in this convenient location:

      C:\ProgramData\Oracle\Java\javapath\java.exe

    • In the Arguments field, enter all the parameters from the command line you use to launch HyperSQL (see step 2). Please be sure to specify the full path to the HSQLDB JAR file.

    • In the Start in directory field, enter the full path to your HSQLDB bin folder (C:\hsqldb\bin for us).

    • In the Name field, enter the name that you will call the application in AlwaysUp. We suggest HyperSQL but you can specify almost anything you like.

    HSQLDB Windows Service: General Tab

  7. On the Logon tab:

    • Enter the user name and password of the Windows account you are logged into when you start HyperSQL. HSQLDB should run in this account to find its Java settings (environment variables, etc).

    • If you wish to hide the DOS/command window that comes up when you run HyperSQL (recommended), check the When a user logs on, don't show the application's windows and tray icons (if any) box at the bottom. Hiding the command window will prevent the Interactive Services Detection alert from constantly coming up as HSQLDB runs in the background "Session 0".

    HSQLDB Windows Service: Logon Tab

  8. Click over to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that HSQLDB needs the TCP/IP networking stack to operate.

    HSQLDB Windows Service: Startup Tab

  9. Move to the Extras tab. If you wish to capture the text normally displayed on the command window created by Java (recommended, as you will no longer see the console when it's running in the background as a service), check the Capture output to this log file box and specify the full path to a file. We have specified C:\hsqldb\hsqldb-log.txt.

    HSQLDB Windows Service: Extras Tab

  10. Click the Save button. In a couple of seconds, an application called HyperSQL will show up in the AlwaysUp window. It is not yet running though.

    HSQLDB Windows Service: Created

  11. To fire up your database, choose Application > Start "HyperSQL". The State column should transition to Running after a few seconds and HSQLDB should be available to all your applications.

    Click the green circle to see some details of the Java process running HSQLDB:

    HSQLDB Windows Service: Running

  12. That's it! Next time your computer boots, your HyperSQL database will start up automatically, before anyone logs on.

    We encourage you to edit HyperSQL in AlwaysUp and check out the many other settings that may be appropriate for your environment. For example, setup email notifications, improve performance by boosting the priority of your java process, or periodically restart the DB to cure memory leaks.



HyperSQL not working properly as a Windows Service?

  • Review the text file you specified in step 9 for errors reported from HyperSQL. Here's what ours looked like after a successful start:

    HSQLDB Console Log File

  • Consult the AlwaysUp Troubleshooter - our online tool that can help you resolve the most common problems encountered when running an application as a windows service.
  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and HSQLDB. The AlwaysUp Event Log Messages page explains the messages that may turn up.
  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1 New!

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!