Skip to main content
All CollectionsAdvanced Fuctionaility
Reinstalling SQL Server 2008 Express R2
Reinstalling SQL Server 2008 Express R2
Angel Horowitz avatar
Written by Angel Horowitz
Updated over 6 months ago

Sometimes a problem occurs during the installation or operation of SQL Server and it needs to be completely reinstalled. These instructions will help you reinstall SQL Server while preventing any data loss.

Create a Backup of Your Database
You must make a backup of your information before making any changes to the system to prevent data loss1. Removing SQL Server always deletes your database. To retain your database information you will be required to restore a backup once you reinstall SQL Server. To backup your database:

  1. Open the software if possible and go to File > Backup and Restore > Backup Database.

  2. Follow the prompts to create a backup either on your computer's hard drive or on a USB flash drive. The particular location of the backup does not matter as long as it is a location you can remember and find later when the database needs to be restored.

​Copying Your Database Directly2
If you cannot make a backup of your database and the software has not been making automatic backups, then you can copy the database file directly from the SQL Server data. If you already have a backup, then skip to the Uninstall SQL Server 2008 Express R2 section.

  1. Go to Start Menu > All Programs > Microsoft SQL Server 2008 > Configuration Tools > SQL Server 2008 Configuration Manager

  2. Click on SQL Server 2008 Services on the left side.

  3. Stop the SQL instance that you were running your database on by right-clicking on the instance and then selecting Stop.

  4. Go to Start Menu > My Computer if you are using Windows XP, or go to Start Menu > Computer if you are using Windows Vista, 7, or 8.

  5. Typically, the database files are found in Local Disk (C:) > Program Files (x86) > Microsoft SQL Server > MSSQL.1 > MSSQL > Data.

  6. Locate the files 123Pet.mdf and 123Pet.ldf. Highlight these two files, right-click, then select Copy.

  7. Find a location that is appropriate (like Desktop), right-click, and select Paste to make a copy of your database files.

Uninstall SQL Server 2008 Express R2

  1. ​​​Close the software on the computer if it's open.

  2. Go to Windows Start > Control Panel.

  3. Double-click on Add or Remove Programs if you are using Windows XP or Programs and Features if you are using Windows Vista, 7, or 8.

  4. Look for items listed under Microsoft SQL Server.There should be at least four items listed. Two of these need to be removed: Note: removing these will also delete your database. Make sure you have made or found a recent backup file of your database to prevent data loss.

    • Microsoft SQL Server 2008

    • Microsoft SQL Server Native Client

  5. Remove Microsoft SQL Server 2008.

    1. Select Microsoft SQL Server 2008 in the list of programs and Remove or Uninstall.

    2. You will be prompted to select which instance to remove. Eventually, you need to remove all instances. If there is only one choice, then select the bullet point next to this instance. If there are multiple instances, then pick the first one and you will need to come back to this step later to remove the other(s).

    3. On this same screen, if you are given the option, check the box next to Worskstation Components under Remove SQL Server 2008 common components.

    4. Click Next.

    5. Select Finish on the following screen. This will begin the process of removing SQL Server. This process should take several minutes to finish.

    6. If you originally had two or more instances of SQL Server, then repeat Steps A-E of this section for each remaining instance. Common SQL instances that you encounter will be CMJ and SQLEXPRESS​.

  6. Remove Microsoft SQL Server Native Client​.

    1. Select Microsoft SQL Server Native Client from the list of programs and select Remove or Uninstall.

    2. The Native Client should be uninstalled automatically.

  7. Check your program list for a program called Microsoft SQL Server Desktop Engine. If you see this program, then you should uninstall it the same way you uninstalled the Native Client. If you do not have this program installed, then skip to the next section.

Reinstall SQL Server Express R2

  1. Download the installation file here.

  2. Run the installation file.

  3. Follow the prompts given by the installer. It may take several minutes to install.

  4. Open 123Pet again when it's finished.

​Restore the Database Backup
Since reinstalling SQL Server deletes your previously created database, you will need to restore that database from the backup created earlier.

  1. In the software, go to File > Backup and Restore > Restore Database.

  2. Click on Restore Database from Backup.

  3. Choose Restore a database from a specific location.

  4. Click Next.

  5. Browse to the location where you saved the backup and double-click it.

  6. If you originally set a database password, then you will be prompted to enter it at this time.

  7. Your database will be restored into your software.

Restore from a Copy of a Database File
If you could not make a backup file or had no automatic backup files, then you can use your copied database files to restore your previously created database.

  1. Open the software and when prompted create a Blank Database.

  2. Close the software.

  3. Go to Start Menu > All Programs > Microsoft SQL Server 2008 > Configuration Tools > SQL Server 2008 Configuration Manager.

  4. Click on SQL Server 2008 Services on the left side.

  5. Stop the SQL instance by right-clicking on the name and selecting Stop.

  6. Locate the files 123Pet.mdf and 123Pet.ldf from the location that you copied them to earlier. Highlight these two files, right-click, then select Copy.

  7. Go to Start Menu > My Computer if you are using Windows XP or Start Menu > Computer if you are using Windows Vista, 7, or 8.

  8. Typically, the database files need to be pasted to Local Disk (C:) > Program Files > Microsoft SQL Server > MSSQL.1 > MSSQL > Data.

  9. Find the appropriate file location of the new Blank Database that you created and then right-click and select Paste to copy the database files.

  10. Choose Replace, or Replace and Copy for both files.

  11. Go to Start Menu > All Programs > Microsoft SQL Server 2008 > Configuration Tools > SQL Server 2008 Configuration Manager.

  12. Click on SQL Server 2008 Services on the left side.

  13. Start the SQL instance by right-clicking on the name and selecting Start.

  14. Open your software and your database will be restored.

​1If you cannot open your software to create a database, check for your most recent automatic backup file. If you have not been making automatic backups, then you can make copies of your database files directly.

2We recommend making copies of your database files as a last resort. DaySmart Software, Inc. is not responsible for data lost from customer manipulation of the SQL database files.

Did this answer your question?