Common SQL Server Errors and Solutions

Table of Contents


This article will explain what some of the commonly seen SQL errors are as well show you how to resolve them.

If the options inside of your MyoVision software look different make sure you are using the most recently released version of MyoVision.
Visit our Download Page, then select Download Now to stop missing out on all newest the features, bug fixes, and typos.

**NOTE: The name of your SQL service could be either SQLEXPRESS or PBI_MYOVISION**

Before you begin:

  • Make sure that you are logged into an Administrator account on your computer. If you are unsure how to run a program as an Administrator, follow the instructions on this site to find out. Are you an Administrator?
  • Make sure that the only antivirus software installed on your computer is Windows Defender (Windows 8, 8.1, and 10 users only) or Microsoft Security Essentials (Windows 7 users only). For more information on antivirus software and MyoVision Click Here.
  • Close all programs, apps, and dialog boxes. The computer must be in a completely neutral state.
  • If you are experiencing multiple SQL errors or are unsure of which SQL error you are getting, start with the troubleshooting tips in the SQL 10 portion of this guide and continue through, following the steps as you go.

SQL Error 80004005

The wording on your SQL error may be different than the one listed below. This error is letting you know that the SQL (the language that the software uses to store patient databases) is unable to communicate with the software. Until the error is corrected the software won't let you open an exam, start an exam, or backup your database. 

Make sure to go through each step of this guide. After you complete all the steps for resolving an error type, you will want to try opening an exam to see if the issue has been resolved. 

SQL Errors can also be cause when a backup file is corrupt or no longer accessible. This type of error occurs when starting the software and when attempting to make backups. If you are experience SQL errors when attempting make backups skip to: SQL Error Backup Device.

SQL Error - Error Code 10 (Services Not Installed)

When the software gives you the following SQL Error 10 Service Not Installed it means that the MyoVision software isn't detecting that the SQL Server instance it's being pointed at exists.

For more information on the error Click Here.

Step 1: Check That SQL Server is Installed

First we will check to see if the SQL service is installed on the computer.

  1. Open the Setup menu and select the Database option.
  2. Inside of the Window that opens click the Local Services button.
  3. A Warning Prompt will appear when you click the Local Services  button. Select Yes inside of the prompt to continue.
  4. When the services window opens look for the SQL Server (PBI_MYOVISION) service. (On some computers it is listed as SQLEXPRESS)
  5. If the service is missing move to Step 2: Installing SQL Server 2014.
  6. If the service is located on the list. Make note of the name of your SQL Server service. Back in the Database Setup of the MyoVision software check to make sure that the service name matches the name of your service.
  7. If you are running a network database instead of (local) it should say the name of network server. 

Step 2: Install SQL Server 2014

Once you have verified that the SQL service is not installed on the computer, the next step is to use the SQL Server install file that comes with MyoVision to get SQL Server 2014 installed an setup.

  1. Navigate to C:\\Winscan98\SSE2014 then look for the Setup file.
  2. Right-click SETUP.EXE and select Run as administrator.

  3. Choose the New SQL Server stand-alone installation option.
  4. Choose the Perform a new installation of SQL Server 2014 optionThen, click Next.
  5. After the installer runs its checks, check the box next I accept the license terms.
  6. On the Feature Selection screen click the Select All button, then click Next.
  7. On the Instance Configuration screen select the Named Instance option. Name the instance PBI_MYOVISION, the instance ID should auto-fill to match the name.
  8. Make sure that the Startup type for the SQL Server Database Engine and SQL Server Browser is set to Automatic. Then click Next.
  9. On the Database Engine Configuration screen, select Windows authentication mode if you are using a local database. If you are using a networked database select Mixed Mode and enter "MyoVision01" as the password.
  10. On the Specify SQL administrators page, click Add, Advanced, then Find Now, Scroll down and select Users. Click OK until you're back at the setup window. Then, click Next.
  11. Wait for SQL Server 2014 to finish installing.
  12. When the SQL Server install finishes click Close.
  13. After you click Close move on to Step 3: Test Database.

Step 3: Test the Database

After installing SQL Server 2014 you will want to perform test connection using the MyoVision TestDB function.

  1. In the MyoVision software, open the Setup menu then select the Database option.
  2. In the Database Setup window, click the Test DB button. This button makes a test connection to your SQL Server database.

  3. If the connection was successful the following message should appear, and full access to your patient database should be restored.
  4. Open an exam to make sure that your database is working properly.

SQL Error - Error Code 10 (Services Not Running)

If the SQL Server is installed on your computer and you are still experiencing the SQL ERROR CODE 10, you'll want to verify that the SQL Server is running. Follow the steps in the tabbed menu below for a guide on verify that the SQL Server is running.

For more information on these steps Click Here.

Step 1: Open Services Window

1. Open the Setup menu and select Database

2. Click the the Local Services button

3. Choose Yes on the Warning Prompt

Step 2: Find and Check the SQL Service

In the Services window, scroll down to SQL Server (SQLEXPRESS) or SQL Server (PBI_MYOVISION). Most users will only have one instance. The name of this instance will depend on what version of the MyoVision software you are running and when it was originally installed.

  1. Highlight your instance
  2. In the Status column, check for Running if you're running Windows 10 or Started in older versions of Windows
  3. If status is blank, click on "Start the service" in the left panel.

If you don't see SQL Server listed, or no instanced named SQLEXPRESS or PBI_MYOVISION you may need to install SQL Server 2014.

Step 3: Check the Service Startup Type

Check that the Startup Type says Automatic. If it doesn't say automatic:

  • Right click the instance and select Properties
  • In the drop down box by Startup Type select Automatic
  • Click OK

  • Right-Click the SQL Server service and select Restart

Tutorial Video: SQL 10 Service Not Running

Watch the video below for instructions on how to check if the SQL Server service is running.

Network Databases

  1. Make sure to follow the Steps 1 through 3 for your Server computer.
  2. On the computer that is getting the error, check to make sure that your service name inside of Setup > Database is set to the name of the server computer (1) and not (local) (2).

SQL Error - Error Code 20

The SQL ERROR CODE 20 message means that the MyoVision software detects that the the SQL Server service is running, but the software is unable to communicate with the SQL Server data file. Follow the steps below for a guide on how to reconnect the MyoVision software to your SQL Server data file.

For more information on these steps Click Here.

Step 1: Re-Attach Raw Data File

1.  Open up the Setup menu, then select Database.

2. Click on the Advanced button to display the advanced options.

3. Click on the Attach button.

4. When the Alert message appears, select Yes.

5. Now you will need to navigate to and open your raw database files.

  • The default data file directory is: 
    C:\ProgramFiles(x86)\Microsoft SQL Server\MSSQL {NAME OF YOUR SQL INSTANCE*}\MSSQL\DATA
  • Once you're at the above location, select the MyoVision file and click Open. 
  • If the MyoVision data file is missing or you get an SQL Error when trying to attach the file, skip to Step 2: Copy Raw Data Files

 Step 2: Copy Raw Data File 

1. Open File Explorer and navigate to C:\\Winscan98\SSE2014

2.  Using CTRL + left-click select both the MyoVision and the MyoVision_log files3. Right-click and select Copy.

4. Navigate to C:\\ProgramFiles(x86)\Microsoft SQL Server\MSSQL{NAME OF YOUR SQL SERVER}\MSSQL\DATA, then right-click and select Paste.

5. Now that the data file has been copied back into the SQL Server folder, Follow the steps in Step 1: Re-Attach Raw Data File to make sure your data file is attached.

Step 3: Set Permissions

1. Open Services2. Scroll down to  SQL Server (NAME OF YOUR SQL SERVER), then right-click and select Stop. Make sure you don't close your Services window, as we will need to start the service back up later on.

3. Open File Explorer and navigate to: C:\\ProgramFiles(x86)\Microsoft SQL Server\MSSQL{NAME OF YOUR SQL SERVER}\MSSQL\DATA

4. Select the MyoVision file, right-click, and select Properties.

5. In the window that opens left-click to open the Security Tab. "Group or usernames" look to see if Users is listed. If it is skip ahead to part 9 of this step.

6. If Users is not listed click the Edit button.

7. In the Permissions window that opens Click the Add button

8. In the box labeled "Enter the object names to select..." enter "Users". Next, click the Check Names button. Then click OK.

9. Once you've clicked OK, you will be brought back to the Permissions window. Check to make sure that "Users" is listed under "Group or user names". left-click Users to edit permissions for Users. Then, under the Permissions for Users are left-click the box under the Allow column for Full control. This will give Users full access to file. Click OK to close the window.
10. Click OK inside the properties window to exit and save your settings.

11. Back in the Services window right-click the SQL Server and select Start.

12. Try to open an exam and see if the server is working properly again.

Step 1: Re-Attach Raw Data Files

The video below will guide you through the process of re-attaching your raw database files to MyoVision SQL Service.

Step 2: Copy Raw Data Files

The video below will guide you through the process of copying raw database files into the SQL Server folder.
After completing this step go back and repeat Step 1: Re-Attach Raw Data File.

Step 3: Set SQL File Permissions

The video below will guide you through the process of setting the permissions on your raw SQL File.
After completing this step restart the computer, then go back and repeat Step 1: Re-Attach Raw Data File.

Additional Troubleshooting Steps

Follow the steps in the tabbed menu below if you are still experiencing an SQL Error after following the steps above.

Changing SQL Server Permissions

**Note: You must perform the following steps while logged in as the original user account that installed MyoVision.

To perform the steps below you will need to SQL Server Management Studio installed. Do a search in your start menu to see if you have it installed already. If you do not see it, head to Microsoft's Download Page, click Download.

Scroll to the bottom of the options and download the appropriate version of SQL Management Studio x86 is for 32bit operating systems and x64 is for 64bit.

How to Check if Windows is 32 bits or 64 bits.

Once it finished downloading, run the installer. You will want to "add features" to an existing instance.

  1. Open Microsoft SQL Server Management Studio. "Server name" will automatically be filled in based on your information from your computer. Make sure to check that the "Server name" matches the name of your server in the MyoVision software. This can be found by open the Setup menu then selecting Database. The name should be either PBI_MYOVISION or SQLEXPRESS. Once you've verified the name click Connect to continue.

  2. When the window opens you will see a list of folders running down the left-hand side. Locate the Security folder, should be second from the top.

  3. Expand this list of folders by double-clicking on the folder and locate BUILTIN\Users nested under Logins

  4. Double-click BUILTIN\Users and then select Server Roles. Check the box next to sysadmin as shown in the screen below. Click OK to continue.

  5. After changing this setting you will want to close all your Windows and Restart the computer.
  6. Once the computer has restarted try opening an exam to test if your issue has been resolved.

Check for Database Compression

This section will walk you through the steps necessary to decompress your database. If you have recently ran Windows Disk Cleaner it may have automatically compressed your database to save space, unfortunately this breaks proper communication with the database and we have to stop compressing it.

Make sure that you close the MyoVision software before you continue.

  1. Navigate to C:\\ProgramFiles(x86)\Microsoft SQL Server there should only be one MSSQL folder inside the Microsoft SQL Server folder, but if there is more than one follow the steps below for each MSSQL folder.
  2. Open the MSSQL Folder then the DATA folder.
  3. Right-click the MyoVision file and select Properties.
  4. In the properties window click on the Advanced button.
  5. Untick the box that is next to Compress contents to save disk space. Then click OK. Click Apply in the Properties window and then OK. 

  6. When the file is compressed it should appear blue. After changing the compress settings it should be black.

  7. Open the MyoVision sfotware. Your problem should be resolved.

Check For a Read-Only Status

In order to check if your SQL Server is set to Read-Only you will need to have SQL Management Studio installed. If you don't have SQL Management Studio installed, read through the instructions listed under Change SQL Permissions to get SQL Management Studio installed.

If your MyoVision database is marked as read-only, you will be able to open and view existing exams. However every time you save a new exam, move an exam between patients, or try to edit a Patient's information you will get an SQL Error.

  1. Open Microsoft SQL Server Management Studio. "Server name" will automatically be filled in based on your information from your computer. Make sure to check that the "Server name" matches the name of your server in the MyoVision software. This can be found by open the Setup menu then selecting Database. The name should be either PBI_MYOVISION or SQLEXPRESS. Once you've verified the name click Connect to continue. 

  2. When the Windows opens double-click on the databases option to expand the list. If your MyoVision database is marked as (Read-Only) then your database will not function properly until you have completed all the steps listed in this tab.

  3. Right-click "myovision" and choose Properties.

  4. On the left-hand side select Options.

  5. At the bottom of the Options list find the Database Read-Only and set it to False.

  6. Click OK to save your settings and try to save a new exam.

If there is a possibility that your SQL Server has been corrupted, the best option is to Reinstall your SQL Server (click the link provided for further instructions on how to reinstall your SQL Server.)

SQL Error Backup Device

When an SQL error is only occurring when the software first loads, or when a backup is made normally you will see an error similar to the one below.

This type of error is created when the MyoVision software is unable to access the temporary file that it uses to create backups.

Delete Temp File

If you have changed the permissions on the BackupDBTemp.tmp file in the previous tab and you are still getting the SQL Error when making backups, the next step is to try deleting the BackupDBTemp file in case it has become corrupted or damaged.

  1. Open Windows File Explorer and click on the View tab of the top menu. Check the Hidden Items box, then navigate to C:\ProgramData\Precision Biometrics Inc\MVSW\Temp.
  2. Locate the BackupDBTemp.tmp file, right-click the file, and select Delete.

  3. Open the MyoVision software and click the Backup button in the top toolbar. Select a location for your test backup and click Save. If the error has been resolved the software should let you know that the backup was successful.

Correcting Permissions Issues with Data Backups

**Make sure you are logged in as an Administrator on your computer before continuing.** 
To fix the error and restore your ability to do backups follow the steps below.

  1. Navigate to C:\ProgramData\Precision Biometrics Inc\MVSW\Temp on your computer using file explorer.The ProgramData folder is usually a hidden folder. To show hidden items click on the view tab of Windows Explorer, click the View tab then click the box next to Hidden items.

  2. Locate the file BackupDBTemp.tmp, right-click the file and select Properties.

  3. Click on the Security tab, then click on the Edit button.

  4. In the list of Groups and Users, select the Users (YOURCOMPUTERNAME-PC\Users) option. Then click the Allow box next to the Full Control option. Click OK to save your change.
    **If Users (YOURCOMPUTERNAME-PC\Users) is not listed click the Add button. In the window that opens type, Users into the message box and click OK to add it to the list.

  5. Click OK to exit out of the Properties window to save your permissions.

At this point your ability to make backups should be restored. Open the MyoVision software and click the Backup button to create a test Backup.If you are still getting an SQL Backup Error you will want to attempt to delete the temp file. (See Tab for more instructions.)

Tutorial Video: Change Permission

You can also watch the video below for instructions on how to change the Permissions on the *.tmp file.

SQL Error on Network Database

SQL Errors that occur on a network database will typically require more troubleshooting.
For more information on how to troubleshoot SQL Errors on network databases you can Click Here.