SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
1/38
Oracle Database Backup-and-Recovery 
Instructor: 
Dr.Baraani 
Creator: 
Mohammad Sadegh Salehi
Fall 2014 3/38 
<Insert Picture Here> 
Agenda 
■Purpose of Backup and Recovery. 
■ Oracle Data Protection Planning & Solutions 
■ Oracle Backup & Recovery Solutions 
 Physical Data Protection 
• Recovery Manager 
 Logical Data Protection 
• Flashback Technologies 
 Recovery Analysis 
• Data Recovery Advisor 
■Q&A
Fall 2014 4/38 
Purpose of Backup and Recovery 
Data Protection Concerns… 
■ Planning and testing responses to different kinds of failures 
■ Configuring the database environment for backup and recovery 
■ Setting up a backup schedule 
■ Monitoring the backup and recovery environment 
■ Troubleshooting backup problems 
■ Recovering from data loss if the need arises 
 Backup administration tasks include the 
following:
Fall 2014 5/38 
Data Protection 
 A backup is a copy of data of a database that 
you can use to reconstruct data. 
 Physical backup 
Are copies of the physical files used in storing and recovering 
a database. These files include data files, control files, and 
archived redo logs. 
 Logical backups 
Contain logical data such as tables and stored procedures.
Fall 2014 6/38 
Many Types of Data Loss to Protect Against 
User Error 
Management Error 
Forgetfulness 
Malicious Behavior 
Software Error 
Storage Media Error 
Storage System Failure 
Data Center Outage
Fall 2014 7/38 
■A media failure is a physical problem with a disk, 
■ That causes a failure of a read from or write to a disk 
file that is required to run the database. 
Many Types of Data Loss to Protect Against 
 Media Failure 
 User Errors 
■ User errors occur when, either due to an error in 
application logic or a manual mistake, 
■ Data in a database is changed or deleted incorrectly. 
■ User errors are estimated to be the greatest single 
cause of database downtime.
Fall 2014 8/38 
Storage Tools 
Snapshots, Replication, Archive, Analytics 
Database Tools 
Data Guard & Active Data Guard 
Data Recovery Advisor, RMAN 
Operating System Tools 
Built in Backup and Recovery Tools, 
Snapshots, Boot Environments 
Virtualization Tools 
Oracle Virtual Machine, Enterprise Manager 
Software Tools 
Oracle Enterprise Manager, 
Tools for Oracle Database Data Protection 
The Ultimate Integrated Data Protection Solution
Fall 2014 9/38 
Oracle Backup & Recovery Solutions 
“Backup and Recovery on Steroids” 
File System Data 
UNIX Linux 
Windows NAS 
Recovery 
Manager 
(RMAN) 
Oracle Databases 
Physical Data Protection 
Data Recovery Advisor 
Logical Data 
Protection 
Recovery Analysis 
Flashback Technologies
Fall 2014 10/38 
Backup & Recovery Foundation 
Complete Oracle Solution from Disk to Tape 
File System Data 
UNIX Linux 
Windows NAS 
Oracle Databases 
Oracle Recovery 
Manager (RMAN) Fast Recovery Area 
Tape Backup 
Amazon S3 
Cloud Storage 
Oracle Secure Backup 
(OSB) 
Oracle Secure Backup 
(OSB) Cloud Module
11/38 
Oracle Recovery Manager (RMAN) 
Oracle-integrated Backup & Recovery Engine 
Oracle Enterprise 
Manager 
RMAN 
Database 
Fast Recovery 
Area 
Tape Drive 
Oracle Secure 
Backup 
• Intrinsic knowledge of database 
file formats and recovery 
procedures 
• Block validation 
• Online block-level recovery 
• Tablespace/data file recovery 
• Online, multi-streamed backup 
• Unused block compression 
• Native encryption 
• Integrated disk, tape & cloud 
backup leveraging the Fast 
Recovery Area and Oracle 
Cloud Secure Backup
Fall 2014 12/38 
Oracle Backup and Recovery Solutions 
 Recovery Manager (RMAN) 
 User-managed backup and recovery 
 Recovery Manager is fully integrated with the Oracle database to 
perform a range of backup and recovery activities. 
 You can access RMAN through the command line or through Oracle 
Enterprise Manager. 
 In this solution, you perform backup and recovery with a mixture 
of host operating system commands and SQL*Plus recovery 
commands. 
 You are responsible for determining all aspects of when and how 
backups and recovery are done.
Fall 2014 13/38 
Feature Comparison of Backup Techniques 
Feature Recovery 
Manager 
User-managed Data Pump Export 
Closed database 
backups 
Supported. Supported Not supported. 
Open database 
backups 
Supported. Supported. Requires rollback 
or undo segments 
to generate 
consistent backups. 
Incremental 
backups 
Supported Not supported. Not supported. 
Corrupt block 
detection 
Supported. Not supported. Supported. 
Automatic 
specification of files 
to include in a 
backup 
Supported Not supported. Not applicable. 
Backup repository Supported Not supported. Not supported.
Fall 2014 14/38 
Feature Comparison of Backup Techniques 
Feature Recovery 
Manager 
User-managed Data Pump Export 
Backups to a media 
manager 
Supported. Supported. Not supported. 
Backup of 
initialization 
parameter file 
Supported. Supported. Not supported. 
Backup of 
password and 
networking files 
Not supported. Supported. Not supported. 
Platform-independent 
language for 
backups 
Supported. Not supported. Supported.
Fall 2014 15/38 
Start RMAN
Fall 2014 16/38 
Change RMAN Backup Configuration 
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/full_%u_%s_%p’; 
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; 
 %U, which generates a unique name. 
 Others include %d for the DB_NAME, 
 %t for the backup set time stamp, 
 %s for the backup set number, 
 And %p for the backup piece number.
Fall 2014 17/38 
Change RMAN Backup Configuration
Fall 2014 18/38 
Incremental backup 
■ Stores only blocks changed since a previous backup. 
■Thus, they provide more compact backups and faster 
recovery, 
■ thereby reducing the need to apply redo during data 
file media recovery.
Fall 2014 19/38 
Incremental backup 
BACKUP INCREMENTAL LEVEL 0 DATABASE; 
BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE; 
BACKUP INCREMENTAL LEVEL 1 DATABASE; 
 Creates a level 0 incremental backup to serve as a base for an 
incremental backup strategy: 
 Creates a level 1 cumulative incremental backup: 
 Creates a level 1 differential incremental backup:
Fall 2014 20/38 
Incremental backup
Fall 2014 21/38 
Validating & Cross-checking Database Files 
and Backups 
BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG 
ALL; 
VALIDATE DATAFILE 4 BLOCK 10 TO 13; 
VALIDATE BACKUPSET 3; 
 Validate all database files and archived redo log files for physical 
and logical corruption: 
 Check individual data blocks, as shown in the following example: 
 Validate backup sets, as shown in the following example: 
CROSSCHECK BACKUP; 
CROSSCHECK COPY; 
 The CROSSCHECK, synchronizes the logical records of 
RMAN backups and copies with the files on storage media.
Fall 2014 22/38 
Validating & Cross-checking Database Files 
and Backups
Fall 2014 23/38 
Recover Databae - RMAN 
 Automatic Recovery with the RECOVER Command:
Fall 2014 24/38 
■RMAN Step-by-Step Performance Tuning (NEW) 
 http://www.oracle.com/technology/deploy/availability/pdf/rman_tuning_mm 
_bp.pdf 
■Very Large Database Backup & Recovery Best Practices 
 http://www.oracle.com/technology/deploy/availability/pdf/vldb_br.pdf 
■Best Practices using Recovery Manager with Oracle Data 
Guard and Oracle Streams 
 http://www.oracle.com/technology/deploy/availability/pdf/oracle-openworld- 
2008/298772.pdf 
Additional Resources
Fall 2014 25/38 
Logical Data Protection 
Fast ‘Rewind’ of Logical Errors 
File System Data 
UNIX Linux 
Windows NAS 
Recovery 
Manager 
(RMAN) 
Oracle Databases 
Physical Data Protection 
Data Recovery Advisor 
Logical Data 
Protection 
Recovery Analysis 
Flashback Technologies
Fall 2014 26/38 
Flashback Technologies 
Error Detection & Correction 
■ Flashback revolutionizes error recovery 
 View ‘good’ data as of a past point-in-time 
 Simply rewind data changes 
 Time to correct error equals time to make error 
Correction Time = Error Time + f(DB_SIZE) 
• Low impact 
• Excellent tool for configuring QA, Dev and Training 
databases 
• Flashback is easy – simple commands, no complex 
procedure 
0 
20 
40 
60 
80 
Recovery Time 
Traditional 
Recovery 
Flashback
27/38 
Error Investigation with Flashback 
• Flashback Query 
– Query all data at point in time 
Tx 1 
Tx 2 
Tx 3 
select * from Salary AS OF ‘12:00 P.M.’ where … 
select * from Salary VERSIONS BETWEEN 
‘12:00 PM’ and ‘2:00 PM’ where … 
select * from FLASHBACK_TRANSACTION_QUERY 
where xid = HEXTORAW(‘000200030000002D’); 
 Flashback Transaction Query 
– See all changes made by a transaction 
 Flashback Version Query 
– See all versions of a row between times 
– See transactions that changed the row 
• All above are based on available UNDO
Fall 2014 28/38 
Rewinding a Database with Flashback 
Database 
 You can use the Oracle Flashback Database to rewind the 
whole database to a past time. 
 Unlike media recovery, you do not need to restore data files to 
return the database to a past state. 
 To use the RMAN FLASHBACK DATABASE command, 
 Your database must have been previously configured to generate flashback 
logs.
Fall 2014 29/38 
Rewinding a Database with Flashback 
Database
Fall 2014 30/38 
Using Normal and Guaranteed Restore 
Points
Fall 2014 31/38 
Flashback Example
32/38 
• Flashback Database – restore 
database to any point in time 
• Flashback Table – restore contents 
of tables to any point in time (undo-based) 
• Flashback Drop – restore 
accidentally dropped tables (based 
on free space in tablespace) 
• Flashback Transaction – back out 
transaction and all subsequent 
conflicting transactions (redo-based) 
Order 
Database 
Customer 
Error Correction with Flashback
Fall 2014 33/38 
Recovery Analysis 
Intelligent, Guided Recovery 
File System Data 
UNIX Linux 
Windows NAS 
Recovery 
Manager 
(RMAN) 
Oracle Databases 
Physical Data Protection 
Data Recovery Advisor 
Logical Data 
Protection 
Recovery Analysis 
Flashback Technologies
Fall 2014 34/38 
Time to Repair 
Data Recovery Advisor 
The Motivation 
■ Oracle provides robust tools for data 
repair: 
RMAN – physical media loss or corruptions 
 Flashback – logical errors 
Data Guard – physical problems 
■However, problem diagnosis and 
choosing the right solution can be error 
prone and time consuming 
 Errors more likely during emergencies 
Recovery 
Investigation 
& Planning
Fall 2014 35/38 
Data Recovery Advisor (DRA) 
■ Oracle Database tool that automatically diagnoses data failures, 
presents repair options, and executes repairs at the user's request 
■ Determines failures based on symptoms 
 E.g. an “open failed” because datafiles f045.dbf and f003.dbf are missing 
 Failure Information recorded in diagnostic Automatic Diagnostic 
Repository (ADR) 
 Flags problems before user discovers them, via automated health 
monitoring 
■ Intelligently determines recovery strategies 
 Aggregates failures for efficient recovery 
 Presents only feasible recovery options 
 Indicates any data loss for each option 
■ Can automatically perform selected recovery steps 
■ Accessed via RMAN or EM 
Reduces downtime by eliminating confusion
36/38 
Data Recovery Advisor Wizard
37/38 
Data Recovery Advisor – View Failures
38/38 
Data Recovery Advisor – Manual Repair
39/38

Contenu connexe

Tendances

Oracle data pump
Oracle data pumpOracle data pump
Oracle data pump
marcxav72
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
Satishbabu Gunukula
 

Tendances (20)

Rman Presentation
Rman PresentationRman Presentation
Rman Presentation
 
ORACLE ARCHITECTURE
ORACLE ARCHITECTUREORACLE ARCHITECTURE
ORACLE ARCHITECTURE
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
Oracle data pump
Oracle data pumpOracle data pump
Oracle data pump
 
Less16 Recovery
Less16 RecoveryLess16 Recovery
Less16 Recovery
 
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive PresentationNabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
 
Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different host
 
Oracle RDBMS architecture
Oracle RDBMS architectureOracle RDBMS architecture
Oracle RDBMS architecture
 
AlwaysON Basics
AlwaysON BasicsAlwaysON Basics
AlwaysON Basics
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Less06 networking
Less06 networkingLess06 networking
Less06 networking
 
Ms sql server architecture
Ms sql server architectureMs sql server architecture
Ms sql server architecture
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 

En vedette

database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
Kalhan Liyanage
 
2.6 backup and recovery
2.6 backup and recovery2.6 backup and recovery
2.6 backup and recovery
mrmwood
 
Presentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyyPresentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyy
Tehmina Gulfam
 

En vedette (20)

Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Backup And Recovery
Backup And RecoveryBackup And Recovery
Backup And Recovery
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
2.6 backup and recovery
2.6 backup and recovery2.6 backup and recovery
2.6 backup and recovery
 
Backup And Recovery
Backup And RecoveryBackup And Recovery
Backup And Recovery
 
Presentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyyPresentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyy
 
Database recovery
Database recoveryDatabase recovery
Database recovery
 
03 backup-and-recovery
03 backup-and-recovery03 backup-and-recovery
03 backup-and-recovery
 
Beginbackup
BeginbackupBeginbackup
Beginbackup
 
Oracle Database Management - Backup/Recovery
Oracle Database Management - Backup/RecoveryOracle Database Management - Backup/Recovery
Oracle Database Management - Backup/Recovery
 
MySQL 8.0 : Roles
MySQL 8.0 : RolesMySQL 8.0 : Roles
MySQL 8.0 : Roles
 
Nettoyage de matériels informatique
Nettoyage de matériels informatiqueNettoyage de matériels informatique
Nettoyage de matériels informatique
 
2011.11.23 - Le Cloud, Réalités et Perspectives - 8ème Forum du Club Cloud de...
2011.11.23 - Le Cloud, Réalités et Perspectives - 8ème Forum du Club Cloud de...2011.11.23 - Le Cloud, Réalités et Perspectives - 8ème Forum du Club Cloud de...
2011.11.23 - Le Cloud, Réalités et Perspectives - 8ème Forum du Club Cloud de...
 
Cyceo solution stockage de fichiers
Cyceo solution stockage de fichiersCyceo solution stockage de fichiers
Cyceo solution stockage de fichiers
 
10135 b 08
10135 b 0810135 b 08
10135 b 08
 
Track 2 - Atelier 1 - Big data analytics présenté avec Intel
Track 2 - Atelier 1 - Big data analytics présenté avec IntelTrack 2 - Atelier 1 - Big data analytics présenté avec Intel
Track 2 - Atelier 1 - Big data analytics présenté avec Intel
 
SBAAAM, Web Push Notification System V.12
SBAAAM, Web Push Notification System V.12SBAAAM, Web Push Notification System V.12
SBAAAM, Web Push Notification System V.12
 
Oracle Database Undo Segment Operation Concept
Oracle Database Undo Segment Operation ConceptOracle Database Undo Segment Operation Concept
Oracle Database Undo Segment Operation Concept
 
Mon Stockage a la Cloud Attitude
Mon Stockage a la Cloud Attitude Mon Stockage a la Cloud Attitude
Mon Stockage a la Cloud Attitude
 
2009-dec02_EMC2
2009-dec02_EMC22009-dec02_EMC2
2009-dec02_EMC2
 

Similaire à Backup and recovery in oracle

Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
Anar Godjaev
 
How to survive a disaster with RMAN
How to survive a disaster with RMANHow to survive a disaster with RMAN
How to survive a disaster with RMAN
Gustavo Rene Antunez
 
Oracle OCP Backup Exam
Oracle OCP Backup ExamOracle OCP Backup Exam
Oracle OCP Backup Exam
Inprise Group
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
vivaankumar
 
Oracle ocp backup exam
Oracle ocp backup examOracle ocp backup exam
Oracle ocp backup exam
sriram raj
 

Similaire à Backup and recovery in oracle (20)

Less15 Backups
Less15 BackupsLess15 Backups
Less15 Backups
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018Oracle Backup Solutions Overview August 2018
Oracle Backup Solutions Overview August 2018
 
What’s new in oracle 12c recovery manager (rman)
What’s new in oracle 12c recovery manager (rman)What’s new in oracle 12c recovery manager (rman)
What’s new in oracle 12c recovery manager (rman)
 
Oow14 con7681-rman-1
Oow14 con7681-rman-1Oow14 con7681-rman-1
Oow14 con7681-rman-1
 
Rman 12c new_features
Rman 12c new_featuresRman 12c new_features
Rman 12c new_features
 
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
 
RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)
 
Les 02 Config Rec
Les 02 Config RecLes 02 Config Rec
Les 02 Config Rec
 
Oracle Database Backup
Oracle Database BackupOracle Database Backup
Oracle Database Backup
 
Collaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mysteryCollaborate 2012 - RMAN Eliminate the mystery
Collaborate 2012 - RMAN Eliminate the mystery
 
How to survive a disaster with RMAN
How to survive a disaster with RMANHow to survive a disaster with RMAN
How to survive a disaster with RMAN
 
Collaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mysteryCollaborate 2012 - RMAN eliminate the mystery
Collaborate 2012 - RMAN eliminate the mystery
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
 
Ioug tip book11_gunukula
Ioug tip book11_gunukulaIoug tip book11_gunukula
Ioug tip book11_gunukula
 
MCSA 70-412 Chapter 12
MCSA 70-412 Chapter 12MCSA 70-412 Chapter 12
MCSA 70-412 Chapter 12
 
Oracle OCP Backup Exam
Oracle OCP Backup ExamOracle OCP Backup Exam
Oracle OCP Backup Exam
 
Less14 Br Concepts
Less14 Br ConceptsLess14 Br Concepts
Less14 Br Concepts
 
Oracle ocp backup exam
Oracle ocp backup examOracle ocp backup exam
Oracle ocp backup exam
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 

Plus de sadegh salehi (9)

Cloud intrusion detection System
Cloud intrusion detection SystemCloud intrusion detection System
Cloud intrusion detection System
 
Fault prediction
Fault predictionFault prediction
Fault prediction
 
Integration test
Integration testIntegration test
Integration test
 
Interactive and Multimodal Pedagogy Using IWB
Interactive and Multimodal Pedagogy Using IWB  Interactive and Multimodal Pedagogy Using IWB
Interactive and Multimodal Pedagogy Using IWB
 
NoSQL Database- cassandra column Base DB
NoSQL Database- cassandra column Base DBNoSQL Database- cassandra column Base DB
NoSQL Database- cassandra column Base DB
 
Ontology development in protégé-آنتولوژی در پروتوغه
Ontology development in protégé-آنتولوژی در پروتوغهOntology development in protégé-آنتولوژی در پروتوغه
Ontology development in protégé-آنتولوژی در پروتوغه
 
Prototype design pattern - الگوی طراحی Prototype
Prototype design pattern - الگوی طراحی PrototypePrototype design pattern - الگوی طراحی Prototype
Prototype design pattern - الگوی طراحی Prototype
 
Jame isfahan mosque
Jame isfahan mosqueJame isfahan mosque
Jame isfahan mosque
 
مکتب کلبیان
مکتب کلبیانمکتب کلبیان
مکتب کلبیان
 

Dernier

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Backup and recovery in oracle

  • 2. Oracle Database Backup-and-Recovery Instructor: Dr.Baraani Creator: Mohammad Sadegh Salehi
  • 3. Fall 2014 3/38 <Insert Picture Here> Agenda ■Purpose of Backup and Recovery. ■ Oracle Data Protection Planning & Solutions ■ Oracle Backup & Recovery Solutions  Physical Data Protection • Recovery Manager  Logical Data Protection • Flashback Technologies  Recovery Analysis • Data Recovery Advisor ■Q&A
  • 4. Fall 2014 4/38 Purpose of Backup and Recovery Data Protection Concerns… ■ Planning and testing responses to different kinds of failures ■ Configuring the database environment for backup and recovery ■ Setting up a backup schedule ■ Monitoring the backup and recovery environment ■ Troubleshooting backup problems ■ Recovering from data loss if the need arises  Backup administration tasks include the following:
  • 5. Fall 2014 5/38 Data Protection  A backup is a copy of data of a database that you can use to reconstruct data.  Physical backup Are copies of the physical files used in storing and recovering a database. These files include data files, control files, and archived redo logs.  Logical backups Contain logical data such as tables and stored procedures.
  • 6. Fall 2014 6/38 Many Types of Data Loss to Protect Against User Error Management Error Forgetfulness Malicious Behavior Software Error Storage Media Error Storage System Failure Data Center Outage
  • 7. Fall 2014 7/38 ■A media failure is a physical problem with a disk, ■ That causes a failure of a read from or write to a disk file that is required to run the database. Many Types of Data Loss to Protect Against  Media Failure  User Errors ■ User errors occur when, either due to an error in application logic or a manual mistake, ■ Data in a database is changed or deleted incorrectly. ■ User errors are estimated to be the greatest single cause of database downtime.
  • 8. Fall 2014 8/38 Storage Tools Snapshots, Replication, Archive, Analytics Database Tools Data Guard & Active Data Guard Data Recovery Advisor, RMAN Operating System Tools Built in Backup and Recovery Tools, Snapshots, Boot Environments Virtualization Tools Oracle Virtual Machine, Enterprise Manager Software Tools Oracle Enterprise Manager, Tools for Oracle Database Data Protection The Ultimate Integrated Data Protection Solution
  • 9. Fall 2014 9/38 Oracle Backup & Recovery Solutions “Backup and Recovery on Steroids” File System Data UNIX Linux Windows NAS Recovery Manager (RMAN) Oracle Databases Physical Data Protection Data Recovery Advisor Logical Data Protection Recovery Analysis Flashback Technologies
  • 10. Fall 2014 10/38 Backup & Recovery Foundation Complete Oracle Solution from Disk to Tape File System Data UNIX Linux Windows NAS Oracle Databases Oracle Recovery Manager (RMAN) Fast Recovery Area Tape Backup Amazon S3 Cloud Storage Oracle Secure Backup (OSB) Oracle Secure Backup (OSB) Cloud Module
  • 11. 11/38 Oracle Recovery Manager (RMAN) Oracle-integrated Backup & Recovery Engine Oracle Enterprise Manager RMAN Database Fast Recovery Area Tape Drive Oracle Secure Backup • Intrinsic knowledge of database file formats and recovery procedures • Block validation • Online block-level recovery • Tablespace/data file recovery • Online, multi-streamed backup • Unused block compression • Native encryption • Integrated disk, tape & cloud backup leveraging the Fast Recovery Area and Oracle Cloud Secure Backup
  • 12. Fall 2014 12/38 Oracle Backup and Recovery Solutions  Recovery Manager (RMAN)  User-managed backup and recovery  Recovery Manager is fully integrated with the Oracle database to perform a range of backup and recovery activities.  You can access RMAN through the command line or through Oracle Enterprise Manager.  In this solution, you perform backup and recovery with a mixture of host operating system commands and SQL*Plus recovery commands.  You are responsible for determining all aspects of when and how backups and recovery are done.
  • 13. Fall 2014 13/38 Feature Comparison of Backup Techniques Feature Recovery Manager User-managed Data Pump Export Closed database backups Supported. Supported Not supported. Open database backups Supported. Supported. Requires rollback or undo segments to generate consistent backups. Incremental backups Supported Not supported. Not supported. Corrupt block detection Supported. Not supported. Supported. Automatic specification of files to include in a backup Supported Not supported. Not applicable. Backup repository Supported Not supported. Not supported.
  • 14. Fall 2014 14/38 Feature Comparison of Backup Techniques Feature Recovery Manager User-managed Data Pump Export Backups to a media manager Supported. Supported. Not supported. Backup of initialization parameter file Supported. Supported. Not supported. Backup of password and networking files Not supported. Supported. Not supported. Platform-independent language for backups Supported. Not supported. Supported.
  • 15. Fall 2014 15/38 Start RMAN
  • 16. Fall 2014 16/38 Change RMAN Backup Configuration RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/full_%u_%s_%p’; RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;  %U, which generates a unique name.  Others include %d for the DB_NAME,  %t for the backup set time stamp,  %s for the backup set number,  And %p for the backup piece number.
  • 17. Fall 2014 17/38 Change RMAN Backup Configuration
  • 18. Fall 2014 18/38 Incremental backup ■ Stores only blocks changed since a previous backup. ■Thus, they provide more compact backups and faster recovery, ■ thereby reducing the need to apply redo during data file media recovery.
  • 19. Fall 2014 19/38 Incremental backup BACKUP INCREMENTAL LEVEL 0 DATABASE; BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE; BACKUP INCREMENTAL LEVEL 1 DATABASE;  Creates a level 0 incremental backup to serve as a base for an incremental backup strategy:  Creates a level 1 cumulative incremental backup:  Creates a level 1 differential incremental backup:
  • 20. Fall 2014 20/38 Incremental backup
  • 21. Fall 2014 21/38 Validating & Cross-checking Database Files and Backups BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL; VALIDATE DATAFILE 4 BLOCK 10 TO 13; VALIDATE BACKUPSET 3;  Validate all database files and archived redo log files for physical and logical corruption:  Check individual data blocks, as shown in the following example:  Validate backup sets, as shown in the following example: CROSSCHECK BACKUP; CROSSCHECK COPY;  The CROSSCHECK, synchronizes the logical records of RMAN backups and copies with the files on storage media.
  • 22. Fall 2014 22/38 Validating & Cross-checking Database Files and Backups
  • 23. Fall 2014 23/38 Recover Databae - RMAN  Automatic Recovery with the RECOVER Command:
  • 24. Fall 2014 24/38 ■RMAN Step-by-Step Performance Tuning (NEW)  http://www.oracle.com/technology/deploy/availability/pdf/rman_tuning_mm _bp.pdf ■Very Large Database Backup & Recovery Best Practices  http://www.oracle.com/technology/deploy/availability/pdf/vldb_br.pdf ■Best Practices using Recovery Manager with Oracle Data Guard and Oracle Streams  http://www.oracle.com/technology/deploy/availability/pdf/oracle-openworld- 2008/298772.pdf Additional Resources
  • 25. Fall 2014 25/38 Logical Data Protection Fast ‘Rewind’ of Logical Errors File System Data UNIX Linux Windows NAS Recovery Manager (RMAN) Oracle Databases Physical Data Protection Data Recovery Advisor Logical Data Protection Recovery Analysis Flashback Technologies
  • 26. Fall 2014 26/38 Flashback Technologies Error Detection & Correction ■ Flashback revolutionizes error recovery  View ‘good’ data as of a past point-in-time  Simply rewind data changes  Time to correct error equals time to make error Correction Time = Error Time + f(DB_SIZE) • Low impact • Excellent tool for configuring QA, Dev and Training databases • Flashback is easy – simple commands, no complex procedure 0 20 40 60 80 Recovery Time Traditional Recovery Flashback
  • 27. 27/38 Error Investigation with Flashback • Flashback Query – Query all data at point in time Tx 1 Tx 2 Tx 3 select * from Salary AS OF ‘12:00 P.M.’ where … select * from Salary VERSIONS BETWEEN ‘12:00 PM’ and ‘2:00 PM’ where … select * from FLASHBACK_TRANSACTION_QUERY where xid = HEXTORAW(‘000200030000002D’);  Flashback Transaction Query – See all changes made by a transaction  Flashback Version Query – See all versions of a row between times – See transactions that changed the row • All above are based on available UNDO
  • 28. Fall 2014 28/38 Rewinding a Database with Flashback Database  You can use the Oracle Flashback Database to rewind the whole database to a past time.  Unlike media recovery, you do not need to restore data files to return the database to a past state.  To use the RMAN FLASHBACK DATABASE command,  Your database must have been previously configured to generate flashback logs.
  • 29. Fall 2014 29/38 Rewinding a Database with Flashback Database
  • 30. Fall 2014 30/38 Using Normal and Guaranteed Restore Points
  • 31. Fall 2014 31/38 Flashback Example
  • 32. 32/38 • Flashback Database – restore database to any point in time • Flashback Table – restore contents of tables to any point in time (undo-based) • Flashback Drop – restore accidentally dropped tables (based on free space in tablespace) • Flashback Transaction – back out transaction and all subsequent conflicting transactions (redo-based) Order Database Customer Error Correction with Flashback
  • 33. Fall 2014 33/38 Recovery Analysis Intelligent, Guided Recovery File System Data UNIX Linux Windows NAS Recovery Manager (RMAN) Oracle Databases Physical Data Protection Data Recovery Advisor Logical Data Protection Recovery Analysis Flashback Technologies
  • 34. Fall 2014 34/38 Time to Repair Data Recovery Advisor The Motivation ■ Oracle provides robust tools for data repair: RMAN – physical media loss or corruptions  Flashback – logical errors Data Guard – physical problems ■However, problem diagnosis and choosing the right solution can be error prone and time consuming  Errors more likely during emergencies Recovery Investigation & Planning
  • 35. Fall 2014 35/38 Data Recovery Advisor (DRA) ■ Oracle Database tool that automatically diagnoses data failures, presents repair options, and executes repairs at the user's request ■ Determines failures based on symptoms  E.g. an “open failed” because datafiles f045.dbf and f003.dbf are missing  Failure Information recorded in diagnostic Automatic Diagnostic Repository (ADR)  Flags problems before user discovers them, via automated health monitoring ■ Intelligently determines recovery strategies  Aggregates failures for efficient recovery  Presents only feasible recovery options  Indicates any data loss for each option ■ Can automatically perform selected recovery steps ■ Accessed via RMAN or EM Reduces downtime by eliminating confusion
  • 36. 36/38 Data Recovery Advisor Wizard
  • 37. 37/38 Data Recovery Advisor – View Failures
  • 38. 38/38 Data Recovery Advisor – Manual Repair
  • 39. 39/38