Minimize downtime during migration from 2008 to 2014 and set up of availability group

  • We plan on migrating from a A/P cluster running Sql Server 2008 to a shared nothing cluster running Sql Server 2014 with a single availability group.

    We need to minimize the time between cutting over from the existing Sql Server 2008 cluster to the 2014 AG. On the day of the migration we take a full back up close to end of the day and restore it to the new system leaving the databases in no recovery. During the migration window we disable connectivity to the old server, take a final differential backup from the old system and apply to the new system. At this time we would recover the database on the primary but also restore to the secondary and leave it in no recovery mode.

    The problem I see us running into is once the databases are restored to the server which is going to act as the primary replica, in order to build the AG I need to take a backup on the primary replica server and restore to the secondary replica before the AG can be established. This will cause a larger than desired migration window.

    I thought I could create the AG ahead of time, then remove the databases from just before the migration window. Do a restore to both primary and secondary replicas and add the databases back into the AG. Unfortunately it seems like I still need to take a full back up on the primary in order to add it to the AG.

    This seems silly because on the AG Wizard page "Select Initial Data Synchronization " there are options to Join or Skip initial data synchronization which seems to me like you can manually get the databases ready to join the AG without having to do a backup on the primary.

    I must be missing something obvious here? Any pointers would be appreciated.

  • I figured it out

    1)Set up AG

    2)On day of migration remove databases from AG

    3)Do full back up of db on current prod server.

    4)Do tran log back up of db on current prod server.

    5)Restore full back up to new primary replica. Leave in norecovery mode

    6)Restore tran log. Recover db.

    7)ALTER AVAILABILITY GROUP XXX ADD DATABASE XXX;

    8)Restore full back up to new secondary replica. Leave in norecovery mode.

    9)Restore tran log. Leave in norecovery mode.

    10)ALTER DATABASE XXX SET HADR AVAILABILITY GROUP = XXX;

  • Another way:

    1) Set up an Synchron Mirroring vom old to new System

    2) Migration day: stop the application

    3) Failover Mirror Manual -> New System is then primary

    4) Change Connection String from Applikation and start them

    5) Then follow from steps 3 from JohnMarks Post (taks only on new System)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply