[JobServer Built In Database Support]


JobServer Standard version comes with a built in HSQL database. Visit 
http://hsqldb.sourceforge.net for more information on HSQLDB. A HSQL database is 
integrated with JobServer. It needs no special configuration to use with JobServer. 
Keep in mind HSQL has limited scalability and concurrency support compared to 
databases such as Oracle and Postgresql. It is targeted at JobServer environments 
with the following conditions:

   - Managing under a few hundred Jobs
   - Limited number of concurrently running Jobs.
   - Number of concurrent users is relatively small

When using JobServer Standard version, you will be limited to only one Partition 
and you will not have access to the extended threading features found in the 
Professional and Enterprise versions.

The HSQL database username/password are configured in the system-config.properties 
file. You can change the password by using the dbmanager gui tool 
(found in jobserver/bin/toolbin/dbmanager). Use the command "SET PASSWORD MYNEWPASSWORD;"
to change the password of "jsuser" using this tool. The dbmanager tool can also be used 
as a general query and admin tool by an administrator to access the HSQL database. 
Normally the JobServer administrator will not need to deal directly with the HSQL 
database unless performing trouble shooting or performance tasks.



                             [Database Maintenance]

Table Trimming
--------------
The JobServer database tables should normally be trimmed on a periodic basis. To do this,  
create a job using the pre-built TaskBean "JobServerCleanup" that comes with 
the installation. Create, configure, and schedule this Job. Run this job on a regular
basis (for example weekly, monthly or as needed). It will keep the database trimmed
to your specifications.


Backup
------
The JobServerCleanup TaskBean can also be configured to perform a CHECKPOINT on the
database. This will capture a backup version of the database. The backup
can be used for emergency recovery purposes if the need arises. This will
create a new file in the backup_archive directory time stamped with the current
date. The files in the backup_archive should periodically be removed and copied to
a secondary location for long-term storage.


Recovery
--------
If the database is ever corrupted, you can restore it from one of the backups.
You may first try to use the the "jobserver/EJS-DATA/dbdata/jsdb.backup" 
to see if you can recover from the
last checkpoint. Do this, by removing the "jsdb.data" file while the database is
shutdown. Then start the database. If this is successful, the last checkpointed
"jsdb.data" file will be restored from the jsdb.backup" file.

If this backup is also corrupt, you will 
need to restore the environment from one of the archived backup files that
are in the backup_archive directory. Pick the appropriate time stamped backup files 
from the backup_archive directory and place it in the "jobserver/EJS-DATA/dbdata"
directory. Make sure to rename it to the name "jsdb.backup" and to delete the 
existing jsdb.data file. Restart the database to restore the backup.