For a Microsoft SQL Server 2005 version of this article, see 909967.
For a Microsoft SQL Server 2000 version of this article, see 290991.
This article describes how to uninstall a stand-alone instance of Microsoft SQL Server 2008. When you follow the steps in this article, you also prepare the system so that you can reinstall SQL Server 2008.Note To maintain or to update an instance of SQL Server 2008, you must be a local administrator who has permission to log on as a service.
What to consider before you uninstall a stand-alone instance of SQL Server 2008
On a computer that is running SQL Server 2008 together with earlier versions of SQL Server, Enterprise Manager and other programs that depend on SQL-DMO might be disabled. This issue may occur in the following situations:
Side-by-side installations of any combination of SQL Server 2008, SQL Server 2000, and Microsoft SQL Server 7.0 in which one or more of these instances is uninstalled
Side-by-side installations of SQL Server 2000 and SQL Server 2008 in which SQL Server 2000 is installed after SQL Server 2008
This issue occurs when the registration for the SQL Server SQL-DMO COM library is removed.
To re-enable Enterprise Manager and other programs that have SQL-DMO dependencies, register SQL-DMO. To do this, open a command prompt, type the following command, and then press ENTER:
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 physical memory. Insufficient virtual memory can cause an incomplete removal of SQL Server.
In SQL Server 2008, the SQL Server Browser is a separate installation that is performed automatically with the Database Engine or Analysis Services. If you have multiple instances of SQL Server 2008, the SQL Server Browser is uninstalled automatically when the last instance of SQL Server 2008 is uninstalled. However, if SQL Server 2005 exists on the system together with one or more instances of SQL Server 2008, the SQL Server 2008 Browser is not removed automatically when the last instance of SQL Server 2008 is uninstalled. The SQL Server 2008 Browser that is installed together with SQL Server 2008 remains on the system to ease connections to the instance of SQL Server 2005.
You can leave the SQL Server 2008 Browser installed together with SQL Server 2005. The SQL Server 2008 Browser will continue to function correctly.
To uninstall all components of SQL Server 2008, you must uninstall the SQL Server 2008 Browser component by using the Add or Remove Programs feature 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 the SQL Server 2008 Browser by using one of the following methods:
Repair the instance of SQL Server 2005 by using the Add or Remove Programs feature in Control Panel.
Install an instance of the SQL Server 2005 Database Engine or Analysis Services.
Before you uninstall an instance of SQL Server 2008
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. In either situation, make sure that you back up the data before you uninstall SQL Server. Or, save a copy of all the data and the log files in a folder other than the MSSQL folder. (The MSSQL folder is deleted during the uninstallation process.)
The files that you must save include the following database files.
Note These files are installed as part of SQL Server.
Northwind.* (This database is an optional installation.)
ReportServer[$InstanceName] (This file is the Reporting Services default database.)
ReportServer[$InstanceName]TempDB (This file 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\MSRS10.SQL Server instance name\Reporting Services
In these files, drive is a placeholder for the drive on which SQL Server 2008 is installed.
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 2008.
Delete the Reporting Services virtual directories.
Use Internet Information Services (IIS) Manager to delete the following virtual directories:
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.
How to uninstall an instance of SQL Server 2008
Note SQL Server setup is a complicated process. SQL Server setup modifies lots of registry keys and DLL files. SQL Server setup also installs and updates permission entries and service registrations.
We test SQL Server setup procedures, both installation and uninstallation, in many configurations. However, we cannot test all configurations due to the number of third-party products and customer specific changes that can occur at the operating system level. Therefore, you may encounter rare circumstances that prevent successfully installing or uninstalling SQL Server by using the setup program.
Because of these complexities, the SQL Server Support team may recommend that you reinstall the operating system if the procedures outlined in this article do not help perform a clean uninstall of the SQL Server program. This helps provide a clean platform to reinstall SQL server on your system.
Open the Programs and Features item in Control Panel.To do this, click Start, type appwiz.cplin the Start Search box, and then click appwiz.cpl in the Programs list.
Select the SQL Server component to uninstall, and then click Change/Remove. This will start the SQL Server Installation Wizard. Suggested uninstall order
SQL Server FullText
Data Quality Services (DQS)
SQL Server (Database Engine), Replication
Analysis Services in SharePoint integrated mode
SQL Server (Database Engine), Analysis Services
SQL Server Management Tools – Complete, Backwards Compatibility, SDK, Connectivity
SQL Server Management Tools – Basic
Business Intelligence Development Studio
Data Quality Client
Distributed Replay client
Distributed Replay controller
Reporting Services SharePoint Web Front-end
Reporting Services SharePoint
Business Intelligence Development Studio, SQL Server Management Tools - Complete
Business Intelligence Development Studio, SQL Server Management Tools - Basic
SQL Server Management Tools
SQL Server (Database Engine), Business Intelligence Development Studio, SQL Server Management Tools
Business Intelligence Development Studio, Integration Services
Setup Support Rules will run to verify your computer configuration. To continue, click Ok.
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.
On the Select Features page, specify the features to remove from the specified instance of SQL Server. To continue, click Next.
Removal Rules will run to verify that the operation can complete successfully.
On the Ready to Uninstall page, review the list of components and features that will be uninstalled.
The Setup Progress page will display Setup status.
On the Completing Setup page, click Close to exit the Installation Wizard.
Repeat steps 2-9 until all SQL Server 2008 components have been removed.
If the Uninstallation Fails
If the uninstallation process does not complete successfully, try to fix the problem that caused the uninstallation to fail. The following articles can help you understand the cause of the failed uninstallation:
If you are unable to fix the cause of the uninstallation failure, you can contact Microsoft Support. In some cases, such as unintentional deletion of important files, reinstalling the operating system may be required before reinstalling SQL Server on the computer.
Microsoft SQL Server 2008 Developer, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 Express, Microsoft SQL Server 2008 Express with Advanced Services, Microsoft SQL Server 2008 Standard, Microsoft SQL Server 2008 Standard Edition for Small Business, Microsoft SQL Server 2008 Web, Microsoft SQL Server 2008 Workgroup, Microsoft SQL Server 2008 R2 Developer, Microsoft SQL Server 2008 R2 Enterprise, Microsoft SQL Server 2008 R2 Express, Microsoft SQL Server 2008 R2 Express with Advanced Services, Microsoft SQL Server 2008 R2 Standard, Microsoft SQL Server 2008 R2 Standard Edition for Small Business, Microsoft SQL Server 2008 R2 Web, Microsoft SQL Server 2008 R2 Workgroup, Microsoft SQL Server 2008 R2 Datacenter