Backup and Restore your SQL Server Database

Slides:



Advertisements
Similar presentations
SQL Server Disaster Recovery Chris Shaw Sr. SQL Server DBA, Xtivia Inc.
Advertisements

FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
©2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 5 Slide 1 IT390 Business Database Administration Unit 5 :
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Backup, Integrity Check and Index and Statistics Maintenance
Microsoft SQL Server Administration for SAP Database Backup and Restore.
Week 9 – Chapter 8 SQL 710 Methods to Backup Databases
Module 12: Backup and Recovery. Overview Backup and recovery methods available in Oracle and SQL Server 2008 Types of failure Types of recovery Formulating.
Module 7: Restoring Databases. Overview SQL Server Recovery Process Preparing to Restore a Database Restoring Backups Restoring Databases from Different.
Database Backup and Recovery
Module 5 Understanding SQL Server 2008 R2 Recovery Models.
Presented by Joseph Galvan & Stacy Kemp BACKUPS.  Using database backups, a database administrator (DBA’s) can restore from the last backup or to a specific.
1 Chapter Overview Understanding Backup Terms, Media, and Devices Backing Up Databases, Files, Filegroups, and Transaction Logs Restoring a User Database.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 14: Problem Recovery.
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
Chapter 11: Designing a Data Recovery Solution for a Database MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
Architecture Rajesh. Components of Database Engine.
Rajib Kundu Agenda Definitions Failover Cluster Database Snapshots Log shipping Database Mirroring.
Module 6 Backup of SQL Server 2008 R2 Databases. Module Overview Backing up Databases and Transaction Logs Managing Database Backups Working with Backup.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
MS SQL by: Bryan Bankhead CIS 407. General Concepts  Backing up and Restoring databases and transaction logs is a way that SQL Server provides protection.
11 DISASTER RECOVERY Chapter 13. Chapter 13: DISASTER RECOVERY2 OVERVIEW  Back up server data using the Backup utility and the Ntbackup command  Restore.
Understanding Logging & Recovery What Programmers Always Avoid Until it’s too Late! Kimberly L. Tripp Principal Mentor, Solid Quality Learning at
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
1 Chapter Overview Understanding Data Restoration Issues Understanding the Types of Database Backups Understanding the Restoration Process.
4. SQL Backup tasks Objectives –Secure the databases and the database server Contents –Understanding Backup Terms, –Backing Up Databases, Files, Filegroups,
Learningcomputer.com SQL Server 2008 – Backup and Restore Database.
Backup and Recovery - II - Checkpoint - Transaction log – active portion - Database Recovery.
Data Disaster Recovery Planning Greg Fibiger 1/7/2016.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
Digging Out From Corruption Eddie Wuerch, MCM - Principal, Database Performance - Salesforce Marketing Cloud Data protection and loss recovery with SQL.
19 Copyright © 2004, Oracle. All rights reserved. Database Backups.
AGENDA 1.Importance of backups and backup strategy 2.Full DB backup and Restore 3.Filegroup Backup and restore 4.File Backup and Restore 5.Page restore.
Database Administration for the Non-DBA Denny Cherry twitter.com/mrdenny.
Thank You! Local PASS Community & Sponsors!. Restoring a SQL Server database from Azure Blob Storage (200-level) Randolph
Dealing with Database Corruption DBA 911. Who am I? 2 David M Maxwell twitter.com/dmmaxwell or twitter.com/upsearchsqltwitter.com/dmmaxwelltwitter.com/upsearchsql.
ProgressBook Suite Maintenance
Database recovery contd…
SQL Backups for Beginners by Mark Gordon
Database Administration
Automated Restore Script Output for Ola Hallengren’s Maintenance Solution 1) Start SQL Services on Local 2) Connect to Azure AlwaysOn 3) Delete all maintenance.
Inside transaction logging
Tips for SQL Server Performance and Resiliency
Curacao SQL Saturday June 11, 2016
Disaster Recovery Where to Begin
Database Corruption Advanced Recovery Techniques|
Disaster Recovery and SQL for new and non-DBAs
Peter Shore SQL Saturday Pittsburgh 2017
Building Effective Backups
The Nitty-Gritty of Database Backups
Summit Nashville /14/2018 9:26 PM
Introduction to SQL Server Management for the Non-DBA
Tips for SQL Server Performance and Resiliency
Database Corruption Advanced Recovery Techniques
The Ultimate Maintenance Plan By Ed Roepe Perimeter DBA, LLC
Back Up and Restore? Piece of Cake!
Peter Shore SQL Saturday Cleveland 2016
RPO, RTO & SLA: 3 Letter Words for When the SHT hits the FAN
Backup to Basics Tom Fox
The Ultimate Maintenance Plan By Edward Roepe Perimeter DBA, LLC
Disaster Recovery is everyone’s job!
Andy Puckett – Sales Engineer
Performing Database Recovery
Chapter 11 Managing Databases with SQL Server 2000
Disaster Recovery Done Dirt Cheap Founder Curnutt Data Solutions
Backup & Recovery.
Ch 10. Maintaining and Automating SQL Server
The DBA Quit and now you’re it:
Presentation transcript:

Backup and Restore your SQL Server Database The most important part of the job!

Corruption User error Malicious activity Disaster recovery Why do we back up? Corruption User error Malicious activity Disaster recovery

How do we recover a database that is borked? Restore from the last known good backup. - Microsoft

How do we know if the last known backup is good? Test. Your. Backups. - Basically every data professional

The business makes the rules Recovery Point Objective (RPO) Recovery Time Objective (RTO) Service Level Agreement (SLA)

Recovery point objective (RPO) How much data are we prepared to lose?

Recovery time objective (RPO) How much time do we have to recover?

Defining a restore strategy, redux How much data can we lose? (RPO) How long will recovery take? (RTO) Can we actually do this? (SLA)

How do we back up our databases? Copy database files File snapshots Database snapshots Built-in BACKUP command SQL native backup

What is the one true backup method? SQL Server native backup (the built-in BACKUP command)

Corollary to the one true backup method A SQL Server native backup is only as good as its restore (the built-in RESTORE command)

What does a SQL Server data file look like? Lots of 8KB data pages All objects are stored in pages Each page has a header 8 contiguous pages = extent

What does a SQL Server transaction log look like? Virtual log files Log Sequence Numbers Active / inactive Circular Recovery model etutorials.org

So what is a recovery model then? Full recovery model Bulk-logged recovery model Simple recovery model

All transactions are fully logged The log file grows until cleared Full recovery model All transactions are fully logged The log file grows until cleared Transaction log backups needed Allows point-in-time recovery

Bulk-logged recovery model Bulk operations minimally logged The log file grows until cleared Transaction log backups needed Some point-in-time recovery

Log file cleared after every commit No transaction logging at all Simple recovery model Log file cleared after every commit No transaction logging at all No point-in-time recovery possible

What types of backups can I take? Full backup Differential backup Transaction log backup File / filegroup backup* Partial backup*

Full backup (BACKUP DATABASE) Copy of entire data file Active portion of the log Full, bulk-logged, simple

Full backup (BACKUP DATABASE WITH COPY_ONLY) Copy of entire data file Active portion of the log Does not affect differentials Full, bulk-logged, simple

Extents changed since last full Active portion of the log Differential backup Extents changed since last full Active portion of the log Each differential is bigger Not affected by COPY_ONLY Full, bulk-logged, simple

Transaction log backup Active portion of the log Full and bulk-logged only

Log backups are incremental Differential backups are not Backup chain Log backups are incremental Differential backups are not

Restore a full backup (can include a COPY_ONLY backup)

Restore to a point in time (basic method) Restore a full backup (may include a COPY_ONLY backup) Restore all transaction logs Use WITH NORECOVERY option

Restore to a point in time with differential backups Restore a full backup* Restore latest differential backup Restore all transaction logs Use WITH NORECOVERY option

Automation is the new black Automate your backups ola.hallengren.com / dbatools.io / minionware.net / ** SQL Agent ** Notify on failure, not success Automate your restore script Steve Stedman (bit.ly/automateScript)

Copy backups securely off-premises Test restores frequently Best practices Back up with CHECKSUM Copy backups securely off-premises Test restores frequently DBCC CHECKDB is your friend Automate all the things

SQL Server Maintenance Wizard Do use: Tips and tricks Don’t use: SQL Server Maintenance Wizard Do use: Ola Hallengren’s Maintenance Solution MinionWare Backup

Show Me The Money imgflip.com