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:

  1. Using WinSCP, open the settings.conf file in the ~admin/java/apps/wbcs/conf folder.
  2. 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
  3. 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
  4. Press Ctrl + S to save.
  5. Connect to the clock using the Admin Console.
  6. Verify that all clock punches have been exported to the system by clicking on the Journal tab.
  7. 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.
  8. Click the Debug tab.
  9. Expand the Threads node.
  10. Expand the Daemon Threads node.
  11. Right-click exportswipes, and select Restart Thread from the menu if there are any unsent clock punches.
  12. 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.
  13. Expand the dbupdate node.
  14. 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.
  15. Expand Schedule and Time Task to ensure that the Last Run Time corresponds with the time you restarted the thread.
  16. Click the Log tab.
  17. Ensure no errors have occurred and that DBUpdate finished successfully.
  18. Switch back to WinSCP and navigate to the ~admin/java/apps/wbcs folder.
  19. Select all files with the name pattern wbcsdb.*.
  20. Right-click the selected files, and select Delete.
  21. Click OK.
    This operation deletes the previous database from the clock.
  22. Press Ctrl + T.
  23. Specify reboot and press Enter. Upon restarting, the database is created in the new format.