Question

Quick Question: Is it possible to mirror a database without downtime?

Long Question: I have a database on production being used by quite a few clients. The previous management did not implemented any kind of redundancy or high-availability strategy (no clustering... not even storage!!!), and now, as business grows, this is becoming a huge liability... as a emergency act I'm considering mirroring the database... The main problem is that I cannot take down the database. That would imply on some legal/financial problems due to some previous SLA agreements... So, can I mirror a database without taking it down?

Extra info:

  • The SQL Server version is 2008 R2 Enterprise.
  • The instance consist of one database only (it's a multi-tenant database)
  • The database infrastructure consist of one physical server running windows 2008 R2 (standalone server). It's not a cluster nor a VM and theres no storage behind it... all data is inside it's only 2TB disk...
  • The Database size (.mdf) is about 170 GB...
  • There's about 100 transactions each second
  • There's no hours when usage goes down... business are 24/7...
  • Yes, this totally looks like that environment a developer would create on their machine...
Was it helpful?

Solution

This is all in books online. Hopefully you can try in development, or on your desktop first. There are quite a few things to consider, so you should give it a thorough read.

Yes, you can mirror without taking it down. You restore a backup to the mirror and use NORECOVERY option. You then setup the mirroring and transactions start to move from primary to mirror. You'll need to set up any other things needed on that remote server - logins, jobs, etc.

Transfer logins using this method, so you get matching SIDs between servers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top