mercredi 28 janvier 2015

Best way to migrate a huge SQL Server database with low downtime over network


Problem definition


Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB.


Having little to no downtime for this would be ideal.


Workload


Those databases are used for a .NET website and are constantly getting updated.


Having it not available over the weekend would be acceptable though. The currently in use DB would remain the only one in use until the switch over to the new one.


That switch would ideally be made just by changing DNS entries to point to the new DB server while making sure the DB is not being updated.


Also, time taken by this operation does not really matter as long as the switch from one server to the other (downtime) is kept low.


Approaches considered




  • Backup and restore


    This has been done in the past but involved a high downtime even though it was done through an internal network, so more efficiently than through Internet




  • Log shipping


    As far as I understand, this approach would minimize downtime by configuring a master/slave and transferring an exact copy of the master DB to its slave being read only. As mentioned above, no access to the slave would be necessary and we just need a way to have a replica of the master DB without data corruption.


    It also seems to be quite efficient in terms of resources utilization and wouldn't impact to much the master performance.


    I might be wrong about this approach so feel free to correct me.




  • Database mirroring


    I'm not too aware of that approach but it seems like a valid option. No need to have real time sync and performance of the master is quite important so asynchronous would be the way to go if this approach were to be chosen.




  • Other options?


    That server runs directly on bare metal hardware so lower level solutions are unfortunately not an option. Maybe there is a better way to get this done?




Constraints


As described, those databases are quite big to the point they are hard to maintain but that's an other problem.


The versions of SQL Server will be the same (Microsoft SQL Server 2012 Enterprise 64-bit).


It will have to be transferred over network between two datacenters so most probably over Internet. Having disks sent from one site to the other for an initial sync is unfortunately not an option. Having some sort of security for the transfer would be ideal but we will do the best of this situation.


That should give a quite good overview of our needs for this task and hopefully some of you had to face that situation before.





Aucun commentaire:

Enregistrer un commentaire