MainBoss Logo   
 
HOME  |  DEALERS  |  CONTACT  |  COMPANY INFORMATION 
 
Support
Frequently Asked Questions
    MainBoss Advanced
        Report Viewer
        Error in server login
        Work orders and purchase orders
        Error the first time you print
        Problems adding new users
        Features disappear after upgrade
        Unable to get exclusive lock
        Sharing reports
        Units and Unit Locations
        Calendar vs. version license keys
        Expired licenses
        Exporting to Excel
        Changing a login name
        PM generation details
        PM generation speed-up
        Sending SMS text messages
        Can't start/stop MainBoss Service
        Missing ReportViewer
        @Requests install (before 3.3)
        @Requests uninstall (3.0)
        Raw HTML (gobbledygook) in e-mail requests
        NULL in "ReceiveAcknowledgement"
        F1 key doesn't open online help
        Moving a database
        Database restore problems
        Links in e-mail don't work
        Huge number of generated work orders
        Firewall off or on
        Access from outside a domain
        Icons used in MainBoss
        Bar codes
        MainBossRemote under IIS 6
 
    Known Problems
 

I'm trying to restore a database backed up from MainBoss, but I'm getting errors. What should I do?

In the error window, click Details to gather more information about the problem. Here are some messages you might see.

Unable to gain exclusive access to the database

This error is displayed because there is still a "user" logged into the database. This may be a normal MainBoss user, but it might also be one of the following:

  • MainBoss Service (i.e. the software that processes incoming and outgoing e-mail requests).
  • Someone logged in to the database using SQL Server Management Studio or Management Studio Express.
  • An "orphaned" session resulting from a computer crash. (If someone on the crashed computer was using MainBoss at the time of the crash, MainBoss doesn't know that the user's session has been cut off. MainBoss will think that the user is still connected.)

To correct this, you can use SQL Server Management Studio or Management Studio Express.

  1. Login to an account that has SQL Server Administration privileges on the computer where SQL Server is running.
  2. Start SQL Server Management Studio or Management Studio express.
  3. As the program starts up, specify the instance of SQL Server that manages the MainBoss database.
  4. In the left-hand panel, expand the entry for Databases.
  5. In the resulting list of databases, right-click on the entry for the MainBoss database, and then click Properties.
  6. In the resulting window, click on Options (under "Select a page").
  7. In the "State" section of "Other Options", click the drop-down arrow associated with "Restrict Access" and change the value to SINGLE_USER. This will give your current login name exclusive access to the MainBoss database.
  8. Click OK.
  9. Start MainBoss and do the desired restore.
  10. Once the restore process is finished, follow the above steps again and set "Restrict Access" back to MULTI_USER.

The media family on device 'C:...file.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally (Microsoft SQL Server, Error: 3241)

This error occurs if the backup was made by one version of SQL Server, but you are trying to open it in a different (older) version. In general, older versions of SQL Server cannot restore backup files made by newer versions.

User does not have permission to restore the database

This error is displayed because the user account was created on the SQL server by a system administrator or by a user who isn't the user attempting the restore. The error is because they are not the database owner (dbo) and they do not have the dbcreator role. Depending on what the IT department will accept, you can correct this in one of the three following ways:

  1. Add the user to SQL Server's dbcreator role. You can do this by executing the following query in SQL Server Management Studio:
    EXEC sp_addsrvrolemember 'DOMAIN\LOGINNAME','dbcreator'
    
    where DOMAIN\LOGINNAME is the domain and login name of the person who'll be doing the restore. Once you have entered this query, press F5. This will add the user to the dbcreator role for all databases managed by this instance of SQL Server. This permission allows the user to create any database and will also enable the user to drop or alter any database across the entire server. This is therefore an extremely powerful permission that affects the entire SQL Server.
  2. Add the user as the database owner (dbo) for the MainBoss database. You can do this by logging into to an account with SQL Server Administration privileges and executing the following query in SQL Server Management Studio:
    USE MainBossDatabase
    EXEC sp_changedbowner 'DOMAIN\LOGINNAME'
    
    where MainBossDatabase is the name of the MainBoss database and DOMAIN\LOGINNAME is the domain and login name of the person who'll be the new owner. Once you've typed in the above, press F5. This will add the user to the database owner role for the MainBoss database. The new owner will be able to create, delete, and alter the database.
  3. Grant the user CREATE status. You can do this by logging into to an account with SQL Server Administration privileges and executing the following in SQL Server Management Studio:
    USE master
    GRANT CREATE ANY DATABASE to 'DOMAIN\LOGINNAME'
    
    where DOMAIN\LOGINNAME is the domain and login name of the person to whom you want to grant the privilege. Once you've typed in the above, press F5. This gives the CREATE privilege to the specified user. The user will then be able to create databases, but will only be able to alter or delete the ones they create.

Back to FAQ index