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

More Related Content

What's hot (20)

Noel sps bay_backup_restore
Noel sps bay_backup_restoreNoel sps bay_backup_restore
Noel sps bay_backup_restore
Michael Noel
 
Test
TestTest
Test
esolinhighered
 
10 Problems with your RMAN backup script
10 Problems with your RMAN backup script10 Problems with your RMAN backup script
10 Problems with your RMAN backup script
Yury Velikanov
 
Les 20 dup_db
Les 20 dup_dbLes 20 dup_db
Les 20 dup_db
Femi Adeyemi
 
Les 13 memory
Les 13 memoryLes 13 memory
Les 13 memory
Femi Adeyemi
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
vivaankumar
 
Les 12 fl_db
Les 12 fl_dbLes 12 fl_db
Les 12 fl_db
Femi Adeyemi
 
Les 01 core
Les 01 coreLes 01 core
Les 01 core
Femi Adeyemi
 
Sps baltimore backupand_restore-dpm
Sps baltimore backupand_restore-dpmSps baltimore backupand_restore-dpm
Sps baltimore backupand_restore-dpm
Michael Noel
 
Les 02 config
Les 02 configLes 02 config
Les 02 config
Femi Adeyemi
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installation
vivaankumar
 
Managing Hyper-V on a Compellent SAN
Managing Hyper-V on a Compellent SANManaging Hyper-V on a Compellent SAN
Managing Hyper-V on a Compellent SAN
Compellent Technologies
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
vivaankumar
 
Les 04 config_bu
Les 04 config_buLes 04 config_bu
Les 04 config_bu
Femi Adeyemi
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
vivaankumar
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
Femi Adeyemi
 
Les 03 catalog
Les 03 catalogLes 03 catalog
Les 03 catalog
Femi Adeyemi
 
Les 19 space_db
Les 19 space_dbLes 19 space_db
Les 19 space_db
Femi Adeyemi
 
Les 08 tune_rman
Les 08 tune_rmanLes 08 tune_rman
Les 08 tune_rman
Femi Adeyemi
 
Les 11 fl2
Les 11 fl2Les 11 fl2
Les 11 fl2
Femi Adeyemi
 

Viewers also liked (19)

Preventores sociales comunitarios
Preventores sociales comunitariosPreventores sociales comunitarios
Preventores sociales comunitarios
Richard Ortega
 
Agile Development 2012 sharing and Kanban Introduction
Agile Development 2012 sharing and Kanban IntroductionAgile Development 2012 sharing and Kanban Introduction
Agile Development 2012 sharing and Kanban Introduction
Jen-Chieh Ko
 
Dynamics AX - Point of Service Not Point of Sale
Dynamics AX - Point of Service Not Point of SaleDynamics AX - Point of Service Not Point of Sale
Dynamics AX - Point of Service Not Point of Sale
AmandaMulquiney
 
xRM Twilight Presentation
xRM Twilight PresentationxRM Twilight Presentation
xRM Twilight Presentation
Intergen
 
Tema wanita berharga bagi tuhan
Tema  wanita berharga bagi tuhanTema  wanita berharga bagi tuhan
Tema wanita berharga bagi tuhan
Rintujok Perrines
 
Tr garland business networking expert - entrepreneur magazine - part 1
Tr garland   business networking expert - entrepreneur magazine - part 1Tr garland   business networking expert - entrepreneur magazine - part 1
Tr garland business networking expert - entrepreneur magazine - part 1
TR Garland
 
Improve your company's performance with IMAFS
Improve your company's performance with IMAFSImprove your company's performance with IMAFS
Improve your company's performance with IMAFS
IMAFS
 
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3), inf...
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3),  inf...Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3),  inf...
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3), inf...
Wisata Jawa
 
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare - Brochure istituzionale 2011Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare
 
Ayat Hafalan Minggu ini
Ayat Hafalan Minggu iniAyat Hafalan Minggu ini
Ayat Hafalan Minggu ini
Rintujok Perrines
 
How to backup sql
How to backup sqlHow to backup sql
How to backup sql
Mahesh Gupta (DBATAG) - SQL Server Consultant
 
Diseño y construccion de medios alternativos de comunicación para
Diseño y construccion de medios alternativos de comunicación paraDiseño y construccion de medios alternativos de comunicación para
Diseño y construccion de medios alternativos de comunicación para
Richard Ortega
 
MB6-890 Score Report
MB6-890 Score ReportMB6-890 Score Report
MB6-890 Score Report
Randy King
 
Senam kegel pria untuk bercinta hingga 8 kali
Senam kegel pria untuk bercinta hingga 8 kaliSenam kegel pria untuk bercinta hingga 8 kali
Senam kegel pria untuk bercinta hingga 8 kali
pedesuperwow
 
Common scrum issues
Common scrum issuesCommon scrum issues
Common scrum issues
Jen-Chieh Ko
 
2. sistemas de numeracion
2. sistemas de numeracion2. sistemas de numeracion
2. sistemas de numeracion
boounzueta
 
15. c combin ovejas
15. c combin ovejas15. c combin ovejas
15. c combin ovejas
boounzueta
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
Tomica Kaniski
 
Preventores sociales comunitarios
Preventores sociales comunitariosPreventores sociales comunitarios
Preventores sociales comunitarios
Richard Ortega
 
Agile Development 2012 sharing and Kanban Introduction
Agile Development 2012 sharing and Kanban IntroductionAgile Development 2012 sharing and Kanban Introduction
Agile Development 2012 sharing and Kanban Introduction
Jen-Chieh Ko
 
Dynamics AX - Point of Service Not Point of Sale
Dynamics AX - Point of Service Not Point of SaleDynamics AX - Point of Service Not Point of Sale
Dynamics AX - Point of Service Not Point of Sale
AmandaMulquiney
 
xRM Twilight Presentation
xRM Twilight PresentationxRM Twilight Presentation
xRM Twilight Presentation
Intergen
 
Tema wanita berharga bagi tuhan
Tema  wanita berharga bagi tuhanTema  wanita berharga bagi tuhan
Tema wanita berharga bagi tuhan
Rintujok Perrines
 
Tr garland business networking expert - entrepreneur magazine - part 1
Tr garland   business networking expert - entrepreneur magazine - part 1Tr garland   business networking expert - entrepreneur magazine - part 1
Tr garland business networking expert - entrepreneur magazine - part 1
TR Garland
 
Improve your company's performance with IMAFS
Improve your company's performance with IMAFSImprove your company's performance with IMAFS
Improve your company's performance with IMAFS
IMAFS
 
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3), inf...
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3),  inf...Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3),  inf...
Liburan murah ke bali, harga rp 250 rb 2hr 1 mlm. hub 08563776704 (im3), inf...
Wisata Jawa
 
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare - Brochure istituzionale 2011Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare
 
Diseño y construccion de medios alternativos de comunicación para
Diseño y construccion de medios alternativos de comunicación paraDiseño y construccion de medios alternativos de comunicación para
Diseño y construccion de medios alternativos de comunicación para
Richard Ortega
 
MB6-890 Score Report
MB6-890 Score ReportMB6-890 Score Report
MB6-890 Score Report
Randy King
 
Senam kegel pria untuk bercinta hingga 8 kali
Senam kegel pria untuk bercinta hingga 8 kaliSenam kegel pria untuk bercinta hingga 8 kali
Senam kegel pria untuk bercinta hingga 8 kali
pedesuperwow
 
Common scrum issues
Common scrum issuesCommon scrum issues
Common scrum issues
Jen-Chieh Ko
 
2. sistemas de numeracion
2. sistemas de numeracion2. sistemas de numeracion
2. sistemas de numeracion
boounzueta
 
15. c combin ovejas
15. c combin ovejas15. c combin ovejas
15. c combin ovejas
boounzueta
 
Ad

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

Less15 Backups
Less15 BackupsLess15 Backups
Less15 Backups
vivaankumar
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
Yogiji Creations
 
SQL server Backup Restore Revealed
SQL server Backup Restore RevealedSQL server Backup Restore Revealed
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
malonzo
 
Backup and restore
Backup and restoreBackup and restore
Backup and restore
Riteshkiit
 
DMS
DMSDMS
DMS
Awais Majeed
 
my final ppresenntation.pptx
my final ppresenntation.pptxmy final ppresenntation.pptx
my final ppresenntation.pptx
AlifAlAshik2
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
vivaankumar
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPress
Chris Jean
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
vivaankumar
 
Sql server lesson10
Sql server lesson10Sql server lesson10
Sql server lesson10
Ala Qunaibi
 
Backup and recovery in sql server database
Backup and recovery in sql server databaseBackup and recovery in sql server database
Backup and recovery in sql server database
Anshu Maurya
 
17398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv117398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv1
Mmusi Dithotse
 
database backup and recovery
database backup and recoverydatabase backup and recovery
database backup and recovery
sdrhr
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
Handy_Backup
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oracle
sadegh salehi
 
Chapter12 Managing And Implementing Backups And Disaster Recovery
Chapter12     Managing And Implementing Backups And Disaster RecoveryChapter12     Managing And Implementing Backups And Disaster Recovery
Chapter12 Managing And Implementing Backups And Disaster Recovery
Raja Waseem Akhtar
 
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
module-3-chapter-2-backupandrecover.pptx
module-3-chapter-2-backupandrecover.pptxmodule-3-chapter-2-backupandrecover.pptx
module-3-chapter-2-backupandrecover.pptx
DrUshaDivakarlaNMAMI
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
asifmalik110
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
Yogiji Creations
 
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
malonzo
 
Backup and restore
Backup and restoreBackup and restore
Backup and restore
Riteshkiit
 
my final ppresenntation.pptx
my final ppresenntation.pptxmy final ppresenntation.pptx
my final ppresenntation.pptx
AlifAlAshik2
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
vivaankumar
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPress
Chris Jean
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
vivaankumar
 
Sql server lesson10
Sql server lesson10Sql server lesson10
Sql server lesson10
Ala Qunaibi
 
Backup and recovery in sql server database
Backup and recovery in sql server databaseBackup and recovery in sql server database
Backup and recovery in sql server database
Anshu Maurya
 
17398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv117398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv1
Mmusi Dithotse
 
database backup and recovery
database backup and recoverydatabase backup and recovery
database backup and recovery
sdrhr
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
Handy_Backup
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oracle
sadegh salehi
 
Chapter12 Managing And Implementing Backups And Disaster Recovery
Chapter12     Managing And Implementing Backups And Disaster RecoveryChapter12     Managing And Implementing Backups And Disaster Recovery
Chapter12 Managing And Implementing Backups And Disaster Recovery
Raja Waseem Akhtar
 
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
module-3-chapter-2-backupandrecover.pptx
module-3-chapter-2-backupandrecover.pptxmodule-3-chapter-2-backupandrecover.pptx
module-3-chapter-2-backupandrecover.pptx
DrUshaDivakarlaNMAMI
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
asifmalik110
 
Ad

More from Vinod Kumar (7)

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

Recently uploaded (20)

TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 

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.