SlideShare une entreprise Scribd logo
1  sur  33
Backup beyond just a strategy with SQL Server Vinod Kumar Technology Evangelist Microsoft Corporation www.ExtremeExperts.com http://blogs.sqlxml.org/vinodkumar
Session Objectives and Takeaways Session Objectives Know some of the basics of SQL Server What makes an effective Strategy for backup Both from Technology Enhancements Actual implementations Takeaways These 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 Roles Database Administration  Database Development  Database Operations and Support  Database Solutions Architect
File Creation/Initialization Creation of database files Files being restored are created and initialized. This step is NOT performed if file already exists. Do not drop database prior to restoring it. Time requirement SQL Server 2000 Write throughput of data devices (disks, RAID controllers, etc.) Same time as CREATE DATABASE or ALTER DATABASE ADD FILE SQL Server 2005+ – Zero-initialization SKIPPED
Data/Transaction Log Copy File containing data or transaction log is copied from backup devices to destination Length of this phase: Amount of data or log to be copied Slowest 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 system CPU usage should be insignificant
Redo Redo (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), and System performance. Planning: How fast is redo relative to production workload?
Undo Undo 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 transactions Planning: Very hard – depends on how transactions have been written and/or if long running transactions exist…
Phases of Restore File Creation/Initialization  Same as CREATE DATABASE Minimized by Skipping zero-initialization Data and/or Transaction Log Copy  Based on Media type and DB Size 	Minimized by Optimizing HW Configuration and Throughput Redo/Roll-forward Log Type/Frequency of Backups Minimized by SQL Server Transaction Log Information Undo Uncommitted Transactions  Impossible to predict Database Accessible upon REDO completion!
Instant File Initialization Skip data file zeroing Create VLDB, Add or grow file, Initialize for restore, …in seconds! Security Prior disk contents not overwritten until used Extra care if SQL Server shut down or DB detached  Secure by default Permission grantable only by Windows administrator
Online Restore SQL Server 2000 One damaged page/device/file ENTIRE database marked suspect,		 taken “offline” Database is not available during restore SQL Server 2005+ onwards Database remains online Only data being restored is unavailable File/filegroup restore
Piecemeal ManagementFine Grained Operations Operations affect the minimum amount of data Pages Filegroups Partitions Data not involved remains Available Performant
FilegroupsBasic unit of availability Earlier Versions of SQL Server Entire database SQL Server 2005+ Database can be online, yet not all filegroups are available
Available Primary Filegroup Database Filegroup A Filegroup B ExamplePiecemeal restore for disaster recovery Online restore of filegroups in priority order Backups Primary Log Filegroup A Filegroup B
Piecemeal Backup-Restore Partial database availability during restore Based on file/filegroup backup Works with all recovery models Full, Simple, Bulk-Logged Supported only for databases with multiple filegroups Filegroups must be recovered to consistent point
Short Restore SequenceFor Read-Only Data  Log backups need not be restored when… File/filegroup is unchanged since backup File has been rolled forward to where it is read-only  Useful for read-only tables or partitions Set filegroup read-only Recommended for FULL and BULK-LOGGED databases Prevents inadvertent change Prevents changes by background tasks Required for SIMPLE model databases Log backup for roll forward not available
Primary Filegroup Filegroup A RESTORE   DATABASE D…   FILEGROUP=‘B’ Available Restore Damaged FilegroupFull model database Log Backups Primary        Backup Database Filegroup A        Backup Filegroup B Backup Filegroup B Read - Only Filegroup C Backup Filegroup C Read - Only
Recovery Models - Glance Full  No work loss Supports recovery to any point-in-time Simple Simplest backup/restore strategy Simplifies log management No log backups Greatest work loss possible No point-in-time recovery No access to tail  Bulk_Logged High performance bulk operations Minimal log space for bulk operations Some work loss exposure Many large data warehouses fit this model
Partial Backups Two new types of backup Partial Database Similar to a full database backup, but contains only the read-write filegroups Partial Differential Similar to a full database differential, but contains only the read-write filegroups Added to allow piecemeal restore of simple model databases Also work with full and bulk-logged models
Piecemeal Backup-RestoreSimple Model Databases Required backups Partial database backup File or filegroup backups of read-only filegroups Must be consistent with partial Optional backups Partial differential File/filegroup differential If filegroup normally read-only was changed, then made read-only again
BACKUP   DATABASE D…   WITH PARTIAL Primary Filegroup Filegroup A BACKUP   DATABASE D…   FILEGROUP=‘B’ BACKUP   DATABASE D…   FILEGROUP=‘C’ Piecemeal BackupSimple model database Database Partial        Backup Filegroup B Backup Filegroup B Read - Only Filegroup C Backup Filegroup C Read - Only
RESTORE   DATABASE D…   WITH PARTIAL Primary Filegroup Filegroup A RESTORE   DATABASE D…   FILEGROUP=‘B’ Filegroup B Read - Only RESTORE   DATABASE D…   FILEGROUP=‘C’ Filegroup C Available Read - Only Piecemeal RestoreSimple model database Database Partial        Backup Filegroup B Backup Filegroup C Backup
Primary Filegroup Filegroup A RESTORE   DATABASE D…   FILEGROUP=‘B’ Available Restore Damaged FilegroupSimple model database Database Partial        Backup Filegroup B Backup Filegroup B Read - Only Filegroup C Backup Filegroup C Read - Only
Unavailable RESTORE   DATABASE D…   WITH PARTIAL Available Restore Damaged PrimarySimple model database Database Partial        Backup Primary Filegroup Filegroup A Filegroup B Backup Filegroup B Database Primary and A may be taken back in time without restoring filegroups B and C if B and C are consistent Read - Only Filegroup C Backup Filegroup C Read - Only
Damaged Page Tracking And Restore Damaged pages encountered on read  Torn page or checksum error Bad Page ID Short read Database remains available Transaction rolls back BUT error during rollback forces database restart Damaged pages  Automatically tracked in a table May be restored and recovered online Works for databases with a single filegroup
Page Restore Versus File Restore Consider page restore when… You have a limited number of damaged pages You must maintain maximum availability Consider file restore when… A device is failing You have large numbers of damaged pages You need to relocate data to another device You can tolerate the affected filegroupbeing unavailable
Data Page Verification Types Torn page detection – 7.0 and 2000 Page checksum – NEW! Page checksum Detect disk I/O errors not reported by the hardware or operating system When the checksum is verified Retries eliminate transients  If verification fails, A unique error is raised  Connection is terminated Page is tracked
Backup Verification Detect errors unreported by the backup devices or operating system Backup checksums are optionally generated Verified by RESTORE RESTORE VERIFYONLY Backup optionally validates page checksums if these are present Optionally continue past page checksum errors to complete the backup
Continue Past Restore Errors Why? A damaged backup may be the only one available Continue past errors encountered by RESTORE RESTORE VERIFYONLY Allows the restore sequence to continue as far as possible… Affected file groups are left in suspect state
Backup/RestoreMirrored Media Sets Redundant backup media helps guarantee successful restore Extra copies for Archival Disaster recovery
Demo
31 Summary Backups are the most important step in restoring your DB in event of failure Maybe your first and last resort Must understand the effects of using them Know ALL the options in handling disaster All the Best !!!
Questions www. ExtremeExperts.com http://blogs.sqlxml.org/vinodkumar T: @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.

Contenu connexe

Tendances

Tendances (20)

Noel sps bay_backup_restore
Noel sps bay_backup_restoreNoel sps bay_backup_restore
Noel sps bay_backup_restore
 
Test
TestTest
Test
 
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
 
Les 20 dup_db
Les 20 dup_dbLes 20 dup_db
Les 20 dup_db
 
Les 13 memory
Les 13 memoryLes 13 memory
Les 13 memory
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Les 12 fl_db
Les 12 fl_dbLes 12 fl_db
Les 12 fl_db
 
Les 01 core
Les 01 coreLes 01 core
Les 01 core
 
Sps baltimore backupand_restore-dpm
Sps baltimore backupand_restore-dpmSps baltimore backupand_restore-dpm
Sps baltimore backupand_restore-dpm
 
Les 02 config
Les 02 configLes 02 config
Les 02 config
 
Less02 Installation
Less02 InstallationLess02 Installation
Less02 Installation
 
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
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
 
Les 04 config_bu
Les 04 config_buLes 04 config_bu
Les 04 config_bu
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
Les 03 catalog
Les 03 catalogLes 03 catalog
Les 03 catalog
 
Les 19 space_db
Les 19 space_dbLes 19 space_db
Les 19 space_db
 
Les 08 tune_rman
Les 08 tune_rmanLes 08 tune_rman
Les 08 tune_rman
 
Les 11 fl2
Les 11 fl2Les 11 fl2
Les 11 fl2
 

En vedette

Preventores sociales comunitarios
Preventores sociales comunitariosPreventores sociales comunitarios
Preventores sociales comunitariosRichard 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 IntroductionJen-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 SaleAmandaMulquiney
 
xRM Twilight Presentation
xRM Twilight PresentationxRM Twilight Presentation
xRM Twilight PresentationIntergen
 
Tema wanita berharga bagi tuhan
Tema  wanita berharga bagi tuhanTema  wanita berharga bagi tuhan
Tema wanita berharga bagi tuhanRintujok 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 1TR 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 IMAFSIMAFS
 
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 2011Meroni 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 paraRichard Ortega
 
MB6-890 Score Report
MB6-890 Score ReportMB6-890 Score Report
MB6-890 Score ReportRandy 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 kalipedesuperwow
 
Common scrum issues
Common scrum issuesCommon scrum issues
Common scrum issuesJen-Chieh Ko
 
2. sistemas de numeracion
2. sistemas de numeracion2. sistemas de numeracion
2. sistemas de numeracionboounzueta
 
15. c combin ovejas
15. c combin ovejas15. c combin ovejas
15. c combin ovejasboounzueta
 

En vedette (19)

Preventores sociales comunitarios
Preventores sociales comunitariosPreventores sociales comunitarios
Preventores sociales comunitarios
 
Membangun relasi
Membangun relasiMembangun relasi
Membangun relasi
 
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
 
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
 
xRM Twilight Presentation
xRM Twilight PresentationxRM Twilight Presentation
xRM Twilight Presentation
 
Tema wanita berharga bagi tuhan
Tema  wanita berharga bagi tuhanTema  wanita berharga bagi tuhan
Tema wanita berharga bagi tuhan
 
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
 
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
 
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...
 
Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare - Brochure istituzionale 2011Meroni comunicare - Brochure istituzionale 2011
Meroni comunicare - Brochure istituzionale 2011
 
Ayat Hafalan Minggu ini
Ayat Hafalan Minggu iniAyat Hafalan Minggu ini
Ayat Hafalan Minggu ini
 
How to backup sql
How to backup sqlHow to backup sql
How to backup sql
 
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
 
MB6-890 Score Report
MB6-890 Score ReportMB6-890 Score Report
MB6-890 Score Report
 
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
 
Common scrum issues
Common scrum issuesCommon scrum issues
Common scrum issues
 
2. sistemas de numeracion
2. sistemas de numeracion2. sistemas de numeracion
2. sistemas de numeracion
 
15. c combin ovejas
15. c combin ovejas15. c combin ovejas
15. c combin ovejas
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
 

Similaire à Backup beyond just a strategy with SQL Server

Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recoveryYogiji Creations
 
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02malonzo
 
Backup and restore
Backup and restoreBackup and restore
Backup and restoreRiteshkiit
 
my final ppresenntation.pptx
my final ppresenntation.pptxmy final ppresenntation.pptx
my final ppresenntation.pptxAlifAlAshik2
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Buvivaankumar
 
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 WordPressChris Jean
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Conceptsvivaankumar
 
Sql server lesson10
Sql server lesson10Sql server lesson10
Sql server lesson10Ala 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 databaseAnshu Maurya
 
17398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv117398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv1Mmusi Dithotse
 
database backup and recovery
database backup and recoverydatabase backup and recovery
database backup and recoverysdrhr
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database BackupHandy_Backup
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oraclesadegh 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 RecoveryRaja 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 ReyesSpanishPASSVC
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recoveryasifmalik110
 

Similaire à Backup beyond just a strategy with SQL Server (20)

Less15 Backups
Less15 BackupsLess15 Backups
Less15 Backups
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
 
SQL server Backup Restore Revealed
SQL server Backup Restore RevealedSQL server Backup Restore Revealed
SQL server Backup Restore Revealed
 
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
Techedafricademystifyingbackuprestoreinsharepoint2007 090805103250 Phpapp02
 
Backup and restore
Backup and restoreBackup and restore
Backup and restore
 
DMS
DMSDMS
DMS
 
my final ppresenntation.pptx
my final ppresenntation.pptxmy final ppresenntation.pptx
my final ppresenntation.pptx
 
Les 05 Create Bu
Les 05 Create BuLes 05 Create Bu
Les 05 Create Bu
 
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
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
 
Sql server lesson10
Sql server lesson10Sql server lesson10
Sql server lesson10
 
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
 
17398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv117398351 sap-system-copy-homcopyv1
17398351 sap-system-copy-homcopyv1
 
database backup and recovery
database backup and recoverydatabase backup and recovery
database backup and recovery
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oracle
 
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
 
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
 
Backups And Recovery
Backups And RecoveryBackups And Recovery
Backups And Recovery
 
Less16 Recovery
Less16 RecoveryLess16 Recovery
Less16 Recovery
 

Plus de 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 PerformanceVinod 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 serverVinod 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 pessimisticVinod 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 PessimisticVinod Kumar
 
Sql Server Security
Sql Server SecuritySql Server Security
Sql Server SecurityVinod 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 WebcastVinod 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 FinalVinod Kumar
 

Plus de 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
 
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
 
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
 
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
 
Sql Server Security
Sql Server SecuritySql Server Security
Sql Server Security
 
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
 
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
 

Dernier

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Dernier (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Backup beyond just a strategy with SQL Server

  • 1. Backup beyond just a strategy with SQL Server Vinod Kumar Technology Evangelist Microsoft Corporation www.ExtremeExperts.com http://blogs.sqlxml.org/vinodkumar
  • 2. Session Objectives and Takeaways Session Objectives Know some of the basics of SQL Server What makes an effective Strategy for backup Both from Technology Enhancements Actual implementations Takeaways These 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 Roles Database Administration Database Development Database Operations and Support Database Solutions Architect
  • 4. File Creation/Initialization Creation of database files Files being restored are created and initialized. This step is NOT performed if file already exists. Do not drop database prior to restoring it. Time requirement SQL Server 2000 Write throughput of data devices (disks, RAID controllers, etc.) Same time as CREATE DATABASE or ALTER DATABASE ADD FILE SQL Server 2005+ – Zero-initialization SKIPPED
  • 5. Data/Transaction Log Copy File containing data or transaction log is copied from backup devices to destination Length of this phase: Amount of data or log to be copied Slowest 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 system CPU usage should be insignificant
  • 6. Redo Redo (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), and System performance. Planning: How fast is redo relative to production workload?
  • 7. Undo Undo 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 transactions Planning: Very hard – depends on how transactions have been written and/or if long running transactions exist…
  • 8. Phases of Restore File Creation/Initialization  Same as CREATE DATABASE Minimized by Skipping zero-initialization Data and/or Transaction Log Copy  Based on Media type and DB Size Minimized by Optimizing HW Configuration and Throughput Redo/Roll-forward Log Type/Frequency of Backups Minimized by SQL Server Transaction Log Information Undo Uncommitted Transactions  Impossible to predict Database Accessible upon REDO completion!
  • 9. Instant File Initialization Skip data file zeroing Create VLDB, Add or grow file, Initialize for restore, …in seconds! Security Prior disk contents not overwritten until used Extra care if SQL Server shut down or DB detached Secure by default Permission grantable only by Windows administrator
  • 10. Online Restore SQL Server 2000 One damaged page/device/file ENTIRE database marked suspect, taken “offline” Database is not available during restore SQL Server 2005+ onwards Database remains online Only data being restored is unavailable File/filegroup restore
  • 11. Piecemeal ManagementFine Grained Operations Operations affect the minimum amount of data Pages Filegroups Partitions Data not involved remains Available Performant
  • 12. FilegroupsBasic unit of availability Earlier Versions of SQL Server Entire database SQL Server 2005+ Database can be online, yet not all filegroups are available
  • 13. Available Primary Filegroup Database Filegroup A Filegroup B ExamplePiecemeal restore for disaster recovery Online restore of filegroups in priority order Backups Primary Log Filegroup A Filegroup B
  • 14. Piecemeal Backup-Restore Partial database availability during restore Based on file/filegroup backup Works with all recovery models Full, Simple, Bulk-Logged Supported only for databases with multiple filegroups Filegroups 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 backup File has been rolled forward to where it is read-only Useful for read-only tables or partitions Set filegroup read-only Recommended for FULL and BULK-LOGGED databases Prevents inadvertent change Prevents changes by background tasks Required for SIMPLE model databases Log backup for roll forward not available
  • 16. Primary Filegroup Filegroup A RESTORE DATABASE D… FILEGROUP=‘B’ Available Restore Damaged FilegroupFull model database Log Backups Primary Backup Database Filegroup A Backup Filegroup B Backup Filegroup B Read - Only Filegroup C Backup Filegroup C Read - Only
  • 17. Recovery Models - Glance Full No work loss Supports recovery to any point-in-time Simple Simplest backup/restore strategy Simplifies log management No log backups Greatest work loss possible No point-in-time recovery No access to tail Bulk_Logged High performance bulk operations Minimal log space for bulk operations Some work loss exposure Many large data warehouses fit this model
  • 18. Partial Backups Two new types of backup Partial Database Similar to a full database backup, but contains only the read-write filegroups Partial Differential Similar to a full database differential, but contains only the read-write filegroups Added to allow piecemeal restore of simple model databases Also work with full and bulk-logged models
  • 19. Piecemeal Backup-RestoreSimple Model Databases Required backups Partial database backup File or filegroup backups of read-only filegroups Must be consistent with partial Optional backups Partial differential File/filegroup differential If filegroup normally read-only was changed, then made read-only again
  • 20. BACKUP DATABASE D… WITH PARTIAL Primary Filegroup Filegroup A BACKUP DATABASE D… FILEGROUP=‘B’ BACKUP DATABASE D… FILEGROUP=‘C’ Piecemeal BackupSimple model database Database Partial Backup Filegroup B Backup Filegroup B Read - Only Filegroup C Backup Filegroup C Read - Only
  • 21. RESTORE DATABASE D… WITH PARTIAL Primary Filegroup Filegroup A RESTORE DATABASE D… FILEGROUP=‘B’ Filegroup B Read - Only RESTORE DATABASE D… FILEGROUP=‘C’ Filegroup C Available Read - Only Piecemeal RestoreSimple model database Database Partial Backup Filegroup B Backup Filegroup C Backup
  • 22. Primary Filegroup Filegroup A RESTORE DATABASE D… FILEGROUP=‘B’ Available Restore Damaged FilegroupSimple model database Database Partial Backup Filegroup B Backup Filegroup B Read - Only Filegroup C Backup Filegroup C Read - Only
  • 23. Unavailable RESTORE DATABASE D… WITH PARTIAL Available Restore Damaged PrimarySimple model database Database Partial Backup Primary Filegroup Filegroup A Filegroup B Backup Filegroup B Database Primary and A may be taken back in time without restoring filegroups B and C if B and C are consistent Read - Only Filegroup C Backup Filegroup C Read - Only
  • 24. Damaged Page Tracking And Restore Damaged pages encountered on read Torn page or checksum error Bad Page ID Short read Database remains available Transaction rolls back BUT error during rollback forces database restart Damaged pages Automatically tracked in a table May be restored and recovered online Works for databases with a single filegroup
  • 25. Page Restore Versus File Restore Consider page restore when… You have a limited number of damaged pages You must maintain maximum availability Consider file restore when… A device is failing You have large numbers of damaged pages You need to relocate data to another device You can tolerate the affected filegroupbeing unavailable
  • 26. Data Page Verification Types Torn page detection – 7.0 and 2000 Page checksum – NEW! Page checksum Detect disk I/O errors not reported by the hardware or operating system When the checksum is verified Retries eliminate transients If verification fails, A unique error is raised Connection is terminated Page is tracked
  • 27. Backup Verification Detect errors unreported by the backup devices or operating system Backup checksums are optionally generated Verified by RESTORE RESTORE VERIFYONLY Backup optionally validates page checksums if these are present Optionally continue past page checksum errors to complete the backup
  • 28. Continue Past Restore Errors Why? A damaged backup may be the only one available Continue past errors encountered by RESTORE RESTORE VERIFYONLY Allows the restore sequence to continue as far as possible… Affected file groups are left in suspect state
  • 29. Backup/RestoreMirrored Media Sets Redundant backup media helps guarantee successful restore Extra copies for Archival Disaster recovery
  • 30. Demo
  • 31. 31 Summary Backups are the most important step in restoring your DB in event of failure Maybe your first and last resort Must understand the effects of using them Know ALL the options in handling disaster All the Best !!!
  • 32. Questions www. ExtremeExperts.com http://blogs.sqlxml.org/vinodkumar T: @vinodk_sql
  • 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.