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

SQL SERVER MANAGEMENT

SQL Server disaster recovery: Recreating historical data


Greg Robidoux, Edgewood Solutions LLC
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 su


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


RELATED CONTENT
SQL Server Backup and 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 backups using SAN database snapshots
Tips for scheduling and testing SQL Server backups
Code to restore SQL Server databases in VB.NET
SQL Server Backup and Recovery Research

SQL Server Database Modeling and Design
Managing the development lifecycle with Visual Studio Team System 2008
A first look at Visual Studio Team System 2008 Database Edition
Testing transaction log autogrowth behavior in SQL Server
Top 10 SQL Server Tips of 2008
Tutorial: SQL Server indexing tips to improve performance
Tutorial: Learn SQL Server basics from A-Z
SQL Server database design disasters: How it all starts
Can you shrink your SQL Server database to death?
Physical data storage in SQL Server 2005 and 2008
SQL Server 2008 data types: Datetime, string, user-defined and more

SQL Server Management
A first look at Microsoft SQL Server 2008 R2
Maintaining high availability of SQL Server virtual machines
Creating fault-tolerant SQL Server installations
Using Microsoft Hyper-V for SQL Server consolidation
Scaling up vs. scaling out with SQL Server 2008
Migrating to SQL Server 2008 and leveraging new features
Testing a SQL Server environment before an upgrade
Does upgrading to SQL Server 2008 fit your business?
Meeting business needs with SQL Server full-text search
Using dynamic management views to improve SQL Server index effectiveness

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


ch 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 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.


    [TABLE]

    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.




    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