Creating a New Maintenance Organization from a Backup File
< Previous section | Table of Contents | Index | Next section >
You should backup your maintenance organization database on a regular basis. For an explanation of how to do this, see Backups or the Installation and Administration Guide.
To create a new database using data from a backup file, you can use Create New Organization from a Backup in the Maintenance Organization window (see Your Maintenance Organization List).
Important Notes about Restoring Databases: There are 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.
When you use Restore Organization, all MainBoss users will have the same MainBoss security roles that they did at the time the backup was created. In particular, the person who does the restore operation doesn't get any special permissions—just the ones that he or she already had at the time of the backup. On the other hand, Create New Organization from a Backup gives the creator all security roles on the new database, no matter what roles were originally recorded in the backup file. This lets the creator use the new database for any purpose.
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 that will be used 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 Create New Organization from a Backup, MainBoss displays a window that contains the following:
Database Server: The network location of the SQL Server through which you will access the database. For more information, see the Installation and Administration Guide.
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. For more, see The Database Server List.
Database Name: The name you want SQL Server to give to the new database. This name must be different from the names of any other databases on the server. For example, you can't name every database "MainBoss". If you want to see what MainBoss databases already exist, click the "..." button at the end of the "Database Name" line. (For more, see The Database Name List.)
Organization Name: A name that you personally will use for this database. It is not necessarily the name of the database itself (although it can be). Since this is just a label for your own convenience, it can contain blanks and other characters that aren't allowed in actual database names.
Make browsers smaller by not showing details for selected record by default: If you checkmark this box, MainBoss will automatically hide the details panel when displaying tables in this database. For more, see Hiding the Details for a Selected Record. Note that you can still ask MainBoss to display the details panel for a particular table by pressing the button for displaying details.
Preferred Mode: The default mode in which this database should be opened. If you do not specify a mode explicitly, the database will be opened in the given mode. For more on modes, see Your Maintenance Organization List.
Backup file: Fill in the field with the name of a SQL Server backup file containing a backup of a MainBoss database.
This field has an associated "..." button. If you are logged in to the same computer where SQL Server is running, clicking "..." opens a standard "file open" dialog to let you find the backup file you want.
If you are logged in to any other computer, the "..." button does nothing and you must type in the backup file's name by hand. The name should start with \\computer or a drive name (e.g. c:\), or else it should be relative to the SQL Server's default folder on the computer where SQL Server is running. (See above for more details on specifying the file name.)
Backup Set number: If the backup file contains multiple backup sets, use this field to specify which set you want to use.
Create Database from Backup: If you click this button, MainBoss submits a request to SQL Server asking to create the database you specified by restoring data from the backup file. You must have appropriate SQL Server permissions to create this database.
Close: Closes the window without creating a new database.
Note: Instead of using Create New Organization from a Backup, you may prefer to use the standard restoration facilities within SQL Server Management Studio or Management Studio Express. For more information, see the Installation and Administration Guide.
The Backup File List: When you create a new organization from a backup file, the new organization will have the same list of backup files (in Administration | Backups) as the original database. This can lead to serious confusion if you're still using the original database.
For example, suppose you intend to use Create New Organization from a Backup to create a test database using data from a backup of your production database. This is a valid (and sometimes useful) thing to do, but it means that your new test database will have the same list of backup files as your existing production database. If you try to use Administration | Backups to backup the test database, you may well overwrite one of your production backups. For this reason, when you create a test database, we strongly recommend that you edit the names in Administration | Backups to refer to new backup files that will not be the same as your production backups.
< Previous section | Table of Contents | Index | Next section >