Switching to the new database type
A new database type was introduced in the fixpack 22 release as an alternative for clients with large amounts of data on their clocks. This new database type improves the efficiency of the database layer. However, we recommend that only the clients with out of memory errors on their clocks switch to this new database.
Before you can switch to the new database, you must ensure the clock is not being used and that all transactions have been exported to the system.
To switch to the new database type:
- Using WinSCP, open the settings.conf file in the ~admin/java/apps/wbcs/conf folder.
-
Comment out the
server.db.class setting by specifying
#
at the start of the line:#server.db.class = com.workbrain.clocks.server.db.jdbc.Database
-
Specify these settings:
- server.db.class
- Specify com.workbrain.clocks.server.db.file.Database.
- file.location.db
- Specify the directory where you want the dbf files. The directory must be a subdirectory of the wbcs directory.
- file.location.db.archive
- Specify the directory where you want the archived dbf files. The directory must be a subdirectory of the wbcs directory.
- file.location.db.employee
- Specify the directory where you want the employee database file. The directory must be a subdirectory of the wbcs directory.
- file.location.db.journal
- Specify the directory where you want the journal database file. The directory must be a subdirectory of the wbcs directory.
- file.location.db.lbmetric
- Specify the directory where you want the labor metric database file. The directory must be a subdirectory of the wbcs directory.
- file.location.db.reader
- Specify the directory where you want the terminals database file. The directory must be a subdirectory of the wbcs directory.
- file.location.db. rejected
- Specify the directory where you want the rejected punches database file. The directory must be a subdirectory of the wbcs directory.
You can also paste in these default settings:
server.db.class = com.workbrain.clocks.server.db.file.Database ############################################################### # Local DB Settings: # ############################################################### #Location for the dbf files file.location.db = dbf #Location for the dbf archive files file.location.db.archive = dbf/archive #location of employee database file file.location.db.employee = dbf #location of journal database file file.location.db.journal = dbf #location of labor metric database file file.location.db.lmetric = dbf #location of terminals database file file.location.db.reader = dbf #location of rejected database file file.location.db.rejected = dbf
- Press Ctrl + S to save.
- Connect to the clock using the Admin Console.
- Verify that all clock punches have been exported to the system by clicking on the Journal tab.
-
Ensure all clock punches have a value of 'T' in the SENTTOXML
column.
If there are unsent clock punches, they will be lost if you continue without restarting the exportswipes thread.
- Click the Debug tab.
- Expand the Threads node.
- Expand the Daemon Threads node.
- Right-click exportswipes, and select Restart Thread from the menu if there are any unsent clock punches.
-
Right-click
dbupdate, and select
Restart Thread from the
menu.
This selection ensures that any new information, such as newly enrolled biometric templates, has been exported to the system.
- Expand the dbupdate node.
-
Click
Reload Data and watch the
dbupdate thread’s status.
The status changes from Sleeping to Running and back to Sleeping. When the status has changed back to Sleeping, the thread has completed and the information has been exported to the system.
- Expand Schedule and Time Task to ensure that the Last Run Time corresponds with the time you restarted the thread.
- Click the Log tab.
- Ensure no errors have occurred and that DBUpdate finished successfully.
- Switch back to WinSCP and navigate to the ~admin/java/apps/wbcs folder.
-
Select all files with the name pattern
wbcsdb.*
. - Right-click the selected files, and select Delete.
-
Click
OK.
This operation deletes the previous database from the clock.
- Press Ctrl + T.
- Specify reboot and press Enter. Upon restarting, the database is created in the new format.