Tag: disaster recovery

  • Practicing for DR

    One of the sayings that I’ve heard a few times from professional atheletics is this:

    “Amateurs practice until they get it right. Professionals practice until they don’t get it wrong.”

    Most of us working in technology would like to think that we’re professionals, but do we really practice restores, practice recovering systems, practice reconfiguring things until we don’t get it wrong?

    I don’t think most of us do. We give it a try, and if it doesn’t work, we may examine why, but we often don’t go through the exercise enough to ensure that we really can do it well when there is pressure.

    You can’t practice constantly, that’s not practical, but you ought to take a regular look at different systems, different problems, and try to reset them up every quarter or so in order to be prepared. Even if it’s something you do informally, you ought to ensure that you understand how your scripts work to automate restores, reconfigure systems, restore databases and logs, etc. With the advances in virtualization, you can even do this on workstations, setting up complex, multi-server environments on ordinary hardware.

    It’s good practice for your skills and your career, and it might make you shine when there is an issue.

  • The DR Test Schedule

    You never know what disaster will strike.

    It’s hurricane season on the East Coast of the US right now, and after Hurricane Irene, I’m sure there are more than a few IT workers that are worried about their disaster recovery (DR) plans. Irene didn’t cause much damage, but it was a reminder that there are situations which are completely out of our control, but could easily end up causing us problems with our infrastructure.

    SQL Server gives us numerous ways to prepare for disasters with different technologies like database mirroring, log shipping and more. The new Always On features in Denali will give us even more options, and may be worth the cost of an upgrade. While DBAs seem to regularly practice backups and restores, recovering a full application often requires more than a SQL Server restore. This Friday, I wanted to ask how often you practice your recovery.

    How often do you perform a full DR test for an application?

    I think it’s very unlikely that you would lose all your servers at once. It’s possible, especially with an event like a hurricane, but it’s very unlikely that you would have to recover all your systems at once. However that doesn’t mean that you shouldn’t be prepared to recover a complete system. If new hardware arrived, could you rebuild your Windows hosts, your SQL Server instance and application or web servers? I’ve found out the hard way this isn’t as easy as it sounds.

    I used to perform a complete test of our one critical system once a year. We set aside a day, sending the IT staff needed to a secondary location with media, backups, and unformatted hardware to perform a test. If we couldn’t recovery the system in a day, we usually reviewed the issues and tried again in a month. Unfortunately, if we failed that test, we didn’t usually get another chance that year. Not exactly great disaster recovery planning.

    These days my part of the infrastructure, SQLServerCentral, lives on virtual servers. While I don’t have the responsibility for these servers, we do have images of them, as well as regular backups, and I suspect we could recover them fairly quickly. Maybe I should ask for a test someday soon….

    Steve Jones


    The Voice of the DBA Podcasts

  • RTO in Disaster Recovery

    When you have a disaster, the time that you have to restore service is usually referred to as the RTO time. This stands for the Recovery Time Objective and it can is defined like this in Wikipedia:

    The Recovery Time Objective (RTO) is the duration of time and a service level within which a business process must be restored after a disaster (or disruption) in order to avoid unacceptable consequences associated with a break in business continuity.

    That’s a great definition, covering the term with a great set of large, geeky words. However I came up with a simpler one that conveys the same information:

    The time it takes for you to get things running to the point where someone can use them after someone notices that they aren’t.

    You can also view the RTO as the downtime or uptime level of your system. I prefer looking at the RTO as the intervals between uptime, since I think that’s a glass half full view.

    That’s the basic definition and it’s important that you determine what the RTO is for your systems in order to begin planning for the resources that you devote to disaster recovery preparation.

    This post is based on the information in my Preparation for Disaster talk.

  • Recovery Models

    In SQL Server we have three basic recovery models: full, bulk-logged, and simple. By default we find that most databases use the defaults, which mean that they are in the full recovery model.

    In that case, you need to be sure that you are performing log backups, otherwise the log will grow until it reaches it’s limits, or you run out of disk space on that drive. If the log cannot record SQL Server transactions, the database cannot accept any more transactions.

    The basics of recovery models are covered nicely in this article from Gail Shaw, which includes some common myths and misconceptions out there. However for the average person, the important thing is that you understand which recovery model to pick.

    You Need Point in Time Recovery

    Point in time recovery means recovery in between the full or differential backups. Quite a few DBAs will ask customers if they really need to recover to a point in time, and get the answer that they don’t, but that’s not often the right question to ask.

    Ask your clients if the database failed at 5:00pm today, and all the work done today was lost because you restored to last night’s backup at midnight, how would they feel?

    Sometimes they’re fine with the data loss, most times they aren’t. If you need to get back to a point in time between backups, make sure you use the full recovery model.

    You Can Reload the Database

    There are some databases, usually data warehouses, that can be rebuilt from other sources. If you take a backup of your database and then load data every day that rarely changes during the day, you might not need point in time recovery. In fact, many ETL processes are not designed for this anyway, and could not restart themselves in the middle of a load if you restored to the point in time when the database had an issue.

    In this case, use the Simple recovery model.

    You are space constrained with the log

    If you run index rebuilds, or large data loads and find yourself with a transaction log that grows very large, you might want to investigate the Bulk-logged recovery model. This model is more confusing, so I don’t want to give you a general rule here. If you think you might benefit from less logging, investigate the bulk-logged recovery model, practice restores with it and make sure you fully understand the implications of using it before you set a database in this mode.