Skip Ribbon Commands
Skip to main content
Header Graphic
Margin Maximizer Suite - Customer Support

Backing Up the MMS database

Back to Margin Maximizer Suite

The MSDE database used by the Margin Maximizer Suite™ consists of two files: USBA_data.mdf and USBA_Data.ldf. The MSSQL$USBA service controls access to these files and keeps these files locked while the service is running. Therefore, in many cases, a standard file copy backup will fail to backup these critical files.

Options for backing up the Margin Maximizer Suite™ database

The files for the database are typically backed up in one of two ways: either by stopping the MSSQL service and then copying the files or by using the MSSQL service to create a backup file and then copying the resulting file as part of your backup routine.

Backup the database files after stopping the MSSQL$USBA service

The MSSQL$USBA service needs to be stopped in order for the USBA_data.mdf and USBA_Data.ldf files to be unlocked so they can be copied. It is common for backup software to include the option to run programs or commands when starting or completing a backup operation. Consult the documentation for your backup software if you wish to enable this option. Alternatively, you setup a scheduled task to stop the MSSQL$USBA service before the backup is scheduled to run and schedule another task to restart the service when the backup routine has completed.

Create a backup file using OSQL commands

OSQL is a command line utility installed with the MSDE database. Using the BACKUP statement in an OSQL statement generates a database_name.bak file in the location you specify for the file you specify. The resulting file can be restored using the corresponding RESTORE command.

SQL agents for backup software

The final option for backing up the database is to use an SQL agent for your specific backup software. While this is frequently the most streamlined option, SQL agents generally must be purchased as an add-on product for most backup software.

Our recommendation

We have created a small batch program to backup your database. After entering the server name for your database and a destination directory, this program will also generate 2 other batch files to backup and restore your Margin Maximizer Suite™ database. We recommend using Windows Task Scheduler to run the backup batch file before your regular backups are scheduled to run. The file download, and additional information on how to schedule it to run using Windows Task Scheduler can be found here.

Back to Margin Maximizer Suite