Database Tools Module is an Add On Module for SambaPOS. You can install it through SambaMarket.
When you install Database Tools Module Database Tools link will appear under Management > Settings section.
##Database Tasks
On the main screen you can see Database Tasks screen. You can select an action from the list and click Execute Task to start the task. I’ll give more details about Database Tasks at the end of this tutorial.
##Tools
On tools screen there are two useful tools.
###Import - Export
You can partly Export SambaPOS settings to a TXT file and Import them to merge settings with another database.
Current version of Database Tools module does not support import & export products and entities.
Click Export button to export your configuration.
Choose items you want to export, type a file name and click Export button to export settings.
You can right click on this screen to access helpful function such as automatically selecting Actions or Automation Commands from selected Rules.
You can click Import to import & merge configurations with your database. If not disabled it will automatically generate a backup before importing data.
###Training Mode
When you enable Training Mode SambaPOS will automatically take a Snapshot of your database and prepare a training environment that works separately from production database. It is useful when you want to try a configuration or show something to a new waiter from a terminal. Disabling Training mode will switch back to production database. Enabling training mode from a terminal will always create a new database so it is safe to start Training Mode from multiple terminals simultaneously.
###Automation
Database Tools Module adds two Actions:
Change Database Connection: This action is useful to temporarily switch to a different database. You can execute this action from all rules such as User Login so when a specific PIN code entered that terminal can switch to a different database.
Execute Database Task: This action starts a database task.
###Database Tasks
A database task is a SQL script that are stored as a file under [My Documents]\SambaPOS4\Database Tasks folder.
You can create a SQL Script file here and execute it through Database Tasks interface. Alternatively you can setup Actions to start these tasks on specific cases.
We support 3 file types
SQL Scripts: Ends with .sql extension.
Batch Files: Ends with .bat extension.
Visual Basic Script Files: Ends with .vbs extension
You can use specific naming for better handling execution. You can name files that starts with these function codes:
- C Asks confirmation before starting task.
- B Creates backup before executing task.
- L Logouts user after executing task.
Function codes needs to be typed inside square brackets. No special ordering needed. For example if you name your task as [CL]Clear Menus.sql it will ask confirmation and backups database before executing Clear Menus task.








