Backup and recovery Basics of Backup and restoration Types of recovery Defining strategy Starting up and shutting down 80/20 rule SLA’s.

Slides:



Advertisements
Similar presentations
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
Advertisements

Oracle Architecture. Instances and Databases (1/2)
Backup The flip side of recovery. Types of Failures Transaction failure –Transaction must be aborted System failure –Hardware or software problem resulting.
Managing an Oracle Instance
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
Advanced Databases DBA: Backups 1. Advanced Databases Agenda Define backup Discuss Backup Terminology Explain various backup and restore options in Oracle.
Oracle Database Instance Management Oracle 10g. Ebtisam Alabdulqader Outline Management Framework. Managing Oracle instance through the Enterprise Manager.
Database Backup and Recovery
RMAN Restore and Recovery
Backup and Recovery (2) Oracle 10g CAP364 1 Hebah ElGibreen.
Backup and Recovery Part 1.
Chapter 12 Performing Incomplete Recovery. Background Viewed as one of the more difficult chapters to write Thought it was important to put in material.
Harvard University Oracle Database Administration Session 11 Database Recovery.
Chapter 5Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 5 User-Managed Incomplete Recovery.
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
Configuring Recovery Manager
CHAPTER 5 Managing Control Files, Online Redo Logs, and Archiving.
Oracle9i Database Administrator: Implementation and Administration
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Oracle backup and recovery strategy
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
CHAPTER 16 User-Managed Backup and Recovery. Introduction to User Managed Backup and Recovery Backup and recover is one of the most critical skills a.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
PPOUG, 05-OCT-01 Agenda RMAN Architecture Why Use RMAN? Implementation Decisions RMAN Oracle9i New Features.
Oracle 10g Database Administrator: Implementation and Administration
Database Administration TableSpace & Data File Management
Chapter 7 Making Backups with RMAN. Objectives Explain backup sets and image copies RMAN Backup modes’ Types of files backed up Backup destinations Specifying.
Chapter 9 Scripting RMAN. Background Authors felt that scripting was a topic not covered well Authors wanted to cover both Unix/Linux and Windows environments.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
A Guide to Oracle9i1 Database Instance startup and shutdown.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 8 Complete Recovery with Recovery Manager.
IT Database Administration SECTION 01. Starting Up and Shutting Down the Database Database Administration Facilities – A number of tools are available.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
Advanced Databases DBA: Security and Backups Guide to Oracle 10g 1.
IT Database Administration Section 09. Backup and Recovery Backup: The available options Full Consistent (cold) Backup Database shutdown, all files.
8 Copyright © Oracle Corporation, All rights reserved. Configuring the Database Archiving Mode.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
Configuring the Database Archiving Mode
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
16 Copyright © 2005, Oracle. All rights reserved. Performing Database Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Copyright  Oracle Corporation, All rights reserved. 3 Oracle Backup and Recovery Configuration.
 Database Administration Oracle Database Instance Management Starting Up and Shutting Down أ. ندى الغامدي, أ. ندى الطوالة.
Database recovery contd…
Backup and Recovery.
Maintaining Online Redo Log Files
Backup and Recovery (1) Oracle 10g Hebah ElGibreen CAP364.
Is 221: Database Administration
Oracle9i Database Administrator: Implementation and Administration
Performing Database Recovery
Chapter 5 The Redo Log Files.
Presentation transcript:

Backup and recovery Basics of Backup and restoration Types of recovery Defining strategy Starting up and shutting down 80/20 rule SLA’s

Database backup restoration and recovery Physical files that make up db need to be backed up RMAN or user managed Copy files to correct location and let db recover itself Recovery process is starting the database and making it consistent with the backed up files

Restoring and Recovering a Database

Types of failure Non media or media/disk failure Media failures are most critical. To recover: –Determine what files need recovery –What type of media recovery is required –Restore backups –Apply offline redo logs (archive) –Restore db to desired point –Test process often!

Defining backup and recovery strategy Has the following requirements / considerations –Amount of data that can be lost in event of failure –Length of time business can run without the DB –Can DB be offline to perform backup and how long for? –Types of resources available to perform backup/ recovery –Procedures for undoing changes to DB –Cost of buying and maintaining HW and additional backups V cost of replacing or recreating data

Losing data in DB failure The amount of data that can be lost in a failure helps determine the backup and recovery strategy that is implemented Cold backups with no archive of redo logs –Updates since the last backup will be lost. The frequency of cold backup dictates the amount of data lost. Hot or cold backup with archiving of redo logs –No updates lost as long as all redo logs are kept since the last backup.

Surviving without the DB in a DB failure The amount of time a business can survive without the DB is dependent on the type of business. Mean time to recover (MTTR) is obtained during testing of failure scenarios. If MTTR > business survival time then backup and recovery time should be re-addressed.

Online backup There are two types of backup: offline and online. They are referred to as cold and hot. Offline (cold) are done when the database is closed. The downtime is related to database size and normally runs for several hours. Online (hot) are done when the DB is open but can affect performance. Archiving must be turned on for the hot backup.

Undoing changes to DB There are 3 primary ways of undoing changes to the DB which do not involve backups Manual –Re executing code to rebuild data, dependent on the sophistication of the code releases and the configuration of the management control of the application (used in warehousing systems). Oracle log miner – querying the redo logs to recover the changed/dropped data. Flash back query – query undo segments to recover the changed/dropped data.

Log miner Oracle utility allows you to generate the insert, delete and update statements from the change vectors in redo logs Logminer packages –Sys.dbms_logmnr_d.build – builds DD externally –Dbms_logmnr.add_logfile – access to desired redo log –Dbms_logmnr.start_logmnr – starts logminer session

DD access To fully translate the contents of the redo logs, logminer requires access to data dictionary. Dbms_logmnr_d.build extracts DD information to a flat file or the redo logs in 9i More data can be found in oracle documentation e.g. Oracle9i Database Administrator's Guide – Chapter 9

Flash back Works of the undo data and lets the user see a read consistent view of the database in the past. It is easier than logminer. Only transactions committed can be viewed. User can specify the read only view based on system time or a system change number (SCN). Enables at session level. Max of 5 days back.

Cont.. DBA must set the under retention interval long enough to be able to reconstruct the snapshot. Alter system set undo_retention = ; Max is 5 days Requires execute permission on DBMS_flashback Execute dbms_flashback.enable_at_time(sysdate- 1/24); Just remember to disable afterwards

Setting archive mode Alter database archivelog (or noarchivelog ) Sends files to location in init.ora file for log_archive_dest Default is off Select name, logmode from v$database;

Cont.. Change or add init.ora parameter 1. Log_archive_start = true 2. Startup mount 3. Alter database archivelog 4. Alter database open Archive log list to check its logging

Starting up a database Startup [option] Options available will determine state of database –Openenables users to access db –Mountmounts DB for certain DBA activities –Nomountstarts BG processes but does not allow access –Exclusivepermits only current instance to access the DB

Start up errors ORA-12547:TNS:lost contact Or ORA-09352:windows 32-bit two task driver unable to spawn new oracle task These are common errors and mean that the oracle services in the control panel have not started.

Shutdown Shutdown [option] Options –Normal default –waits for current sessions & transactions to end forces a check point and closes files –Transactional – waits for current transaction to finish before closing. –Immediate – forces check point and closes files –Abort – shuts down no save or close

80/20 rule Rule conceived by Vilfredo Pareto Minority of causes produce the majority of results Achieved by doing as much work as possible up front – in the design phase Set realistic expectations –Reasonable response times –Majority of efforts in tuning improves response time –Response time = work time + wait time

Improving response time Improve either work time or wait time Improvement is driven by need to have transactions finish faster Tune component with the longest time –E.g.: if 20% of the time is spent with the CPU processing data and 80% due to delay in processing then improving CPU time will have less effect than reducing processing time Governed by an SLA (service level agreement)

SLA’s How many transactions should be completed per min? How many users should be connected at peak times? How many concurrent transactions are expected at peak time? What times of the day are considered for online use only? What is that batch processing window? What is the expected response time for online processes? How much system resource should be available during peak time? – define margin of error