Home > SQL Server Tips > Database Management and Administration > SQL Server disaster recovery: Recreating historical data
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE MANAGEMENT AND ADMINISTRATION

SQL Server disaster recovery: Recreating historical data


Greg Robidoux, Contributor
12.14.2006
Rating: --- (out of 5)


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


There is one task I hope you never face: May you never have to recreate data at different points in time in order to unfold a suspicious act or uncover lost or stolen data. Most databases store data at a core data level, which reveals only the most recent state of the data to the end user and the database administrator. This issue of only having the latest version of the data leaves you unable to identify the whereabouts of particular data at different points in time during the data lifecycle.

As a DBA and a consultant, I see a lot of databases that store only a current snapshot of data and do not store each historical row of data as it changes through the life of the data. In most cases, this is great for the database, because every iteration of every transaction would require that the size of your database be 100 to 1,000 times the size of the current database. And it is because of this need to keep the database at a manageable level that the historical rows of data are often not stored and therefore not easy to recreate.

The financial industry has taken the opposite approach. Instead of only storing the most recent state of the data, it stores each transaction as it occurs and has reversing entries to undo the change. This approach means that the data is written, but it's never changed. Any historical point in time can easily be displayed without the need for other options to recreate the data. In its pure sense, tracking financial data changes is not as intensive as other data you may store in your database. That said, you should investigate which historical changes you need to track and trace versus which type only requires you to have the most recent version.

There are tools in the marketplace, such as Lumigent Technologies' AuditDB and Idera's SQL compliance manager, that allow you to capture every iteration of every single change that's ever occurred on your database. It takes an extremely large space to store the data, and only with tools such as the ones mentioned above would you be able to trace the various states of your data as it changes over time -- unless you modified your application to store each historical
Get more on SQL Server Backup and Recovery:
  • Disaster recovery in SQL Server: Know what your plan should look like

  • SQL Server Backup and Recovery Learning Guide
  • row of data. Of course, there are other options, such as using triggers to capture each data change, but, again, your storage requirements become quite large, as does the overhead that is placed on your server when using triggers.

    Without using a tool or modifying your application to capture each historical row of data, you're left with the painful and sloppy alternative of attempting to recreate the data. In years past, I was tasked with recreating healthcare records from the past several years in order to uncover some suspicious activities that occurred. At that time, the tools mentioned above did not exist and attempting to use triggers, along with the additional storage requirements, was not an option.

    The process of recreating each historical view of a particular data set began with the retrieval of the archived backup tapes. To our dismay, we were notified that only one tape per month was archived for long-term storage and therefore the best we could do was create a snapshot one month at a time. As we began to restore the tapes, we were again unpleasantly surprised that some of the tapes were not readable. The database size at the time was only about 10 GB, but the need to restore over and over again and also capture the data we needed required us to restore in place since these were the days of 9 GB drives and an abundant amount of storage did not exist. Today, 10 GB is minuscule. Databases are now in the 100 GB to 500 GB range. So, even though much larger drives exist, the overall problem still remains.

    I know the task of recreating historical data is not something that occurs all that often, but I also know I have been faced with this challenge on a couple of occasions. As a DBA, it is your responsibility to protect the data and to assist your company in reproducing as much data as possible. In order to understand the true requirements and the importance of the data, you must ask questions that will help determine the requirements. Based on what you learn, put measures in place to ensure you can recreate what is needed.

    Once again, here are the three options to take into consideration so you know what is possible and what is not possible:

  • Third-party tools, such as Lumigent's AuditDB or Idera's SQL compliance manager
  • The use of triggers or other application modification
  • The backup and restore method

    Depending on the option you select, you'll need to understand what is possible and what is not possible. By using a third-party tool, you have the ability to recreate every change that has ever occurred. These tools have built in processes to minimize the performance hit on the server and database, and they let you selectively capture the important data. Using triggers or other application changes is another good option, but if you have a very busy system, you'll see a very big performance hit if you implement this measure.

    The last approach of using backup and restore needs to be investigated in order for you to understand long-term backup storage. Find out how long backups are stored, what types of backups are stored and also the likelihood that you can restore all of the tapes. Even if there are only full backups once a day, you still have the potential for missing any changes that were made and then unmade during a particular day. In the case I was involved in, there was a lot of activity that may have occurred from month to month that could never be recreated.

    The days of recreating computer records based on a paper trail no longer exist. More and more information is captured online only. Without the proper measures in place, data can be lost forever without anyone ever knowing what happened. As a DBA, you need to understand your role for keeping the systems online and as a protector of the data and potentially the entire company.


    ABOUT THE AUTHOR:   
    Greg Robidoux is the president and founder of Edgewood Solutions LLC, a technology services company delivering professional services and product solutions for Microsoft SQL Server. He has authored numerous articles and has delivered presentations at regional SQL Server users' groups and national SQL Server events. Robidoux, who also serves as the SearchSQLServer.com Backup and Recovery expert, welcomes your questions.
    Copyright 2006 TechTarget

    Rate this Tip
    To rate tips, you must be a member of SearchSQLServer.com.
    Register now to start rating these tips. Log in if you are already a member.




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    SQL Server Backup and Recovery
    SQL Server Mailbag: Data restoration and DB property management
    Achieving high availability and disaster recovery with SharePoint databases
    How to 'do' SQL Server disaster recovery
    The keys to database backup protection for SQL Server
    Choosing a SQL Server disaster recovery solution
    Licensing a standby server for SQL Server replication
    Can I encrypt and restore a database backup in SQL Server 2005?
    SQL Server errors, failures and other problems fixed from the trenches
    Get SQL Server log shipping functionality without Enterprise Edition
    SQL Server 2008 backup compression pros and cons
    SQL Server Backup and Recovery Research

    Database Management and Administration
    Password cracking tools for SQL Server
    Using traces in SQL Server Profiler
    Meet compliance requirements with improved database security practices
    Hardening the network and OS for SQL Server security
    Securing the server and database in SQL Server
    How SQL Server 2008 components impact SharePoint implementations
    Troubleshooting Distributed Transaction Coordinator errors in SQL Server
    Achieving high availability and disaster recovery with SharePoint databases
    Clearing the Windows page file and its effect on server performance
    Deploying a SQL Server virtual appliance for Microsoft Hyper-V

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    rollback  (SearchSQLServer.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • SQL Server Development - .NET, C#, T-SQL, Visual Basic
    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts