Sunday 7 January 2018

Edition Upgrade for Mirroring Configured Databases Instance

This is going to be a rolling edition upgrade from SQL Server Standard Edition to SQL Server Enterprise Edition, which is different from a rolling version upgrade from an older major version of SQL Server to a newer major version of SQL Server. If you need to do a rolling version upgrade, you can use log shipping or database mirroring to get it done with a very short outage (I can database mirroring is the best way). Here is some guidance from Microsoft about how to do a rolling edition upgrade: How to Minimize Downtime for Mirrored Databases when Upgrading SQL Server Instances.

Here is some background on the terminology that Microsoft uses to differentiate between the different flavors of the SQL Server boxed product.
We have the major version of SQL Server, which could be one of these:

  • ·         SQL Server 2005
  • ·         SQL Server 2008
  • ·         SQL Server 2008 R2
  • ·         SQL Server 2012


After this we have the edition of SQL Server, which depending on the major version involved could be one of these:

  • ·         SQL Server Express Edition
  • ·         SQL Server Workgroup Edition
  • ·         SQL Server Standard Edition
  • ·         SQL Server Business Intelligence Edition
  • ·         SQL Server Developer Edition
  • ·         SQL Server Enterprise Edition
  • ·         SQL Server Data Center Edition


Most people will be dealing with upgrading from SQL Server Standard Edition to SQL Server Enterprise Edition, which is what we will discuss here.
If you need to perform rolling edition upgrade, you need to make sure that you have an existing database mirroring partnership for all of the databases that need to be mirrored between the two instances. This is because SQL Server will prevent you from establishing a new mirroring partnership between databases that are on different editions of SQL Server. IF you see the below shown error message in the screenshot that you will get from the “Configure Database Mirroring Security Wizard” if you try to create a new mirroring partnership between a database on an instance running SQL Server 2008 R2 Standard Edition to a database running on SQL Server 2008 R2 Enterprise Edition.
Above is the Error Message When Trying to Create a New Mirroring Partnership between Different Editions of SQL Server

This means that you will need an existing mirroring partnership between your databases on the two instances before you attempt to do an Edition Upgrade of SQL Server from Standard Edition to Enterprise Edition. In order to minimize your downtime, and actually perform a rolling edition upgrade, you are going to want to upgrade the mirror instance first. You start this out by running Setup.exe from the SQL Server installation media, and then got to Maintenance TAB in the left hand pane of the screen you will find Edition Upgrade and click on this
Maintenance Screen Showing Edition Upgrade Option

After this, you just have to click though several different screens for various setup checks and licensing prompts as shown in below screenshots. The actual installation part of the Edition Upgrade will take about 30 seconds. During the install, the mirrored databases will go into a disconnected state for about 10 seconds, and then will automatically reconnect and change from a synchronizing to a synchronized state.
Setup Support Rules Screen Results

Product Key Screen

You will have to enter a valid product key for SQL Server 2008 R2 Enterprise Edition.
License Terms Screen

You must accept the license terms in order to proceed.
Select Instance Screen

Edition Upgrade Rules Screen

 Edition Upgrade Detailed Report Screen

Ready to Upgrade Edition Screen

After you click on Upgrade, it will take about 30 seconds to complete the process
Upgrade Complete Screen

Here is what you want to see when you are done with this instance.
SSMS showing Mirror instance upgraded to SQL Server 2008 R2 Enterprise Edition

Run the command SELECT @@VERSION which shows that this instance has been upgraded to SQL Server 2008 R2 Enterprise Edition. You can also see that the mirrored database has reconnected and is also synchronized. Your next step would be to failover all of the mirrored user databases from the original Principal instance (which is still running on SQL Server 2008 R2 Standard Edition) to this newly upgraded instance. After that, you would repeat the Edition Upgrade process on the other instance, with the same steps and results. After both sides of the mirroring partnership have been upgraded to SQL Server 2008 R2 Enterprise Edition, you would probably want to failover all of your mirrored user databases back to the original Principal instance so that you don’t end up violating the licensing requirements that allow you to only need licenses for the active side of the mirroring partnership.


FYI : We can also configure Mirroring between SQL Server 2008R2 Enterprise to Standard Edition by Using Script ( which is not possible to configure with GUI ) but it will not work when we did failover and  Standard to Enterprise Edition.

No comments:

Post a Comment

PowerShell script to backup/restore procedures for Migrating each database

  Below is the PowerShell script that will implement backup/restore procedures for each database which we want to migrate to complete the mi...