SQL Error Code 20 - Database not Attached

Summary:

This article will guide you through the preliminary steps for troubleshooting an SQL 20 Error within the MyoVision Software.

The newest versions of the MyoVision software, have built-in features that allow the MyoVision software to restart and repair SQL services. Make sure to download and update before continuing.


Remember to stay up-to-date with your MyoVision Software. Visit our Download Page and select "Download Now" to begin using the newest Features and bug fixes. 

Before You Begin:

  • Make sure that you are using an account on the computer with Administrative privileges. 
  • Make sure that you are running MyoVision Software as an Administrator. Right-click the program and select "Run as administrator"



Click through the tabbed menu below to troubleshoot SQL 20 Errors:

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.


If the issue is still not resolved contact our technical support team.
Phone: (800) 969 - 6961 Option 2
Email: support@myovision.com