Storage migration and Mirroring

Category: sql server mirroring

Question

Tarek El Shaarawi on Tue, 28 Mar 2017 08:45:08


Hi Everyone

“We are planning to migrate SAN storage for our SQL environment (SQL 2008 R2). Currently we have two sites and each one is acting as DR for the other using  Mirroring between databases. The two sites will be down at the same time while migrating the storage. What actions are required  or best practice/recommendations does Microsoft advise to assure that Mirroring between the databases in the two sites will resume after the migration with no issues. “

Replies

Uri Dimant on Tue, 28 Mar 2017 11:14:30


https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e614defb-f996-437b-a4bd-2f521a1ead36/db-mirroring-migration-to-a-new-sql-server-hardware?forum=sqldatabasemirroring

Tarek El Shaarawi on Tue, 28 Mar 2017 11:22:35


Hi Uri,

We are not changing the servers. We are only moving the storage (SAN) to new SAN. What do ii need to check before the migration and after to make sure Mirroring is intact

Thanks

Uri Dimant on Tue, 28 Mar 2017 11:32:16


Hmm if the two sites will be down at the same time, I think you would need to re-establish the mirroring after the servers is up, do not think  you can pause and resume the mirroring...

Hilary Cotter on Tue, 28 Mar 2017 12:19:19


Mirroring has several states

SYNCRONIZING

SYNCHRONIZED

SUSPENDED 

PENDING_FAILOVER

DISCONNECTED

Synchronizing means that you are not caught up, synchronized means you are caught up. The others mean there is an error which much be address.

If both sites are down at the same time you should be fine and when both sites come up you should go into Synchronizing and then synchronized states.

What you want to do on your primary is issue the following command:

ALTER DATABASE MyDatabaseName SET PARTNER SUSPEND

Then take your primary offline (shut it down).

After your move bring your witness on line and then bring your primary and your mirror on line in that order. Then issue this statement on your primary:

ALTER DATABASE MyDatabaseName SET PARTNER RESUME

Everything should work fine.

Tarek El Shaarawi on Tue, 28 Mar 2017 12:20:10


Thanks Uri for the information. What do you think the right approach to do the migration so we can not re do the Mirroring? . Thanks for your support

Uri Dimant on Tue, 28 Mar 2017 12:34:21


Hilary described it just fine, see his replies, looks like you can do SUSPEND and RESUME after migration.