Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Monday 23 June 2014

Steps to Downgrade from SQL Server Enterprise Edition to Standard Edition

Downgrade from SQL Server Enterprise Edition to Standard Edition

Ref:  http://www.mssqltips.com/sqlservertip/3079/downgrade-from-sql-server-enterprise-edition-to-standard-edition/

Steps:
1.Create DB Backups
2.Check for Enterprise Features
3.Check Version and Build Number
4.Shut down SQL Server Services and Copy System Databases
5.Uninstall SQL Server
6.Reboot System
7.Install New SQL Server Edition( Standard Edition Here)
8.Install SQL Server Patches (To Equal Version Number)
9.Shut down SQL Server Services and  Paste System Databases From where We saved location
10.Start SQL Server.

Create Database Backups

As always, before doing anything drastic (or non-drastic), BACKUP all the databases (system and user)! Also, if you have a development environment, please test on it first.

Check for Enterprise features

After backing up the databases run the following query on each database:
SELECT * FROM sys.dm_db_persisted_sku_features
This DMV will tell you whether or not the database is utilizing any of the Enterprise features. You can find more information regarding this DMV from this tip.

Check Version and Build Number

Because you never know when an install may fail, check the version and build number of the current SQL Server. After the downgrade, you will need to bring the new SQL Server back to the patch level. You can view this information by executing the following command:
SELECT @@VERSION

Check Version and Build Number
Save the results to a text editor.

Decision...

There are two different directions we can go from here.
  1. We can do the traditional uninstall Enterprise, install Standard, patch, restore databases
  2. Or we can do what I call "The Jonathan Kehayias" approach. (I saw this method awhile back from a forum post by Jonathan):

Copy System Databases

Shutdown the SQL Server service and copy the master, model and msdb database files (.mdf and .ldf) to another location. We will need these later:
hutdown the SQL Server service and copy the master, model and msdb database files

Copy System Databases

Uninstall SQL Server

Uninstall SQL Server from Control Panel:
Uninstall SQL Server from Control Panel
You only need to uninstall the Instance (includes SSIS, SSAS, SSRS, SSDT). There is no need to uninstall the Shared Components (SSMS, Client Tools, and Connectivity).
You only need to uninstall the Instance (includes SSIS, SSAS, SSRS, SSDT)

There is no need to uninstall the Shared Components (SSMS, Client Tools, and Connectivity)

Reboot

Reboot

Reboot the server. After rebooting, browse to the location of the data files and you will notice that the user databases weren't removed with the uninstall, but the system databases were. This is why we copied them in the step above:
After rebooting, browse to the location of the data files and you will notice that the user databases weren't removed with the uninstall, but the system databases were.

Install New SQL Server Edition

Enterprise Edition should be completely removed from the system now. Insert/Mount the media for SQL Server Standard and install. The install should be pretty straight forward. To make things easier in the end, make sure the name of the instance remains the same and the Data Directories point to the correct location.
Once SQL Server is finished installing, open SQL Management Studio and connect to the newly installed instance.
If you expand Databases, Security/Logins, SQL Server Agent/Jobs, etc. you will see it looks like a fresh copy of SQL Server.
If you expand Databases, Security/Logins, SQL Server Agent/Jobs, etc. you will see it looks like a fresh copy of SQL Server
Also, if you run the following command you will see that the version has changed to Standard Edition:
SELECT @@VERSION

Also, if you run the following command you will see that the version has changed to Standard Edition

Install SQL Server Patches

In this example, you will also notice that the build number has changed from 11.0.3000.0 to 11.0.2100.60 so I will need to install the correct patches to bring this server back to 11.0.3000.0.
(11.0.3000.0 is SQL Server 2012 SP1)
Download the correct patches and install on the server before doing anything else.
Once the patches are installed check the server to make sure it's at the same build number as it was before.

Copy System Databases

Shutdown the SQL Server service and copy the master, model and msdb database files (.mdf and .ldf) from the location you saved them in to the new location for the new install.
Copy System Databases

Shutdown the SQL Server service and copy the master, model and msdb database files

Start SQL Server

After copying the system files to the new location you can start SQL Server again:
After copying the system files to the new location you can start SQL Server again
Once SQL Server comes back online, you should see all the databases, logins, jobs, etc. back to normal:
Once SQL Server comes back online, you should see all the databases, logins, jobs, etc. back to normal

No comments:

Post a Comment