Download presentation
Presentation is loading. Please wait.
1
Backup and Recovery
2
O.S. File System + SQL Statement
Backup Types Logical Export Utility Cold Hot Physical With RMan Without O.S. File System + SQL Statement
3
Issues Protect the database from numerous types of failures
Increase Mean-Time-Between-Failures (MTBF) Decrease Mean-Time-To-Recover (MTTR) Minimize data loss
4
Categories of Failures
Statement failure No Recovery Needed Logic error in an application Attempt to enter bad data into the table Attempt an operation with insufficient privileges Attempt an INSERT or UPDATE to a table, causing an extent to be allocated, but with insufficient free space left in the tablespace
5
Categories of Failures
Statement failure User process failure No Recovery Needed PMON The user performed an abnormal disconnect in the session. The user’s session was abnormally terminated. The user’s program raised an address exception terminating the session.
6
Categories of Failures
Statement failure User process failure User error Recovery Needed IMP Utility Accidental DROP TABLE; Accidental TRUNCATE TABLE; Accidental DELETE / UPDATE;
7
Categories of Failures
Statement failure User process failure User error Instance failure No Recovery Needed PMON SMON HardWare Problem on CPU / RAM
8
Categories of Failures
Statement failure User process failure User error Instance failure Media failure Recovery Needed Physical HardWare Problem on I/O Device
9
Requirements for Strategy
Business requirements Evolutionary process Technical requirements Hardware, software, man power and time Database configurations Transaction volume Frequency of backups Operational requirements 7-day / 24-hour operations Testing and validating backups
10
Physical Backup Methods
No archive mode Archive mode Physical backup
11
ARCHIVELOG Online redo log files Archived log file ARC0 052 053 052
Group 1 052 Group 2 LOG_ARCHIVE_DEST /disk1/archive/ LOG_ARCHIVE_FORMAT arch%s.arc
12
Enabling ARCHIVELOG Mode
Shutdown normal or immediate 1 Startup mount 2 Alter database open 4 Control file Init.ora Alter database ARCHIVELOG 3 Shutdown normal or immediate 5 Full database backup 6
13
Physical Closed Database Backup
SHUTDOWN IMMEDIATE; Physical Closed Database Backup Data files Control files Redo log files Parameter files Password file HOST cp <files> /backup/ Online or offline storage STARTUP OPEN;
14
Advantages of Physical Closed Database Backups
Conceptually simple Easy to perform Require little operator interaction
15
Physical Opened Database Backup (1)
Online redo log files Control files Archived redo log files Online or offline storage Parameter files Pwd file HOST cp <files> /backup/
16
Physical Opened Database Backup (2)
All tablespace data files Individual data file SQL> alter tablespace <name> begin backup; Online or offline storage HOST cp <files> /backup/ Data files SQL> alter tablespace <name> end backup;
17
Advantages of Physical Opened Database Backups
Maintains high database availability Can be done at a tablespace or data file level Supports nonstop business operations
18
Archived log file 1 1 ARC0 Redo log files Data files Control file
19
Archived log file 2 1 1 ARC0 2 Redo log files Data files Control file
20
ARC0 1 2 Archived log file Redo log files Data files Control file 3 3
21
ARC0 1 2 3 Archived log file Redo log files Data files Control file 4
22
ARC0 1 2 3 4 Archived log file Redo log files Data files Control file
5 5 1 2 ARC0 4 3 4 Redo log files Data files Control file Data files 5 Control file
23
ARC0 1 2 3 4 5 Archived log file Redo log files Data files
6 5 1 2 ARC0 6 3 4 Redo log files 5 Data files Control file Data files 5 Control file
24
ARC0 1 2 3 4 5 6 7 8 Archived log file Redo log files Data files
9 9 1 2 ARC0 8 3 4 Redo log files 5 6 Data files 7 8 Control file Data files 5 Control file
25
1 2 3 4 4a 4b 5 6 7 8 Shutdown Startup Mount
O.S. Restore From Hot or Cold Physical BackUp DataFile (s) 3 Redo log files Control file 9 Data files 8 5 Recover DataFile (s) Automatic 4 9 Applyed Archived Logs #5 #6 #7 4a Applyed On Line Logs #8 #9 4b Alter DataBase Open 5 Shutdown Immediate 6 New Cold Physical BackUp 7 Startup Open 8
26
S.C.N. System Change Number
Data files Header Control file RedoRecord Incremental Time Stamp 1 Unique Identified “Committed Version D.B.” 2 Log file # Low SCN # Log file Higth SCN #
27
Logical Backup Methods
Oracle Export and Import Utilities An interactive dialog The export page of the Data Manager within Enterprise Manager The command line interface, by specifying parameters
28
These utilities enable you to do the following:
Archive historical data Save table definitions (with or without data) to protect from user error failure Move data between machines and databases or versions of the Oracle server Transport tablespaces between databases
29
Formato Binario Proprietario Data Base File *.dmp Exp Data Base Imp
30
SQL command processing
Export Concepts Oracle Server Generate SQL commands Two-Task common (TTC) SQL command processing Buffer cache manager Analyze blocks Read blocks TTC buffer Evaluating buffer Dump file Buffer cache Full 1 Owner 2 Tables 3 Oracle9i Server IncType Complete 1a IncType Cumulative 1b IncType Incremental 1c
31
KEYWORD DESCRIPTION (DEFAULT)
USERID username/password BUFFER size of data buffer FILE output files (EXPDAT.DMP) LOG log file of screen output PARFILE parameter filename FILESIZE maximum size of each dump file COMPRESS import into one extent (Y) CONSISTENT cross-table consistency (N) GRANTS export grants (Y) INDEXES export indexes (Y) ROWS export data rows (Y) CONSTRAINTS export constraints (Y) TRIGGERS export triggers (Y) FULL export entire DataBase (N) OWNER list of owner usernames TABLES list of table names INCTYPE incremental export type DIRECT direct path (N) STATISTICS analyze objects (ESTIMATE)
32
Command-Line Method > exp scott/tiger file=scott.dmp owner=scott grants=Y rows=Y compress=Y Export Messages Export: Release Production on Fri Oct 30 09:35: (c) Copyright 2003 Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release Production With the Partitioning option PL/SQL Release Production Export done in WE8DEC character set and WE8DEC NCHAR character set . exporting pre-schema procedural objects and actions . exporting foreign function library names for user SCOTT . exporting object type definitions for user SCOTT About to export SCOTT’s objects ... . exporting database links . exporting sequence numbers . exporting cluster definitions . about to export SCOTT’s tables via Conventional Path ... . . exporting table BONUS 0 rows exported . . exporting table DEPT 4 rows exported . . exporting table EMP 14 rows exported
33
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa IncType Complete IncType Incremental -----> Exp IncType Generic IncType Cumulative > Exp IncType Cumulative or Complete
34
Oracle Standby Implementation
Fail over Solution Disaster Recovery Solution (if remote) Ease of implementation Minimum impact on Production System Read Only Standby Database
35
Overview of Managed Oracle Standby DB
Primary control file Primary DB Primary Instance Redo log Standby Instance Recovery proc Standby control file RFS Arc log T.N.S. Standby DB DBWR Arc log ARCH Recovery Mode 1 Activate 3 ReadOnly Mode 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.