Restoring a Backup Within MainBoss

This help file applies to an out-of-date version of MainBoss.
The most recent version of MainBoss is MainBoss 4.2.4.
This help file does not exist in MainBoss 4.2.4, but the index for that version can be found here.

< Previous section  |  Table of Contents  |  Index  |  Next section >

SQL Server offers various methods for restoring a database from a backup file. For further information, see the SQL Server documentation.

However, you can also restore a database from within MainBoss itself, using facilities in the Maintenance Organization window. (This is the window that lets you choose a database to open. One way to open this window is to go to MainBoss's Session menu and click Change Maintenance Organization.)

MainBoss offers two operations for restoring databases from backup:

In both cases, MainBoss performs the operation by submitting requests to SQL Server. You must therefore have SQL Server Administrator privileges to perform either operation.

Restore operations are run by SQL Server itself on the computer where SQL Server is running. Because SQL Server does the work, the backup file you want to use must be accessible to the login name under which SQL Server runs. Furthermore, the name of the backup file should be relative to the computer where SQL Server is running. Unless the file name explicitly begins with \\computer or a drive name (e.g. C:\), the file name will be assumed to be relative to SQL Server's home directory. (This is true even if the file name begins with a \.)

For example, suppose SQL Server is running on Computer X and you submit a restore request while working on Computer Y. MainBoss will ask you to specify the name of the backup file containing the database you want to restore. Suppose you give the name


You may think this refers to a file on Computer Y's C: drive. However, the restore operation is performed by SQL Server on Computer X; therefore, SQL Server will try to find the file on Computer X's C: drive, not Computer Y. If the directory C:\MyBackups doesn't exist on Computer X (or if SQL Server's login name doesn't have permissions to read that folder), you'll get an error message and the restore operation won't work.

For this reason, we recommend that you only submit restore requests while logged in to the computer where SQL Server is running. You should also be aware of what permissions SQL Server has and what files will actually be accessible to SQL Server's login name.

Backup Format: There are several different ways to create a backup with Microsoft SQL Server. MainBoss assumes that you did the backup using the backup facilities inside MainBoss itself, or in some other way that uses the same backup format. However, it is possible to create database backup files in such a way that MainBoss cannot restore from the file. This happens when you do the backup with SQL Server Management Studio and specify options that create backup files whose format is different than the one MainBoss expects.

In this case, you can still restore the database from the backup file. You just have to use Management Studio directly, rather than using MainBoss.

Command Format: When you click Restore Organization, MainBoss lists the available backup file and asks you to pick the one you want to restore. When you click Create New Organization from a Backup, MainBosss ask you to specify the following:

Database Server: The network location of the SQL Server through which you will access the database. If you click the accompanying "..." button, MainBoss displays a list of database servers that are known to your Windows system. There may be additional servers that you can use but that Windows doesn't currently know about.

Database Name: The name of the database you want to create. This cannot match any existing database on the given server.

Organization Name: A name that you personally will use for this database. This should not be the same as the organization name for any other database.

Backup file: Fill in the field with one of the names in your list of backup names (as given in Administration | Backups). If you choose a name from this list, MainBoss tries to restore from the associated backup file.

MainBoss's list of backup files only contains files made inside MainBoss using Administration | Backups. The list doesn't backups made directly with SQL Server Management Studio.

Backup Set number: Used only if the backup file was created using SQL Server options related to backup sets. For backups made with Administration | Backups inside MainBoss, leave "Backup Set number" blank.

Once you have specified the required data, click OK. This submits an appropriate request to SQL Server, which performs the restoration.

< Previous section  |  Table of Contents  |  Index  |  Next section >