How do I move my database to a new computer?
Moving your database typically requires a number of adjustments in your MainBoss configuration. The same adjustments are required if you rename the database, or the computer where it resides, or the instance of SQL Server that manages the database. Renaming is essentially the same as moving, even if data isn't actually moved elsewhere.
There are two general possible scenarios for moving a database:
- A planned move, where you can make a "clean" transfer
- An emergency move—for example, where the old computer fails unexpectedly because of a hardware problem and you have to move to a new computer without advance preparation
Note: If you are using MainBoss Service (formerly called @Requests), there are a number of important steps for dealing with that service on the old and new computers. If you are not using MainBoss Service, you can ignore these steps.
In both scenarios, the version of SQL Server on the new computer must be at least as up-to-date as the one on the old computer—you cannot transfer from a newer version of SQL Server to an older one.
This section gives an overview of how to move a database from one computer to another, using MainBoss Advanced Version 4.0. Detailed information on each step can be found in the MainBoss Installation and Administration Guide.
To move a database to a new computer:
- In MainBoss, go to Administration | MainBoss Service and click Delete Windows Service for MainBoss (found on the drop-down list for Configure the Windows Service for MainBoss).
- Make sure that everyone has quit using MainBoss.
- Make a backup of the database (e.g. by using Administration | Backups or by making the backup directly with SQL Server).
- Copy the file containing the backup to the new computer.
- On the new computer, login to an account with Windows Administrator privileges.
- Start MainBoss on the new computer and use "Create New Organization from Backup" (in the "Select Maintenance Organization" window) to create a new MainBoss database from the backup file. (If MainBoss is not installed on the new computer, import the backup file into SQL Server; then start MainBoss on another computer and use "Add Existing Organization" to access the imported database.)
- Go to Administration | MainBoss Service | Configuration and make sure your configuration options still make sense for the new database location.
- Go to Administration | MainBoss Service and click Configure the Windows Service for MainBoss.
- For each MainBoss user, edit the Maintenance Organization information so that it refers to the new location of the database.
If you are using MainBoss Advanced 3.3 or later: Emergency moves are essentially the same as planned moves. The only difference is that you can't begin by taking an up-to-date backup; you have to work with the most recent backup you have, since an emergency move is only necessary when there's some malfunction in the computer that holds the MainBoss database. Apart from that, the restoration process is the same.
If you are using MainBoss 3.1 to MainBoss 3.2.2: Follow these steps:
- Start with the most up-to-date backup of the database that you can find.
- Copy the backup file to the new computer.
- On the new computer, login to an account with Windows Administrator privileges and start MainBoss. (If you do not have SQL Server Administrator privileges, you must start MainBoss by right-clicking on the MainBoss icon and selecting "Run as Administrator" from the menu.)
- Start MainBoss on the new computer and use "Create New Organization from Backup" (in the "Select Maintenance Organization" window) to create a new MainBoss database from the backup file.
If you are using the @Requests Service:
- Go to Administration | @Requests.
- Click Manage.
- In the resulting window, click the drop-down arrow beside Uninstall and click Clear Service Association.
- When MainBoss asks if you want to delete the @Requests service, click No. (The service doesn't exist anymore.)
- When MainBoss asks if you want to clear the service association, click Yes.
- Install the @Requests service on the new machine and start it.
If you have MainBoss 3.0 or 3.0.1: Click here for instructions on how to uninstall the @Requests service.
If you only have a SQL Server backup: Some sites may prefer to do backups through SQL Server or through third-party backup software, rather than using MainBoss's own backup facilities. In this case, you can use the SQL Server or third-party restore facilities to restore the MainBoss database file. However, you also have to make sure that MainBoss users have login entries created in the Security section of the SQL Server Management Studio. (If MainBoss does the restore operation, it creates appropriate login entries; if SQL Server or third-party software do the restore, they do not create the login entries so you have to do it manually.)
The MainBoss Users table records the domain as part of each user's login name. Therefore if you move the database from one domain to another, the old user records won't work, even if the users have the same login names in the new domain.
For MainBoss Advanced 3.4 and up: Edit all the existing Users records to refer to the new domain.
For older versions of MainBoss Advanced: Delete all the old records from the Users table and create new ones for the users in the new domain. Note that in this situation, the only way to start running MainBoss will be to login to Windows under a name that has Windows Administrator privileges, then start MainBoss by using "Run as Administrator". Start MainBoss in "Administration" mode by clicking the arrow beside "Open Organization" and selecting "Administration".
SQL Server Considerations
In the most recent releases of SQL Server, having Administration privileges does not automatically give you permissions to access databases. Instead, administrators must use SQL Server Management Studio to give themselves appropriate permissions.
In particular, if you create a new MainBoss database from a backup (as described above), you may need to use SQL Server Management Studio to give yourself permissions on that database. (If necessary, you can download SQL Server Management Studio from Microsoft. If you are using the free version of SQL Server, this is simply a matter of downloading the free version of Management Studio from the same web page where you downloaded SQL Server itself.)
If you restore a MainBoss to a different instance of SQL Server, we recommend that you use Windows Update to check for SQL Server updates. Newer versions of SQL Server have features that MainBoss can use to improve performance.
After moving your database, we recommend going to Administration | Database Management and clicking Update Database Statistics. This performs various checks and updates which might improve performance.