Table of Contents
This article will help users troubleshoot an issue where a record in the msdb database fails to be made when doing a backup or opening the software.
It can be easy to get lost in the length of the error message, but there are a few key points in the message that can help you figure out what the cause is. For example, in the error below, the circled text says, "Could not insert a backup or restore history\detail record in the msdb database. This may indicate a problem with the msdb database."
You may also see an error message telling you that you don't have permission to access the location, or "access is denied." Check to see if there is a Permissions Conflict.
First, verify if a part of the SQL Server is corrupted. In the example below, the msdb files have been corrupted.
- Open SQL Server Management Studio and connect to your SQL database (either SQLEXPRESS or PBI_MYOVISION),
- If you are getting an msdb error in the MyoVision software, it is normal to get an error when connecting to your SQL Server. Click OK to continue.
- Once the server connects, you'll notice there's an Object Explorer bar on the left side with a set of tabbed options. Expand the Databases and System Database tabs.
- Locate the msdb database, right-click, and select Properties.
- If you get an error when trying to open the Properties, the msdb database files have become corrupted.
Once you have verified that part of the database has been corrupted, you can follow the steps in the rest of this article to get your SQL Server back up and running.
Follow the steps in the tabbed menu below to troubleshoot through the process to backup, uninstall, and reinstall your SQL Server manually.
**Note: In order to prevent data loss you must follow all of the steps listed in order.**
Backup of Raw Database Files
Before making any changes to your SQL Server, the most important step is to backup the raw data files that your current SQL Server uses to prevent any data from being lost or damaged.
- Navigate to C:\ProgramFiles(x86)\Microsoft SQL Server\MSSQL12.(either SQLEXPRESS or PBI_MYOVISION)\MSSQL\DATA\ using File Explorer.
- Hold down the Control Key on the keyboard. While holding down the Control Key, left click to select the MyoVision and MyoVision_log files.
- Create a new folder on the Desktop or another location that you will remember, and paste the copies of the files into this location.
Remove Old SQL instance
Once the raw data files have been backed up, you will need to remove the old instance of SQL Server.
- Open the Control Panel.
- Select the Programs and Features option.
- Find Microsoft SQL Server 2014 in the list. (If you are running an older version of MyoVision you may have Microsoft SQL Server 2008 R2 listed instead). Right-click the Microsoft SQL Server and select Uninstall/Change.
- When the SQL Server window opens select the Remove option.
- In the Select Instance window, select the instance of SQL that it's corrupted. Then click the Next button.
- On the Select Features screen click the Select All button then click the Next button.
- On the next screen click the Remove button.
- At this point the SQL Server uninstall program will remove your selected SQL Server instance. When it's done, click the Close button to finish.
Reinstall Instance of SQL Server
The next step is reinstalling the instance of SQL Server. If you are running an older version of MyoVision, some of the steps may be slightly different but they will be generally similar.
- Using File Explorer, Navigate to C:\WinScan98\SSE2014 then open the SETUP.EXE program.
- You will be asked if you would to allow the app to make changes to your computer, select Yes. When the SQL Server Setup window opens, choose the option "New SQL Server stand-alone installation or add features to an existing installation."
- When installing a new instance you will want to accept the license terms, then click the Next button.
- When prompted to select which features you want to install, click the Select All button, then click the Next button.
- When prompted to give your instance a name, select the Named instance option, then name the instance PBI_MYOVISION. The Instance ID should automatically change to match the Named instance box. Click the Next button.
- Leave the Server Configurations at the default settings, then click the Next button.
- On the Next screen select the Mixed Mode under Authentication Mode. In the password box enter MyoVision01. Click the Next button to continue.
- At this point the installer should continue run automatically. When it's complete click the Close button to finish.
Once the instance has finished installing, the next step is to restore your database information.
Restore Raw Database Files
In this next step the raw data files that were backed up in Step 1 will need to be restored into your new SQL Server instance.
- Navigate to the location you backed up the raw data files to, then while holding down the Control Key click on the MyoVision and MyoVision_log files. Right-click and select Copy.
- Navigate to C:\ProgramFiles(x86)\Microsoft SQL Server\MSSQL12.PBI_MYOVISION\MSSQL\DATA then paste the MyoVision and MyoVision_log files here.
- Open the MyoVision software. Open the Setup menu at the top, select the Database option.
- Click the Advanced button to show the Advanced options.
- Click the Attach button located under the Data File box.
- An Alert will pop up warning that it is not recommended to change these settings. Click Yes.
- Navigate to C:\ProgramFiles(x86)\Microsoft SQL Server\MSSQL12.PBI_MYOVISION\MSSQL\DATA, select the MyoVision file, then click Open.
- The software should tell you that the data file was successfully attached.If you received an SQL error when attempting to attach the data file make sure that the Service Name in the Database Setup menu matches the name of your SQL Server, then attempt to attach the database file again.