SlideShare a Scribd company logo
Backup beyond just a strategy with SQL ServerVinod KumarTechnology EvangelistMicrosoft Corporationwww.ExtremeExperts.comhttp://blogs.sqlxml.org/vinodkumar
Session Objectives and TakeawaysSession ObjectivesKnow some of the basics of SQL ServerWhat makes an effective Strategy for backupBoth from Technology EnhancementsActual implementationsTakeawaysThese as much as they look theoretical, We will view some of the fundamentals during the demo to make you realize how important backups are !!!
Targeted RolesDatabase Administration Database Development Database Operations and Support Database Solutions Architect
File Creation/InitializationCreation of database filesFiles being restored are created and initialized.This step is NOT performed if file already exists.Do not drop database prior to restoring it.Time requirementSQL Server 2000Write throughput of data devices (disks, RAID controllers, etc.)Same time as CREATE DATABASE or ALTER DATABASE ADD FILESQL Server 2005+ – Zero-initialization SKIPPED
Data/Transaction Log CopyFile containing data or transaction log is copied from backup devices to destinationLength of this phase:Amount of data or log to be copiedSlowest component of the I/O system (disk device, backup device, controller, PCI bus, network)System tuned for maximum copy speed is limited by memory bus bandwidth—or before that, number of PCI buses or slots supported by systemCPU usage should be insignificant
RedoRedo (or roll-forward) occurs after the log has been restored.Reads the transaction log.Reapplies changes recorded in log to data pages so all pages are consistent with log.Length of this phase is determined by…Amount of log to redo (affected by type and frequency of backups), andSystem performance.Planning: How fast is redo relative to production workload?
UndoUndo is also called “roll-back” or “recovery.”Begins after redo reaches it target point, often the point of failure.Changes that were applied by active, uncommitted transactions at the target point are undone.Length of this phase:The amount of data modified by the active transactionsPlanning: Very hard – depends on how transactions have been written and/or if long running transactions exist…
Phases of RestoreFile Creation/Initialization  Same as CREATE DATABASEMinimized by Skipping zero-initializationData and/or Transaction Log Copy  Based on Media type and DB Size	Minimized by Optimizing HW Configuration and ThroughputRedo/Roll-forward Log Type/Frequency of BackupsMinimized by SQL Server Transaction Log InformationUndo Uncommitted Transactions  Impossible to predictDatabase Accessible upon REDO completion!
Instant File InitializationSkip data file zeroingCreate VLDB,Add or grow file,Initialize for restore,…in seconds!SecurityPrior disk contents not overwritten until usedExtra care if SQL Server shut down or DB detached Secure by defaultPermission grantable only by Windows administrator
Online RestoreSQL Server 2000One damaged page/device/file ENTIRE database marked suspect,		 taken “offline”Database is not available during restoreSQL Server 2005+ onwardsDatabase remains onlineOnly data being restored is unavailableFile/filegroup restore
Piecemeal ManagementFine Grained OperationsOperations affect the minimum amount of dataPagesFilegroupsPartitionsData not involved remainsAvailablePerformant
FilegroupsBasic unit of availabilityEarlier Versions of SQL ServerEntire databaseSQL Server 2005+Database can be online, yet not all filegroups are available
AvailablePrimaryFilegroupDatabaseFilegroup AFilegroup BExamplePiecemeal restore for disaster recoveryOnline restore of filegroups in priority orderBackupsPrimaryLogFilegroup AFilegroup B
Piecemeal Backup-RestorePartial database availability during restoreBased on file/filegroup backupWorks with all recovery modelsFull, Simple, Bulk-LoggedSupported only for databases with multiple filegroupsFilegroups must be recovered to consistent point
Short Restore SequenceFor Read-Only Data Log backups need not be restored when…File/filegroup is unchanged since backupFile has been rolled forward to where it is read-only Useful for read-only tables or partitionsSet filegroup read-onlyRecommended for FULL and BULK-LOGGED databasesPrevents inadvertent changePrevents changes by background tasksRequired for SIMPLE model databasesLog backup for roll forward not available
Primary FilegroupFilegroup ARESTORE  DATABASE D…  FILEGROUP=‘B’AvailableRestore Damaged FilegroupFull model databaseLog BackupsPrimary       BackupDatabaseFilegroup A       BackupFilegroup BBackupFilegroup BRead - OnlyFilegroup CBackupFilegroup CRead - Only
Recovery Models - GlanceFull No work lossSupports recovery to any point-in-timeSimpleSimplest backup/restore strategySimplifies log managementNo log backupsGreatest work loss possibleNo point-in-time recoveryNo access to tail Bulk_LoggedHigh performance bulk operationsMinimal log space for bulk operationsSome work loss exposureMany large data warehouses fit this model
Partial BackupsTwo new types of backupPartial DatabaseSimilar to a full database backup, but contains only the read-write filegroupsPartial DifferentialSimilar to a full database differential, but contains only the read-write filegroupsAdded to allow piecemeal restore of simple model databasesAlso work with full and bulk-logged models
Piecemeal Backup-RestoreSimple Model DatabasesRequired backupsPartial database backupFile or filegroup backups of read-only filegroupsMust be consistent with partialOptional backupsPartial differentialFile/filegroup differentialIf filegroup normally read-only was changed, then made read-only again
BACKUP  DATABASE D…  WITH PARTIALPrimary FilegroupFilegroup ABACKUP  DATABASE D…  FILEGROUP=‘B’BACKUP  DATABASE D…  FILEGROUP=‘C’Piecemeal BackupSimple model databaseDatabasePartial       BackupFilegroup BBackupFilegroup BRead - OnlyFilegroup CBackupFilegroup CRead - Only
RESTORE  DATABASE D…  WITH PARTIALPrimary FilegroupFilegroup ARESTORE  DATABASE D…  FILEGROUP=‘B’Filegroup BRead - OnlyRESTORE  DATABASE D…  FILEGROUP=‘C’Filegroup CAvailableRead - OnlyPiecemeal RestoreSimple model databaseDatabasePartial       BackupFilegroup BBackupFilegroup CBackup
Primary FilegroupFilegroup ARESTORE  DATABASE D…  FILEGROUP=‘B’AvailableRestore Damaged FilegroupSimple model databaseDatabasePartial       BackupFilegroup BBackupFilegroup BRead - OnlyFilegroup CBackupFilegroup CRead - Only
UnavailableRESTORE  DATABASE D…  WITH PARTIALAvailableRestore Damaged PrimarySimple model databaseDatabasePartial       BackupPrimary FilegroupFilegroup AFilegroup BBackupFilegroup BDatabase Primary and A may be taken back in time without restoring filegroups B and C if B and C are consistentRead - OnlyFilegroup CBackupFilegroup CRead - Only
Damaged Page Tracking And RestoreDamaged pages encountered on read Torn page or checksum errorBad Page IDShort readDatabase remains availableTransaction rolls backBUT error during rollback forces database restartDamaged pages Automatically tracked in a tableMay be restored and recovered onlineWorks for databases with a single filegroup
Page Restore Versus File RestoreConsider page restore when…You have a limited number of damaged pagesYou must maintain maximum availabilityConsider file restore when…A device is failingYou have large numbers of damaged pagesYou need to relocate data to another deviceYou can tolerate the affected filegroupbeing unavailable
Data Page VerificationTypesTorn page detection – 7.0 and 2000Page checksum – NEW!Page checksumDetect disk I/O errors not reported by the hardware or operating systemWhen the checksum is verifiedRetries eliminate transients If verification fails,A unique error is raised Connection is terminatedPage is tracked
Backup VerificationDetect errors unreported by the backup devices or operating systemBackup checksums are optionally generatedVerified byRESTORERESTORE VERIFYONLYBackup optionally validates page checksums if these are presentOptionally continue past page checksum errors to complete the backup
Continue Past Restore ErrorsWhy?A damaged backup may be the only one availableContinue past errors encountered byRESTORERESTORE VERIFYONLYAllows the restore sequence to continue as far as possible…Affected file groups are left in suspect state
Backup/RestoreMirrored Media SetsRedundant backup media helps guarantee successful restoreExtra copies forArchivalDisaster recovery
Demo
31SummaryBackups are the most important step in restoring your DB in event of failureMaybe your first and last resortMust understand the effects of using themKnow ALL the options in handling disasterAll the Best !!!
Questionswww. ExtremeExperts.comhttp://blogs.sqlxml.org/vinodkumarT: @vinodk_sql
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related Content

What's hot (20)

PPTX
Noel sps bay_backup_restore
Michael Noel
 
PPTX
10 Problems with your RMAN backup script
Yury Velikanov
 
PPT
Les 20 dup_db
Femi Adeyemi
 
PPT
Les 13 memory
Femi Adeyemi
 
PPT
Les 06 Perform Rec
vivaankumar
 
PPT
Les 12 fl_db
Femi Adeyemi
 
PPT
Les 01 core
Femi Adeyemi
 
PPTX
Sps baltimore backupand_restore-dpm
Michael Noel
 
PPT
Les 02 config
Femi Adeyemi
 
PPT
Less02 Installation
vivaankumar
 
PPTX
Managing Hyper-V on a Compellent SAN
Compellent Technologies
 
PPT
Les 02 Config Rec
vivaankumar
 
PPT
Les 04 config_bu
Femi Adeyemi
 
PPT
Les 07 Rman Rec
vivaankumar
 
PPT
Les 07 rman_rec
Femi Adeyemi
 
PPT
Les 03 catalog
Femi Adeyemi
 
PPT
Les 19 space_db
Femi Adeyemi
 
PPT
Les 08 tune_rman
Femi Adeyemi
 
PPT
Les 11 fl2
Femi Adeyemi
 
Noel sps bay_backup_restore
Michael Noel
 
10 Problems with your RMAN backup script
Yury Velikanov
 
Les 20 dup_db
Femi Adeyemi
 
Les 13 memory
Femi Adeyemi
 
Les 06 Perform Rec
vivaankumar
 
Les 12 fl_db
Femi Adeyemi
 
Les 01 core
Femi Adeyemi
 
Sps baltimore backupand_restore-dpm
Michael Noel
 
Les 02 config
Femi Adeyemi
 
Less02 Installation
vivaankumar
 
Managing Hyper-V on a Compellent SAN
Compellent Technologies
 
Les 02 Config Rec
vivaankumar
 
Les 04 config_bu
Femi Adeyemi
 
Les 07 Rman Rec
vivaankumar
 
Les 07 rman_rec
Femi Adeyemi
 
Les 03 catalog
Femi Adeyemi
 
Les 19 space_db
Femi Adeyemi
 
Les 08 tune_rman
Femi Adeyemi
 
Les 11 fl2
Femi Adeyemi
 

Viewers also liked (19)

PPTX
Preventores sociales comunitarios
Richard Ortega
 
PDF
Membangun relasi
audhie senas
 
PPTX
Agile Development 2012 sharing and Kanban Introduction
Jen-Chieh Ko
 
PPTX
Dynamics AX - Point of Service Not Point of Sale
AmandaMulquiney
 
PDF
xRM Twilight Presentation
Intergen
 
PPTX
Tema wanita berharga bagi tuhan
Jirin Bayak
 
PPTX
Tr garland business networking expert - entrepreneur magazine - part 1
TR Garland
 
PDF
Improve your company's performance with IMAFS
IMAFS
 
DOC
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3), inf...
Wisata Jawa
 
PDF
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare
 
PPTX
Ayat Hafalan Minggu ini
Jirin Bayak
 
PPT
Diseño y construccion de medios alternativos de comunicación para
Richard Ortega
 
PDF
MB6-890 Score Report
Randy King
 
DOCX
Senam kegel pria untuk bercinta hingga 8 kali
pedesuperwow
 
PDF
Common scrum issues
Jen-Chieh Ko
 
PPTX
2. sistemas de numeracion
boounzueta
 
PPTX
15. c combin ovejas
boounzueta
 
PDF
Nano Server (ATD 11)
Tomica Kaniski
 
Preventores sociales comunitarios
Richard Ortega
 
Membangun relasi
audhie senas
 
Agile Development 2012 sharing and Kanban Introduction
Jen-Chieh Ko
 
Dynamics AX - Point of Service Not Point of Sale
AmandaMulquiney
 
xRM Twilight Presentation
Intergen
 
Tema wanita berharga bagi tuhan
Jirin Bayak
 
Tr garland business networking expert - entrepreneur magazine - part 1
TR Garland
 
Improve your company's performance with IMAFS
IMAFS
 
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3), inf...
Wisata Jawa
 
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare
 
Ayat Hafalan Minggu ini
Jirin Bayak
 
Diseño y construccion de medios alternativos de comunicación para
Richard Ortega
 
MB6-890 Score Report
Randy King
 
Senam kegel pria untuk bercinta hingga 8 kali
pedesuperwow
 
Common scrum issues
Jen-Chieh Ko
 
2. sistemas de numeracion
boounzueta
 
15. c combin ovejas
boounzueta
 
Nano Server (ATD 11)
Tomica Kaniski
 
Ad

Similar to Backup beyond just a strategy with SQL Server (20)

PPTX
Unit Three: Database Recovery Points & Procedures
asterbelete021
 
PPTX
Sql server lesson10
Ala Qunaibi
 
PPTX
SQLBits 2008 - SQL Server High Availability and Disaster Recovery Overview - ...
Charley Hanania
 
PPTX
Prevent Recovery Amnesia - Forget The Backups
Chris Bell
 
PDF
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
PDF
Real liferecoverypresentation
oracle documents
 
PPT
Backup and Recovery Implementation
Rajib Kundu
 
PDF
Real liferecoverypaper
oracle documents
 
PDF
DB2 LUW - Backup and Recovery
imranasayed
 
PDF
Hjrbur
oracle documents
 
PPTX
Backup And Recovery Planning
MoniqueO Opris
 
PPTX
Databaseadmonfundamentalitprosdcchapter6
Julián Castiblanco
 
PDF
ch-5 advanced db.pdf
haymanot taddesse
 
PPTX
Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge
sqlserver.co.il
 
PPTX
Chapter 3 - Recogfytru6y5tfvery Techniques.pptx
ahmed518927
 
PPTX
fffffffChapter 1- Recovery Techniques.pptx
ahmed518927
 
PPTX
gyuftfChapter 1- Recovery Techniques.pptx
ahmed518927
 
PPTX
Backup and restore
Riteshkiit
 
PDF
SQL Server Backup and Restore
Kesavan Munuswamy
 
PPTX
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
Unit Three: Database Recovery Points & Procedures
asterbelete021
 
Sql server lesson10
Ala Qunaibi
 
SQLBits 2008 - SQL Server High Availability and Disaster Recovery Overview - ...
Charley Hanania
 
Prevent Recovery Amnesia - Forget The Backups
Chris Bell
 
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
Real liferecoverypresentation
oracle documents
 
Backup and Recovery Implementation
Rajib Kundu
 
Real liferecoverypaper
oracle documents
 
DB2 LUW - Backup and Recovery
imranasayed
 
Backup And Recovery Planning
MoniqueO Opris
 
Databaseadmonfundamentalitprosdcchapter6
Julián Castiblanco
 
ch-5 advanced db.pdf
haymanot taddesse
 
Db As Behaving Badly... Worst Practices For Database Administrators Rod Colledge
sqlserver.co.il
 
Chapter 3 - Recogfytru6y5tfvery Techniques.pptx
ahmed518927
 
fffffffChapter 1- Recovery Techniques.pptx
ahmed518927
 
gyuftfChapter 1- Recovery Techniques.pptx
ahmed518927
 
Backup and restore
Riteshkiit
 
SQL Server Backup and Restore
Kesavan Munuswamy
 
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
Ad

More from Vinod Kumar (7)

PPTX
SQL Server Query Optimization, Execution and Debugging Query Performance
Vinod Kumar
 
PPT
Advanced t sql - querying and programming inside sql server
Vinod Kumar
 
PPT
Choosing a concurrency model, optimistic or pessimistic
Vinod Kumar
 
PPTX
Choosing A Concurrency Model, Optimistic Or Pessimistic
Vinod Kumar
 
PPT
Sql Server Security
Vinod Kumar
 
PPT
Windows Mobile 5.0 Data Access And Storage Webcast
Vinod Kumar
 
PPT
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Vinod Kumar
 
SQL Server Query Optimization, Execution and Debugging Query Performance
Vinod Kumar
 
Advanced t sql - querying and programming inside sql server
Vinod Kumar
 
Choosing a concurrency model, optimistic or pessimistic
Vinod Kumar
 
Choosing A Concurrency Model, Optimistic Or Pessimistic
Vinod Kumar
 
Sql Server Security
Vinod Kumar
 
Windows Mobile 5.0 Data Access And Storage Webcast
Vinod Kumar
 
Protecting Your Key Asset – Data Protection Best Practices V2.0 Final
Vinod Kumar
 

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 

Backup beyond just a strategy with SQL Server

  • 1. Backup beyond just a strategy with SQL ServerVinod KumarTechnology EvangelistMicrosoft Corporationwww.ExtremeExperts.comhttp://blogs.sqlxml.org/vinodkumar
  • 2. Session Objectives and TakeawaysSession ObjectivesKnow some of the basics of SQL ServerWhat makes an effective Strategy for backupBoth from Technology EnhancementsActual implementationsTakeawaysThese as much as they look theoretical, We will view some of the fundamentals during the demo to make you realize how important backups are !!!
  • 3. Targeted RolesDatabase Administration Database Development Database Operations and Support Database Solutions Architect
  • 4. File Creation/InitializationCreation of database filesFiles being restored are created and initialized.This step is NOT performed if file already exists.Do not drop database prior to restoring it.Time requirementSQL Server 2000Write throughput of data devices (disks, RAID controllers, etc.)Same time as CREATE DATABASE or ALTER DATABASE ADD FILESQL Server 2005+ – Zero-initialization SKIPPED
  • 5. Data/Transaction Log CopyFile containing data or transaction log is copied from backup devices to destinationLength of this phase:Amount of data or log to be copiedSlowest component of the I/O system (disk device, backup device, controller, PCI bus, network)System tuned for maximum copy speed is limited by memory bus bandwidth—or before that, number of PCI buses or slots supported by systemCPU usage should be insignificant
  • 6. RedoRedo (or roll-forward) occurs after the log has been restored.Reads the transaction log.Reapplies changes recorded in log to data pages so all pages are consistent with log.Length of this phase is determined by…Amount of log to redo (affected by type and frequency of backups), andSystem performance.Planning: How fast is redo relative to production workload?
  • 7. UndoUndo is also called “roll-back” or “recovery.”Begins after redo reaches it target point, often the point of failure.Changes that were applied by active, uncommitted transactions at the target point are undone.Length of this phase:The amount of data modified by the active transactionsPlanning: Very hard – depends on how transactions have been written and/or if long running transactions exist…
  • 8. Phases of RestoreFile Creation/Initialization  Same as CREATE DATABASEMinimized by Skipping zero-initializationData and/or Transaction Log Copy  Based on Media type and DB Size Minimized by Optimizing HW Configuration and ThroughputRedo/Roll-forward Log Type/Frequency of BackupsMinimized by SQL Server Transaction Log InformationUndo Uncommitted Transactions  Impossible to predictDatabase Accessible upon REDO completion!
  • 9. Instant File InitializationSkip data file zeroingCreate VLDB,Add or grow file,Initialize for restore,…in seconds!SecurityPrior disk contents not overwritten until usedExtra care if SQL Server shut down or DB detached Secure by defaultPermission grantable only by Windows administrator
  • 10. Online RestoreSQL Server 2000One damaged page/device/file ENTIRE database marked suspect, taken “offline”Database is not available during restoreSQL Server 2005+ onwardsDatabase remains onlineOnly data being restored is unavailableFile/filegroup restore
  • 11. Piecemeal ManagementFine Grained OperationsOperations affect the minimum amount of dataPagesFilegroupsPartitionsData not involved remainsAvailablePerformant
  • 12. FilegroupsBasic unit of availabilityEarlier Versions of SQL ServerEntire databaseSQL Server 2005+Database can be online, yet not all filegroups are available
  • 13. AvailablePrimaryFilegroupDatabaseFilegroup AFilegroup BExamplePiecemeal restore for disaster recoveryOnline restore of filegroups in priority orderBackupsPrimaryLogFilegroup AFilegroup B
  • 14. Piecemeal Backup-RestorePartial database availability during restoreBased on file/filegroup backupWorks with all recovery modelsFull, Simple, Bulk-LoggedSupported only for databases with multiple filegroupsFilegroups must be recovered to consistent point
  • 15. Short Restore SequenceFor Read-Only Data Log backups need not be restored when…File/filegroup is unchanged since backupFile has been rolled forward to where it is read-only Useful for read-only tables or partitionsSet filegroup read-onlyRecommended for FULL and BULK-LOGGED databasesPrevents inadvertent changePrevents changes by background tasksRequired for SIMPLE model databasesLog backup for roll forward not available
  • 16. Primary FilegroupFilegroup ARESTORE DATABASE D… FILEGROUP=‘B’AvailableRestore Damaged FilegroupFull model databaseLog BackupsPrimary BackupDatabaseFilegroup A BackupFilegroup BBackupFilegroup BRead - OnlyFilegroup CBackupFilegroup CRead - Only
  • 17. Recovery Models - GlanceFull No work lossSupports recovery to any point-in-timeSimpleSimplest backup/restore strategySimplifies log managementNo log backupsGreatest work loss possibleNo point-in-time recoveryNo access to tail Bulk_LoggedHigh performance bulk operationsMinimal log space for bulk operationsSome work loss exposureMany large data warehouses fit this model
  • 18. Partial BackupsTwo new types of backupPartial DatabaseSimilar to a full database backup, but contains only the read-write filegroupsPartial DifferentialSimilar to a full database differential, but contains only the read-write filegroupsAdded to allow piecemeal restore of simple model databasesAlso work with full and bulk-logged models
  • 19. Piecemeal Backup-RestoreSimple Model DatabasesRequired backupsPartial database backupFile or filegroup backups of read-only filegroupsMust be consistent with partialOptional backupsPartial differentialFile/filegroup differentialIf filegroup normally read-only was changed, then made read-only again
  • 20. BACKUP DATABASE D… WITH PARTIALPrimary FilegroupFilegroup ABACKUP DATABASE D… FILEGROUP=‘B’BACKUP DATABASE D… FILEGROUP=‘C’Piecemeal BackupSimple model databaseDatabasePartial BackupFilegroup BBackupFilegroup BRead - OnlyFilegroup CBackupFilegroup CRead - Only
  • 21. RESTORE DATABASE D… WITH PARTIALPrimary FilegroupFilegroup ARESTORE DATABASE D… FILEGROUP=‘B’Filegroup BRead - OnlyRESTORE DATABASE D… FILEGROUP=‘C’Filegroup CAvailableRead - OnlyPiecemeal RestoreSimple model databaseDatabasePartial BackupFilegroup BBackupFilegroup CBackup
  • 22. Primary FilegroupFilegroup ARESTORE DATABASE D… FILEGROUP=‘B’AvailableRestore Damaged FilegroupSimple model databaseDatabasePartial BackupFilegroup BBackupFilegroup BRead - OnlyFilegroup CBackupFilegroup CRead - Only
  • 23. UnavailableRESTORE DATABASE D… WITH PARTIALAvailableRestore Damaged PrimarySimple model databaseDatabasePartial BackupPrimary FilegroupFilegroup AFilegroup BBackupFilegroup BDatabase Primary and A may be taken back in time without restoring filegroups B and C if B and C are consistentRead - OnlyFilegroup CBackupFilegroup CRead - Only
  • 24. Damaged Page Tracking And RestoreDamaged pages encountered on read Torn page or checksum errorBad Page IDShort readDatabase remains availableTransaction rolls backBUT error during rollback forces database restartDamaged pages Automatically tracked in a tableMay be restored and recovered onlineWorks for databases with a single filegroup
  • 25. Page Restore Versus File RestoreConsider page restore when…You have a limited number of damaged pagesYou must maintain maximum availabilityConsider file restore when…A device is failingYou have large numbers of damaged pagesYou need to relocate data to another deviceYou can tolerate the affected filegroupbeing unavailable
  • 26. Data Page VerificationTypesTorn page detection – 7.0 and 2000Page checksum – NEW!Page checksumDetect disk I/O errors not reported by the hardware or operating systemWhen the checksum is verifiedRetries eliminate transients If verification fails,A unique error is raised Connection is terminatedPage is tracked
  • 27. Backup VerificationDetect errors unreported by the backup devices or operating systemBackup checksums are optionally generatedVerified byRESTORERESTORE VERIFYONLYBackup optionally validates page checksums if these are presentOptionally continue past page checksum errors to complete the backup
  • 28. Continue Past Restore ErrorsWhy?A damaged backup may be the only one availableContinue past errors encountered byRESTORERESTORE VERIFYONLYAllows the restore sequence to continue as far as possible…Affected file groups are left in suspect state
  • 29. Backup/RestoreMirrored Media SetsRedundant backup media helps guarantee successful restoreExtra copies forArchivalDisaster recovery
  • 30. Demo
  • 31. 31SummaryBackups are the most important step in restoring your DB in event of failureMaybe your first and last resortMust understand the effects of using themKnow ALL the options in handling disasterAll the Best !!!
  • 33. © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.