SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PPTX
Backup & recovery with rman
itsabidhussain
 
PPT
Oracle Architecture
Neeraj Singh
 
PPTX
Oracle architecture ppt
Deepak Shetty
 
PDF
ORACLE ARCHITECTURE
Manohar Tatwawadi
 
PPTX
Oracle DBA
shivankuniversity
 
PDF
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Zohar Elkayam
 
PDF
Oracle Active Data Guard: Best Practices and New Features Deep Dive
Glen Hawkins
 
PPTX
What to Expect From Oracle database 19c
Maria Colgan
 
PPTX
Basic oracle-database-administration
sreehari orienit
 
PDF
Oracle db performance tuning
Simon Huang
 
PDF
Exadata master series_asm_2020
Anil Nair
 
PPTX
Data Guard Architecture & Setup
Satishbabu Gunukula
 
PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
DOCX
Oracle architecture
Soumya Das
 
PDF
Migration to Oracle Multitenant
Jitendra Singh
 
PPT
Oracle archi ppt
Hitesh Kumar Markam
 
PPTX
Oracle sql high performance tuning
Guy Harrison
 
DOC
Analyzing awr report
satish Gaddipati
 
PDF
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
PDF
Oracle 12c Multitenant architecture
naderattia
 
Backup & recovery with rman
itsabidhussain
 
Oracle Architecture
Neeraj Singh
 
Oracle architecture ppt
Deepak Shetty
 
ORACLE ARCHITECTURE
Manohar Tatwawadi
 
Oracle DBA
shivankuniversity
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Zohar Elkayam
 
Oracle Active Data Guard: Best Practices and New Features Deep Dive
Glen Hawkins
 
What to Expect From Oracle database 19c
Maria Colgan
 
Basic oracle-database-administration
sreehari orienit
 
Oracle db performance tuning
Simon Huang
 
Exadata master series_asm_2020
Anil Nair
 
Data Guard Architecture & Setup
Satishbabu Gunukula
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
Oracle architecture
Soumya Das
 
Migration to Oracle Multitenant
Jitendra Singh
 
Oracle archi ppt
Hitesh Kumar Markam
 
Oracle sql high performance tuning
Guy Harrison
 
Analyzing awr report
satish Gaddipati
 
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
Oracle 12c Multitenant architecture
naderattia
 

Viewers also liked (20)

PDF
Database backup and recovery
Anne Lee
 
PPT
Backup And Recovery
raghu_designer
 
PPTX
database recovery techniques
Kalhan Liyanage
 
PPTX
2.6 backup and recovery
mrmwood
 
PPT
Backup And Recovery
Wynthorpe
 
PPT
Presentation on backup and recoveryyyyyyyyyyyyy
Tehmina Gulfam
 
PPTX
Database recovery
Vritti Malhotra
 
PPT
03 backup-and-recovery
hunny garg
 
PDF
Beginbackup
oracle documents
 
PDF
Oracle Database Management - Backup/Recovery
Chien Chung Shen
 
PDF
MySQL 8.0 : Roles
Harin Vadodaria
 
PDF
Nettoyage de matériels informatique
CYCEO INFORMATIQUE
 
PPT
2011.11.23 - Le Cloud, Réalités et Perspectives - 8ème Forum du Club Cloud de...
Club Cloud des Partenaires
 
PDF
Cyceo solution stockage de fichiers
CYCEO INFORMATIQUE
 
PPT
10135 b 08
Wichien Saisorn
 
PPT
SBAAAM, Web Push Notification System V.12
Marco Del Bene
 
PDF
Oracle Database Undo Segment Operation Concept
Chien Chung Shen
 
PPTX
Mon Stockage a la Cloud Attitude
Microsoft Technet France
 
PDF
2009-dec02_EMC2
Agora Group
 
PDF
Comparing Unitrends and EMC Avamar
lincolng
 
Database backup and recovery
Anne Lee
 
Backup And Recovery
raghu_designer
 
database recovery techniques
Kalhan Liyanage
 
2.6 backup and recovery
mrmwood
 
Backup And Recovery
Wynthorpe
 
Presentation on backup and recoveryyyyyyyyyyyyy
Tehmina Gulfam
 
Database recovery
Vritti Malhotra
 
03 backup-and-recovery
hunny garg
 
Beginbackup
oracle documents
 
Oracle Database Management - Backup/Recovery
Chien Chung Shen
 
MySQL 8.0 : Roles
Harin Vadodaria
 
Nettoyage de matériels informatique
CYCEO INFORMATIQUE
 
2011.11.23 - Le Cloud, Réalités et Perspectives - 8ème Forum du Club Cloud de...
Club Cloud des Partenaires
 
Cyceo solution stockage de fichiers
CYCEO INFORMATIQUE
 
10135 b 08
Wichien Saisorn
 
SBAAAM, Web Push Notification System V.12
Marco Del Bene
 
Oracle Database Undo Segment Operation Concept
Chien Chung Shen
 
Mon Stockage a la Cloud Attitude
Microsoft Technet France
 
2009-dec02_EMC2
Agora Group
 
Comparing Unitrends and EMC Avamar
lincolng
 
Ad

Similar to Backup and recovery in oracle (20)

PPT
Less15 Backups
vivaankumar
 
PPT
Backups And Recovery
asifmalik110
 
DOC
Backup and Recovery Procedure
Anar Godjaev
 
PDF
Oracle Backup Solutions Overview August 2018
Dan Glasscock
 
PPTX
What’s new in oracle 12c recovery manager (rman)
Satishbabu Gunukula
 
PDF
Oow14 con7681-rman-1
Dan Glasscock
 
PDF
Rman 12c new_features
Nabi Abdul
 
PPTX
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
PDF
RMAN in 12c: The Next Generation (WP)
Gustavo Rene Antunez
 
PPT
Les 02 Config Rec
vivaankumar
 
PDF
Oracle Database Backup
Handy_Backup
 
PDF
Collaborate 2012 - RMAN Eliminate the mystery
Nelson Calero
 
PDF
How to survive a disaster with RMAN
Gustavo Rene Antunez
 
PDF
Collaborate 2012 - RMAN eliminate the mystery
Nelson Calero
 
PDF
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
PDF
Ioug tip book11_gunukula
Satishbabu Gunukula
 
PPT
40179_Bednar.ppt Oracle Database Upgrade Assistant
herryheryadi1
 
PPTX
MCSA 70-412 Chapter 12
Computer Networking
 
DOC
Oracle OCP Backup Exam
Inprise Group
 
PPT
Less14 Br Concepts
vivaankumar
 
Less15 Backups
vivaankumar
 
Backups And Recovery
asifmalik110
 
Backup and Recovery Procedure
Anar Godjaev
 
Oracle Backup Solutions Overview August 2018
Dan Glasscock
 
What’s new in oracle 12c recovery manager (rman)
Satishbabu Gunukula
 
Oow14 con7681-rman-1
Dan Glasscock
 
Rman 12c new_features
Nabi Abdul
 
24 HOP edición Español - Sql server 2014 backup encryption - Percy Reyes
SpanishPASSVC
 
RMAN in 12c: The Next Generation (WP)
Gustavo Rene Antunez
 
Les 02 Config Rec
vivaankumar
 
Oracle Database Backup
Handy_Backup
 
Collaborate 2012 - RMAN Eliminate the mystery
Nelson Calero
 
How to survive a disaster with RMAN
Gustavo Rene Antunez
 
Collaborate 2012 - RMAN eliminate the mystery
Nelson Calero
 
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
Ioug tip book11_gunukula
Satishbabu Gunukula
 
40179_Bednar.ppt Oracle Database Upgrade Assistant
herryheryadi1
 
MCSA 70-412 Chapter 12
Computer Networking
 
Oracle OCP Backup Exam
Inprise Group
 
Less14 Br Concepts
vivaankumar
 
Ad

More from sadegh salehi (9)

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

Recently uploaded (20)

PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 

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