High Availability and Disaster recovery Techniques in sql server
This blog is the introduction and brief overview for high availability and Disaster recovery techniques available in sql server, and its my understanding on it. I will write detail blog on each technique will later
There are different ways of achieving this is sql server each has its own advantage and disadvantages. following methods are used for HA and DR :
- Clustering
- Database Mirroring.
- Log Shipping
- Replication
- Backup and restore
- Detach and Attach
- Clustering:-
- Cluster is a very high level technique to achieve HA.
- Cluster may not be good for DR plan as here both host should be close to each other
- Clustering require few seconds to move to other node if one node failed for high availability.
- Earlier to SS2005, this can only be possible at “Enterprise Edition” which itself cost expensive.
- At SS2005 2 node clustering is possible at standard edition as well.
- Different types of cluster are available as one node cluster (active/passive), two node cluster(active/active). Multi node clustering.
- Can be configured very easily below the steps to setup clustering.
- Clustering requires both nodes to be of same configuration.
- Active/active clustering can also be used for load balancing.
Reference:
http://msdn.microsoft.com/en-us/library/ms179530.aspx
http://support.microsoft.com/kb/254321
http://www.mssqltips.com/tip.asp?tip=1541
http://technet.microsoft.com/en-us/library/cc917693.aspx
http://technet.microsoft.com/en-us/magazine/2007.03.sqlclusters.aspx
- 2. Database Mirroring:-
- Database mirroring is introduced in SS2005 sp1.
- This is much cost efficient technique unlike clustering this can be as HA. As here mirror server does not required to be of same configuration.
- Here Principle / Witness/Mirror servers, Principle and witness could be on same server.
- The setup for Mirroring is here
- Mirroring is configured with three ways:
| Operating Mode | Transaction safety | Transfer mechanism | Quorum required | Witness server | Failover Type |
| High Availability | FULL | Synchronous | Y | Y | Automatic or Manual |
| High Protection | FULL | Synchronous | Y | N | Manual only |
| High Performance | OFF | Asynchronous | N | N/A | Forced only |
Reference:
http://weblogs.sqlteam.com/tarad/archive/2007/02/13/60091.aspx
http://msdn.microsoft.com/en-us/library/ms188712.aspx
http://www.mssqltips.com/tip.asp?tip=1280
http://msdn.microsoft.com/en-us/library/ms177412.aspx
http://technet.microsoft.com/en-us/library/cc917681.aspx
http://technet.microsoft.com/en-us/library/cc917680.aspx
3. Log Shipping:-
- Log shipping is well known term for HA and DR plan and is available from SS2000 onwards. In fact we can setup the custom log shipping using backup and restore technique.
- Log shipping is available at enterprise edition on Sql server 2000 and is available at Standard edition for SS2005 onwards.
- Log shipping is very efficient and easy technique the setup.
- To use this for HA may require little downtime… manual intervention to make secondary server as primary, move logins and other activity. And same is applied for DR plan.
Reference:
http://www.sql-server-performance.com/articles/clustering/log_shipping_70_p1.aspx
http://support.microsoft.com/kb/314515
http://www.mssqltips.com/tip.asp?tip=1158
http://www.youtube.com/watch?v=2k003Dj7fHo
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1309728,00.html
http://www.informit.com/articles/article.aspx?p=331402
http://technet.microsoft.com/en-us/library/cc917705.aspx
http://www.sql-articles.com/articles/high-availability/ten-steps-to-configure-log-shipping
4. Replication:-
- a. Replication is generally used as a technique to load balance the production server and distinguish the high activity production with reporting server.
- b. Replication can also be used as HA or DR technique but not especially for it. Can be achievable but like logshipping it also require manual intervention.
Reference:
http://blogs.msdn.com/repltalk/default.aspx
http://www.replicationanswers.com/
- 5. Backup and restore:-
- a. This is a standard way for HA and DR.
- b. This requires DBA skill.
- c. Time consuming process.
Reference:
http://msdn.microsoft.com/en-us/library/ms177429.aspx
http://www.sqlteam.com/article/backup-and-restore-in-sql-server-full-backups
http://articles.techrepublic.com.com/5100-10878_11-1041267.html
- 6. Detach and attach database:-
- a. This is not a technique for HA or DR but can be possible as now a days things are on SAN and high end storage devices which are redundant and can recovery the data. in such cases if we could recovery sql server data and log file(optional) we can attach the file can be used.
- b. Steps are here
Reference:
http://www.mssqlcity.com/Articles/Adm/attach_database.htm
http://support.microsoft.com/kb/224071
http://www.sqlservercentral.com/articles/Administration/spattachdb/169/
My friend referred me to your blog, so I thought I’d check it out. Very interesting material, will be back for more!
Thanks Mallie,
I am glad you liked it.
Thanx.
Vinay
[...] discussed about Disaster Recovery and High Availbility topic here continue on this. today would like to discuss some more information about [...]
I have come to your port before. By the way you have a informative blog
great post as usual!
Thans
for the nice post.
I just wanted to say that I found your web site via Goolge and I am glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks again!