Backing up an MP-5 database:
The information in the article refers to:
Monitor-Pro MP-5
Applies to:
| Product: | MP-5 |
| Reported Version: | |
| Applies to: | All MP-5 versions |
| Area of effect | Backups |
Overview
To minimise risks of data loss, you should back up your database(s) regularly.
There are 2 methods for backing up:
-
1: Manually using the MP-5 admin tool, or if available, using the SQL Server Enterprise manager interface
-
2: If SQL Server is available, automated backups can be set up. Third party automatic backup utilities are also available.
Details
For both methods, you will first need to know where your database is installed.
Finding your database
Your database needs to be stored on the same computer as the database engine. This will either be your desktop or a remote server. You can find which computer the database is installed on by opening MP-5 and looking at the database field on the splash screen.
Next, search for a file with your database name on this computer. It will have a suffix of .mdf. The default path is /program files/Microsoft SQL Server/MSSQL/Data (would normally be named mp5_yourcompanyname.mdf or similar). It may be installed anywhere on the computer though.
There will be a second file with suffix .ldf. This is a transaction log file and is not normally backed up. In high data volume, mission critical situations this log is set to record every action and can be used for an up-to-the-minute restore.
Backing up your database
Option 1: Manual backups
MP-5 uses the Microsoft SQL Server engine which, unlike Microsoft Access, attaches itself to its databases. It uses a unique server id called a GUID and so purely copying the .mdf WILL NOT allow it to be attached to a different server if required. Therefore you must first detach your database(s) prior to backing up.
Before a database can be moved it must first be unattached from its server.. Depending on your setup (SQL Server or MSDE) one of the following apply..
From MP-5 (the only option for MSDE installations):
Go to the database administration tool
1. Select the database required and press the "detach" button.
Note: If you receive a message saying that the database is in use then log out of MP-5 and back in ensuring that the connection fields on the login screen are empty of connection details.
Do the same for the monitorpro system database if required (depending on configuration this can contain your variable and source lists - normally larger scale systems).
2. Copy the .mdf file(s) to a backup location
3. Reattach the original database using the "Attach" button.
From SQL Server:
1. Open Enterprise Manager and browse to your data database . Right click on it, select all tasks and detach database. Do the same for the monitorpro system database.
2. Follow 2 above
3. Right click on the word "databases", select all tasks and attach database database. Browse to your original database & attach. Do the same for the monitorpro system database.
Option 2: Scheduled backups
This option is only available from SQL Server or if you have a 3rd party tool. From the SQL Server Enterprise Manager, go to Management, Database Management plans, and create a new plan for the backup using the wizard provided.