Database Recovery For Newbies



Similar documents
If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows:

12. User-managed and RMAN-based backups.

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

Database Disaster Recovery using only RMAN Backups

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Oracle Database Cross Platform Migration Lucy Feng, DBAK

Oracle Backup & Recovery

Using RMAN to restore a database to another server in an ASM environment

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

Restoring To A Different Location With EBU And RMAN An AppsDBA Consulting White Paper

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

Oracle Backup and Recover 101. Osborne Press ISBN

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

Recover Oracle Database upon losing all Control Files

Oracle 11g DBA Training Course Content

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

HP LeftHand SAN Solutions

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo tao_zuo@npd.com NPD Inc. 9/2011

Oracle Data Guard for High Availability and Disaster Recovery

HOW TO. RMAN Restore for Standby 10gR2

Backup/Restore Oracle 8i/9i/10g

Getting all the pieces: Reliable Backup/Recovery

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices

Oracle Database 11g: Administration Workshop II DBA Release 2

Oracle Database 10g: Backup and Recovery 1-2

BrightStor ARCserve Backup

ASM and for 3rd Party Snapshot Solutions - for Offhost. Duane Smith Nitin Vengurlekar RACPACK

DOCUMENTATION ORACLE BACKUP & RESTORE OPERATIONS

11. Configuring the Database Archiving Mode.

11. Oracle Recovery Manager Overview and Configuration.

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW

Using Recovery Manager with Oracle Data Guard in Oracle Database 10g. An Oracle White Paper April 2009

Oracle Recovery Manager 10g. An Oracle White Paper November 2003

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

D78850GC10. Oracle Database 12c Backup and Recovery Workshop. Summary. Introduction. Prerequisites

Clonación de una Base de Datos Oracle 11gR2 Activa usando RMAN. CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN

Delivery Method: Instructor-led, group-paced, classroom-delivery learning model with structured, hands-on activities.

Oracle Database 11g: Administration Workshop II DBA Release 2

CA ARCserve Backup for Windows

ORACLE CORE DBA ONLINE TRAINING

Using Recovery Manager with Oracle Data Guard in Oracle9i. An Oracle White Paper January 2007

Oracle Database 11g: Administration Workshop II Release 2

Recreate Physical Standby Database after Recovery of Primary Database

How To Recover From A Crash On An Orgsoorora Database

REDCENTRIC SOFTWARE ORACLE PLUG-IN FOR SOLARIS AGENT X86 VERSION

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue:

OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063

TECHNICAL REPORT. Nimble Storage Oracle Backup and Recovery Guide

D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW

! " # #$ " " %" & "'( " "' ( ) " * ""! ). " / ( * ( "# 0! " ). '

Oracle 10g Feature: RMAN Incrementally Updated Backups

Oracle Database B

Zero Downtime Backup solution for Oracle10g

NEC Storage NV Series

Oracle Database 12c: Admin, Install and Upgrade Accelerated

The safer, easier way to help you pass any IT exams. Exam : 1Z Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP.

Oracle Recovery Manager

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

Oracle Database. Backup and Recovery Basics 10g Release 1 (10.1) Part No. B

Performing Database and File System Backups and Restores Using Oracle Secure Backup

LOGGING OR NOLOGGING THAT IS THE QUESTION

Backup Types. Backup and Recovery. Categories of Failures. Issues. Logical. Cold. Hot. Physical With. Statement failure

Integrating Network Appliance Snapshot and SnapRestore with VERITAS NetBackup in an Oracle Backup Environment

Best Practices White Paper Using Oracle Database 10g Automatic Storage Management with FUJITSU Storage

Oracle Backup, Recovery, and Performance Tuning using EMC Avamar and Oracle RMAN

Configuring Backup Settings. Copyright 2009, Oracle. All rights reserved.

Feature. Database Backup and Recovery Best Practices

CA ARCserve Backup for Linux

Implementing an Enterprise Class Database Backup and Recovery Plan

Oracle Database 10g: Administration Workshop II Release 2

Using HP StoreOnce Backup systems for Oracle database backups

How To Backup An Org Database On An Org Server On A Pc Oracle Server On Anorora (Orora) With A Backup And Restore Option On A Windows (Ororora).Org (Orroboron

Oracle Database Security and Audit

PRM For Oracle Database 3.1 GUI:

RMAN in the Trenches: To Go Forward, We Must Backup

Oracle Data Recovery Advisor

Arcserve Backup for Windows

Oracle Database B

Enterprise DBA Part 1B: Backup and Recovery Workshop

Oracle9i Database: Advanced Backup and Recovery Using RMAN

Backup and Recovery. Oracle RMAN 11 g. Oracle Press ORACLG. Matthew Hart. Robert G. Freeman. Mc Graw Hill. Lisbon London Madrid Mexico City Milan

Automatic Backup in Oracle Database

CA ARCserve Backup for Windows

Many DBA s are being required to support multiple DBMS s on multiple platforms. Many IT shops today are running a combination of Oracle and DB2 which

Oracle8. Backup and Recovery Guide. Release 8.0. December, 1997 Part No. A

Demos - Workshop. -- Configure the RMAN

DB2 9 for LUW Advanced Database Recovery CL492; 4 days, Instructor-led

SQL-BackTrack the Smart DBA s Power Tool for Backup and Recovery

Backup/Recovery Strategy and Impact on Applications. Jacek Wojcieszuk, CERN IT Database Deployment and Persistancy Workshop October, 2005

Oracle Database 10g: Backup and Recovery

MAX_RMAN_08137_IGNORE=5 DISK_RETENTION_POLICY='RECOVERY WINDOW OF 7 DAYS'

Oracle 11g Database Administration

High Availability for Oracle 8 Using Double-Take

SAP with Oracle Real Application Clusters 11g Release 2 and Oracle Automatic Storage Management 11g Release 2

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

Transcription:

Database Recovery For Newbies Paper #521 Bonnie Bizzaro, Susan McClain

Objectives Provide basic understanding of recovery processes and terms Define different types of recovery Discuss common recovery strategies Demo of Recovery Manager (RMAN) 2

Basic Recovery Types Instance recovery Media recovery Data recovery Disaster recovery 3

Basic Recovery Terms Data block Data file Tablespace System change number (SCN) 4

Basic Recovery Terms, cont d Rollback segment / Undo segment Online redo log Archive redo log (No)Archivelog mode Offline backup Online backup 5

Instance Recovery What is instance recovery When database crashes Automatically brings to consistent state Should shutdown/restart database before resuming normal activity 6

Instance Recovery, cont d Entries in the alert log Database mounted in Exclusive Mode. Completed: alter database mount Sun Feb 23 05:50:20 2003 alter database open Beginning crash recovery of 1 threads Sun Feb 23 05:50:24 2003 Thread recovery: start rolling forward thread 1 Recovery of Online Redo Log: Thread 1 Group 2 Seq 35417 Reading mem 0 Mem# 0 errs 0: u05/oradata/lprod/redolprod2.log Sun Feb 23 05:50:27 2003 Thread recovery: finish rolling forward thread 1 Thread recovery: 241 data blocks read, 241 data blocks written, 3771 redo blocks read Crash recovery completed successfully 7

Media Recovery What is Media recovery physical components of the database 8

Media Recovery, cont d Common causes of media loss or failure Lost or corrupted data file strategies Lost or corrupt control file strategies Complete or incomplete recovery strategies 9

Lost or Corrupted Data File For non-system tablespace Offline the object Alter tablespace xxxx offline; Alter database datafile /u01/oradata/xxxxx offline; Restore the file from backup Execute recover command Recover tablespace xxxx; Recover datafile /u01/oradata/xxxxx ; 10

Lost or Corrupted Data File For non-system tablespace, cont d Apply archive logs if prompted Online the object Alter tablespace xxxx online; Alter database datafile /u01/oradata/xxxxx online; Verify recovery Select name,status from v$datafile; Status should be ONLINE 11

Lost or Corrupted Data File For system tablespace Shutdown database Restore the file from backup Start the database in mounted state Startup mount; Execute recover command Recover database; Apply logs if prompted Open database Alter database open; 12

Lost or Corrupted Data File No archivelog mode Shutdown database, do a backup Restore all files from previous offline backup Restore control file from the same backup Startup database If you don t have a copy of your control file from the previous offline backup Startup mount; Alter database open resetlogs; Immediately do a backup 13

Lost or Corrupted Control File Shutdown database If control files multiplexed Copy a good control file over corrupted one Restart database If all copies of control file are gone Use backup controlfile script Restart database Backup database 14

Lost or Corrupted Control File Alter database backup controlfile to trace; STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "LPROD" NORESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 2 MAXDATAFILES 800 MAXINSTANCES 1 MAXLOGHISTORY 2726 LOGFILE GROUP 1 '/u06/oradata/lprod/redolprod01.log' SIZE 80M, GROUP 2 '/u05/oradata/lprod/redolprod2.log' SIZE 80M DATAFILE /u06/oradata/lprod/system01.dbf, /u06/oradata/lprod/rbs101.dbf, /u01/oradata/lprod/temp01.dbf, /u01/oradata/lprod/tools01.dbf, 15

Lost or Corrupted Control File Alter database backup controlfile to trace;, cont d.. # Recovery is required if any of the datafiles are restored backups, # or if the last shutdown was not normal or immediate. RECOVER DATABASE # All logs need archiving and a log switch is needed. ALTER SYSTEM ARCHIVE LOG ALL; # Database can now be opened normally. ALTER DATABASE OPEN; 16

Incomplete Recovery Common scenarios Database point in time recovery Tablespace point in time recovery Recover until cancel Recover until change (SCN) 17

Database Point In Time Recovery Shutdown database Restore all datafiles from previous backup Verify archive logs are available Startup database in mounted state Startup mount ; 18

Database Point In Time Recovery, cont d Execute recovery command Recover database until time 2002-12- 28:10:38:00 ; Or, Recover database until cancel; Open database and resetlogs Alter database open resetlogs; Backup database 19

Data Recovery Using export/import Partial database recovery, then export Transportable tablespace Logminer 20

Disaster Recovery Loss of Server Data center Building If different OS on DR server, use import Verify Oracle version Create shell database Import full database Restore your initsid.ora 21

Disaster Recovery, cont d If same OS on DR server, restore files from hot/cold backup Restore files using original paths Rename files in mounted state Restore initsid.ora file Startup database, recover Standby database Have a plan and test it! 22

Server Managed Recovery RMAN Overview Uses Oracle s server processes Scripts are found in $ORACLE_HOME/bin Target database Repository Media Manager Channels / Disk Devices 23

RMAN Overview Repository Setup Create repository owner Grant RECOVERY_CATALOG_OWNER role Connect to the repository and create catalog Connect to target (needs SYSDBA role) and register the database 24

RMAN DEMO Susan McClain, Alliance Data Systems 25

Final Notes Keep users out of your database while recovering Startup restrict Backup your database before starting a recovery If you think it can t get any worse, trust me, it can Analyze all alternatives before you begin Successful recoveries require successful backups. Make sure you have data files, controlfiles, initsid.ora, archive logs, redo logs (hot backups) 26

Final Notes The best recovery is no recovery Multiplex control files Multiplex redo logs Have appropriate OS and database security TEST YOUR RECOVERY PLAN REGULARLY! If you can t recover your database Select * from v$my_resume; 27

Q & A Paper #521 28

Database Recovery for Newbies Paper #521 Bonnie J. Bizzaro Lead Database Administrator Alliance Data Systems Bbizzaro@alldata.net Susan McClain Systems Manager, Distributed Database Support Alliance Data Systems Special thanks to Joe Testa, Data Management Consulting 29