Backup Types Logical Backup and Recovery Cold Hot Physical With Without Issues Categories of Failures Protectthe database from numerous types of failures Increase Mean-Time-Between-Failures (MTBF) Decrease Mean-Time-To-Recover(MTTR) Minimize data loss 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 No Recovery
Categories of Failures Categories of Failures User process failure No Recovery PMON User process failure User error Recovery IMP Utility 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. Accidental DROP TABLE; Accidental TRUNCATE TABLE; Accidental DELETE / UPDATE; Categories of Failures User process failure User error Instance failure HardWare Problem on CPU / RAM No Recovery PMON SMON Categories of Failures User process failure User error Instance failure Media failure HardWare Problem on I/O Device Recovery Physical
Requirements for Strategy Physical Backup Methods Business requirements Evolutionary process Technical requirements Hardware, software, man power and time Database configurations Transaction volume Frequency of backups Operational requirements 7-day / -hour operations Testing and validating backups No archive mode Archive mode Physical backup Online redo log s Group 0 0 ARCHIVELOG Group 0 0 ARC0 LOG_ARCHIVE_DEST Archived log 0 /disk/archive/ arch%s.arc LOG_ARCHIVE_FORMAT Enabling ARCHIVELOG Mode Startup mount Init.ora Alter database ARCHIVELOG Shutdown normal or immediate Alter database open Full database backup Shutdown normal or immediate
SHUTDOWN IMMEDIATE; Physical Closed Database Backup Advantages of Physical Closed Database Backups Data s s HOST cp <s> /backup/ s Password Parameter s Conceptually simple Easy to perform Require little operator interaction STARTUP OPEN; Onlineor offline storage s Parameter s Pwd Physical Opened Database Backup () Archived redo log s Online redo log s Onlineor offline storage HOST cp <s> /backup/ Physical Opened Database Backup () All tablespace data s SQL> alter tablespace <name> begin backup; Data s Individual data Onlineor offline storage HOST cp <s> /backup/ SQL> alter tablespace <name> end backup;
Advantages of Physical Opened Database Backups Data s s ARC0 Archived log Maintainshigh database availability Can be done at a tablespace or data level Supportsnonstop business operations ARC0 Archived log Archived log ARC0 Data s s Data s s
Archived log ARC0 Archived log ARC0 Data s s Data s s Data s Archived log ARC0 Archived log ARC0 8 Data s s Data s s 7 8 Data s Data s
Shutdown Startup Mount O.S. Restore From Hot or Cold Physical BackUp DataFile (s) S.C.N. System Change Number s Data s 8 7 8 Recover DataFile (s) Automatic a b Applyed Archived Logs # # #7 Applyed On Line Logs #8 # Alter DataBase Open Shutdown Immediate New Cold Physical BackUp Startup Open Data s Header RedoRecord Incremental Time Stamp UniqueIdentified Committed Version D.B. Log # Log Low SCN # Higth SCN # 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 Theseutilities enable you to do the following: Archive historical data Save table definitions (with or withoutdata) to protect from user error failure Move data between machines and databases or versions of the Oracle server Transport tablespaces between databases
Formato Binario Proprietario Export Concepts Oracle Server Data Base Exp File *.dmp Generate SQL commands Two-Task common (TTC) SQL command processing Buffer cache manager Analyze blocks Data Base Imp a Dump Full TTC buffer Owner IncType Complete Evaluating buffer Buffer cache Tables Read blocks Oraclei Server b c IncType Cumulative IncType Incremental KEYWORD DESCRIPTION (DEFAULT) ----------------------------------------------------------------- USERID username/password BUFFER size of data buffer FILE output s (EXPDAT.DMP) LOG log of screen output PARFILE parameter name FILESIZE maximum size of each dump 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) Command -Line Method > exp scott/tiger =scott.dmp owner=scott grants=y rows=y compress=y Export Messages Export: Release..0..0 - Production on Fri Oct 0 0:: 8 (c) Copyright 00 Oracle Corporation. All rights reserved. Connected to: Oraclei Enterprise Edition Release..0..0 - Production With the Partitioning option PL/SQL Release..0..0 - 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 rows exported.. exporting table EMP rows exported
Oracle Standby Implementation IncType Complete IncType Incremental -----> Exp IncType Generic Fail over Solution Disaster Recovery Solution (if remote) Ease of implementation Minimum impact on Production System Read Only Standby Database IncType Cumulative -----> Exp IncType Cumulative or Complete Overview of Managed Oracle Standby DB Primary Instance Standby Instance ARCH T.N.S. Recovery proc DBWR Arc log Arc log RFS Primary DB Standby DB Primary control Standby control Recovery Mode ReadOnlyMode Activate