DataBase Issues

How To Install HSQLDB In Ubuntu

1) Download 'hsqldb-utils_1.8.0.10-6ubuntu2_all.deb' package from below link.
    (You can choose the hsqldb version you need as you prefer)

http://packages.ubuntu.com/it/lucid/all/hsqldb-utils/download

2) Double click .deb package & you will be directed to ubuntu softwear center.Install the hsqldb from there.









3)  Incase you need to start hsqldb in command mode and not sure where it is installed, go to /etc/init.d and execute following commands.

  • In Linux there are lot of ways to do same thing.Inorder to restart or stop a system service you can use /etc/init.d as shown below.
Init.d 

  • init.d is a directory which contains start/stop scripts for various services on system.So its activities effect the entire system.
  • In order to manually perform above functions you need to have root permission.
  • Each script will run as a command and the format will look as below.                     /etc/init.d/command OPTION
  • OPTION can be one of the following: (start, stop, reload, restart, force-reload)
  • Some of the more common init scripts in this directory are: (networking, samba, apache2, ftpd, sshd, dovecot, mysql --> But this depends on what you have installed)
/etc/init.d/hsqldb-server start
/etc/init.d/hsqldb-server status
/etc/init.d/hsqldb-server stop


4) Once you start hsqldb server, you can open the GUI for the DB manager as follows.

Go to the direcotry where hsqldb.jar exist.
If you are in that location in terminal type below.

java -cp hsqldb.jar org.hsqldb.util.DatabaseManagerSwing
 
 
It will open the UI for DB manager as above.

5) Insert below values to get connected.




If server has (Look at server.proeprties while for this.It is inside hsqldb installation folder) -dbname.0 firstdb as the database alias. Them connection URL should include firstdb. For example jdbc:hsqldb:hsql://localhost/firstdb
The server can serve several databases with different aliases.

6) Create table as below and insert a record to test.



1 comment:

  1. This comment has been removed by the author.

    ReplyDelete