How to: Uninstall an Existing Instance of SQL Server 2008 (Setup)

SQL Server Setup

This article describes how to manually uninstall a stand-alone instance of SQL Server. By following the steps in this topic, you also prepare the system so that you can reinstall SQL Server.

Important:
To maintain or update an instance of SQL Server, you must be a local administrator with permission to log on as a service.

Consider the following important information before you use this procedure to uninstall SQL Server:

  • We recommend that you use Add or Remove Programs in Control Panel to uninstall SQL Server.
  • On a computer that is running SQL Server together with earlier SQL Server versions, Enterprise Manager and other programs that depend on SQL-DMO might be disabled. This can occur in the following situations:
    • Side-by-side installations of any combination of SQL Server 2008, SQL Server 2000, and SQL Server 7.0, where any one or more of these instances is uninstalled.
    • Side-by-side installations of SQL Server 2000 with SQL Server 2008, where SQL Server 2000 is installed after SQL Server 2008.
    This issue is caused by removal of the registration for the SQL Server SQL-DMO COM library. To re-enable Enterprise Manager and other programs that have SQL-DMO dependencies, register SQL-DMO by running regsvr32.exe sqldmo.dll at the command prompt. For more information, see Troubleshooting an Installation of SQL Server.
  • Before you remove SQL Server components from a computer that has the minimum required amount of physical memory, make sure that the page file size is sufficient. The page file size must be equal to two times the amount of physical memory. Insufficient virtual memory can cause an incomplete removal of SQL Server.
  • In SQL Server 2005, the SQL Server Browser was an integrated installation together with the Database Engine or Analysis Services. In SQL Server 2008, the SQL Server Browser is a separate installation, performed automatically with the Database Engine or Analysis Services. If you have multiple instances of SQL Server 2008, the SQL Server Browser will uninstall automatically when the last instance of SQL Server 2008 is uninstalled.
    If SQL Server 2005 exists on the system with one or more instances of SQL Server 2008, the SQL Server 2008 Browser will not be removed automatically when the last instance of SQL Server 2008 is uninstalled. The SQL Server Browser that is installed with SQL Server 2008 will remain on the system to ease connections to the instance of SQL Server 2005. You can leave the SQL Server 2008 Browser installed with SQL Server 2005 and it will continue to function correctly.
    To uninstall all components of SQL Server 2008, you must uninstall the SQL Server Browser component manually from Programs and Features in Control Panel. If you remove the SQL Server 2008 Browser when a SQL Server 2005 named instance is present, connectivity to SQL Server 2005 might be disrupted. In this situation, you can reinstall SQL Server Browser in one of the following ways:
    • Repair the instance of SQL Server 2005 by using Programs and Features in Control Panel.
    • Install an instance of the SQL Server 2005 Database Engine or Analysis Services.

Before you remove SQL Server, follow these steps:

  • Back up your data. You might have databases that you want to save in their present state. You might also want to save changes that were made to the system databases. If either situation is true, make sure that back up the data before you uninstall SQL Server. Alternatively, save a copy of all the data and log files in a folder other than the MSSQL folder. The MSSQL folder is deleted during uninstallation.
    The files that you must save include the following database files. These files are installed as part of SQL Server:
    • Distmdl.*
    • Master.*
    • Mastlog.*
    • Model.*
    • Modellog.*
    • Msdbdata.*
    • Msdblog.*
    • Mssqlsystemresource.*
    • Northwind.* (This database is an optional installation.)
    • Pubs.*
    • Pubs_log.*
    • Tempdb.*
    • Templog.*
    • ReportServer[$InstanceName] (This is the Reporting Services default database.)
    • ReportServer[$InstanceName]TempDB (This is the Reporting Services default temporary database.)
  • Delete the local security groups . Before you uninstall SQL Server, delete the local security groups for SQL Server components.
  • Save or rename Reporting Services folders. If you use the SQL Server installation together with Reporting Services, save or rename the following folders and subfolders:
    • <drive>\Microsoft SQL Server\Reporting Services
    • <drive>\Microsoft SQL Server\MSSQL\Reporting Services
    • <drive>\Microsoft SQL Server\<SQL Server instance name>\Reporting Services
    • <drive>\Microsoft SQL Server\100\Tools\Report Designer
      Note:
      If you used the SSRS configuration tool to configure the installation, the names might differ from the names in this list. Additionally, the databases might be located on a remote computer that is running SQL Server.

  • Delete the Reporting Services virtual directories. Use Internet Information Services (IIS) Manager to delete the following virtual directories:
    • ReportServer[$InstanceName]
    • Reports[$InstanceName]
  • Delete the ReportServer application pool. Use IIS Manager to delete the ReportServer application pool.
  • Stop all SQL Server services. We recommend that you stop all SQL Server services before you uninstall SQL Server components. Active connections can prevent successful uninstallation.
  • Use an account that has the appropriate permissions. Log on to the server by using the SQL Server service account or by using an account that has equivalent permissions. For example, you can log on to the server by using an account that is a member of the local Administrators group.

To uninstall an instance of SQL Server 2008

  1. To begin the uninstall process, from the Start menu, click Control Panel, and then double-click Add or Remove Programs.

  2. Select the SQL Server component to uninstall, and then click Change/Remove. This will start the SQL Server Installation Wizard.

  3. Setup Support Rules will run to verify your computer configuration. To continue, click Ok.

  4. On the Select Instance page, use the drop-down box to specify an instance of SQL Server to remove, or specify the option to remove only the SQL Server shared features and management tools. To continue, click Next.

  5. On the Select Features page, specify the features to remove from the specified instance of SQL Server. To continue.

  6. Removal rules will run to verify that the operation can complete successfully.

  7. On the Ready to Uninstall page, review the list of components and features that will be uninstalled.

  8. The Setup Progress page will display Setup status.

  9. On the Completing Setup page, click Close to exit the Installation Wizard.

  10. Repeat steps 2-9 until all SQL Server 2008 components have been removed.

See Also