SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
SQL Azure
Developer
General DBA
ASP.NET / ADO.NET
SQL Azure

USEFUL SITES :

ASP.NET Tutorials
Windows and SQL Azure Tutorials
Cloud Hosting Magazine
SharePoint Tutorials
Windows Server Help

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server

More     
 
Latest FAQ's

Add Node to A SQL Server failover Cluster failed with invalid ...
SQL Server Destination remote server error
Setting Up Data And Log Files For SQL Server
Will Check Constraints Improve Database Performance?

More     
   
Latest Software Reviews

dbForge Review
Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Doc 2008

More     

articles >> general dba >> Create Backups without Breaking the Database Backup ...

Create Backups without Breaking the Database Backup Sequence

By : Ashish Kumar Mehta
Dec 05, 2008

Development or Testing teams often request Database Administrators to provide a copy of a full database backup of a production database. When such a request comes in, I have seen in many organizations that the junior database administrators will quickly perform a full database backup and copy the backup files to the specified shared location and finally they go ahead and remove the special full backup files from the production server to save the disk space. However they don’t realize that this action could break the current database backup sequence especially when your database backup plan consists of a combination of differential and transactional log backups. In this article first you will see an example where you end up breaking the database backup sequence due to negligence. And finally you will see how to leverage the COPY_ONLY backup option which was introduced in SQL Server 2005 to perform an adhoc full database backups. When you use the COPY_ONLY backup option the database backup sequence will not break.

Introduction to COPY_ONLY Backup
In SQL Server 2005 Microsoft introduced a new type of database backup called COPY_ONLY. Using this backup mechanism, database administrator can perform Full, Differential and Transactional Log backup of all the databases without breaking the Database Backup Log Sequence Number (LSN).

How COPY_ONLY Backup Works
When you are performing the database backup using the COPY_ONLY option it basically keeps the existing log archive point intact. As a result the existing database backup sequence is not broken which means your existing database backup files can be used for recovering the database exactly to the time of failure. The Full, Differential or Transactional log backups when performed using COPY_ONLY option will not break the log sequence. However, it is very important to have a Full database backup available with you as Differential and Transactional Log backups are dependent on Full backups.

Database Backup Restoration Sequence
While recovering the database at the time of disaster; you need to first restore the Full backup with NORECOVERY, followed by restoring the latest Differential backup with NORECOVERY and then you need to restore all the transactional log backups in the order of creation with NORECOVERY. Finally you need to restore the tail log backup with RECOVERY option.

The below table mentions a typical database backup plan which is been followed in many organizations.



Now let us take the database backups by executing the below mentioned TSQL at the specified time mentioned in the above table. In this example you can see that a special full database back up is taken at 11 AM and then on the same day a disaster strikes at 4 PM. Our aim will be to use the database backup files which were created throughout the day and restore AdventureWorksDW2008 database. All the databases backups are created using the database backup compression feature which was introduced in SQL Server 2008. If you want to know more about database backup compression feature introduced in SQL Server 2008 then you can refer to my earlier article titled How to configure and Use Database Backup Compression in SQL Server 2008.


    Next Page>>    








C# Help and Tutorials | PHP MySQL Tutorial | Sharepoint Tutorial | Azure Tutorial | Cloud Hosting Magazine | ASP.NET Tutorials | Windows Server Help | Windows Phone Pro | Silverlight Ace | Visual Studio Tutorials | Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 2010 Jude O'Kelly. All rights reserved