backup&recovery.enhancements.in.oracle10g-presentation.pdf
TRANSCRIPT
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
1/100
Backup & RecoveryEnhancements in Oracle
10g
Radoslav Rusinov
TechnoLogica Ltd.
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
2/100
2 of 100
Availability is the mostimportant characteristic of thebusiness data
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
3/100
3 of 100
Types of Failures and Oracles Solutions Human Errors
Export, Data Pump, Log Miner, TSPITR
Flashback Features Block Corruptions
RMAN
Media Failures RMAN Computer and Hardware Failures
RAC, Data Guard, Replication, Streams
Disaster Data Guard, Replication, Streams
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
4/100
4 of 100
Target Audience
Oracle DBAs ProductionEnvironments
Oracle DBAs Development
Environments Oracle Developers
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
5/100
5 of 100
Test Environment
Used Test Environment: Oracle Database Version: 10.2.0.2
Operating System: Windows XP SP2 Database Log Mode: ARCHIVELOG
Assertions in this presentation are in
result of tests performed on the aboveenvironment
Ensure that every feature works in the
expected way in your specificenvironment
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
6/100
6 of 100
Agenda
Flash Recovery Area Flashback Technology Enhancements
Space Pressure & Database Hangs
Physical Backup & RecoveryEnhancements
Conclusion
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
7/100
7 of 100
Automatic Disk-Based Backup & Recovery
with Flash Recovery Area
95% of the recovery operations need nomore than 3 days-old backups
What is Flash Recovery Area?
Unified disk storage location
Default location for disk-based backup files
Defines the max available space for disk-based backup files
Can use file system or ASM disk group
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
8/100
8 of 100
Flash Recovery Area (FRA)
Automatically names the files by using OMF
Has its own directory structure- ..\flash_recovery_area\ORCL102\
ARCHIVELOG AUTOBACKUP BACKUPSET CONTROLFILE
DATAFILE FLASHBACK ONLINELOG
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
9/100
9 of 100
Flash Recovery Area (FRA)
FRA is not a place for the data files
Data files reside in the Database Area
FRA must be located on a different
physical storage than Database Area Configured with two parameters:
DB_RECOVERY_FILE_DEST- destination
DB_RECOVERY_FILE_DEST_SIZE max size
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
10/100
10 of 100
Flash Recovery Area (FRA)
You can create your own additional
directories and files in FRA To configure retention policy:RMAN> CONFIGURE RETENTION POLICY TOREDUNDANCY | RECOVERY WINDOW OF
New RMAN commands to backup FRARMAN> BACKUP RECOVERY AREA only to SBT
device
RMAN> BACKUP RECOVERY FILES only to SBTdevice
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
11/100
11 of 100
Automated Space Management
Oracle does not delete the obsolete files. It
retain them until space pressure appears Behaves like a cache for backup files
Oracle issues alert when FRA is 85% full
Critical alert when FRA is 3% full
At 100% a message in the alert.log:
ORA-19815: WARNING: db_recovery_file_dest_size of bytes is 100.00% used
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
12/100
12 of 100
Space Pressure
Two file types reside in FRA
Permanent files: Multiplexed copies of control file
Multiplexed copies of online redo logs
Transient files: Archived redo logs
Datafile and controlfile copies
Controlfile autobackups Backup sets
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
13/100
13 of 100
Space Pressure
Archived logs in FRA that are in the recoverywindow and that are not yet backed up aretreated in a similar way as permanent files
Backup sets in FRA that are in the recoverywindow and are not yet available on tape aretreated in a similar way as permanent files
Space pressure over FRA causes automaticdeleting of transient files
Oracle never deletes permanent files
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
14/100
14 of 100
Space Pressure
Backup sets treated as permanent will notpermit creation of new backups and will not be
deleted Default Oracle installation uses FRA as
default and only one location for archived
logs: LOG_ARCHIVE_DEST_10 =USE_DB_RECOVERY_FILE_DEST
This along with the default value of:
LOG_ARCHIVE_MIN_SUCCEED_DEST=1 can makethe archivelog destination in FRA mandatoryand to cause space pressure
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
15/100
15 of 100
Space Pressure Recommendations
Set smaller and reasonable recovery window
Backup archived logs regularly Configure at least two archivelog destinations
Give more physical space to FRA
Configure the FRA size to be at most 90% ofthe real physical available space
For Disk-to-Disk-to-Tape strategies: backupbackupsets from FRA to tape regularly
For Disk-to-Tape strategies: perform databasebackups to tape regularly
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
16/100
16 of 100
Space Monitoring
V$RECOVERY_FILE_DEST
V$FLASH_RECOVERY_AREA_USAGE (10g R2):
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
17/100
17 of 100
Monitoring FRA Metrics with EM
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
18/100
18 of 100
Flash Recovery Area - Summary
Unified place for your disk-basedbackups
Automatically managed files
Simplified administration tasks
Faster Backup
Faster Restore
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
19/100
19 of 100
Agenda
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &RecoveryEnhancements
Conclusion
Flashback DATABASE
Flashback DROPFlashback TABLE
Flashback QUERY
Flashback VERSIONSQUERY
Flashback
TRANSACTIONQUERY
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
20/100
20 of 100
FLASHBACK DATABASE FasterPoint-In-Time Recovery
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
21/100
21 of 100
Flashback Database
Reverse the whole database to a pointin time
Faster recovery from user errors
Uses own logging mechanism Flashback Logs - stored in FRA
New process: Recovery Writer (RVWR) New SGA structure: Flashback Buffer
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
22/100
22 of 100
Incomplete Recovery vs. Flashback
Database
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
23/100
23 of 100
Advantages
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
24/100
24 of 100
Flashback Database
The availability of the archived logs within
the flashback recovery window is important The recovery depends on the size of
changes
Does not depend on the database size Prerequisites:
The database MUST be in ARCHIVELOG
FRA MUST be configured
The Flashback Logs can reside only in FRA
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
25/100
25 of 100
Configuration with EM
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
26/100
26 of 100
Manual Configuration SQL> STARTUP MOUNT EXCLUSIVE;
SQL> ALTER DATABASE FLASHBACK ON;
SQL> ALTER SYSTEM SETDB_FLASHBACK_RETENTION_TARGET = 1440SCOPE=BOTH;
Flashback can be stopped at tablespace level: SQL> ALTER TABLESPACE USERS FLASHBACKOFF;
Excluded datafiles must be offlined if the database
needs to be flashbacked and opened After flashbacking a media recovery for the offlined
datafiles must be performed
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
27/100
27 of 100
Flashback OFF for SYSTEM Tablespace
Oracle allows the flashback for logging forSYSTEM to be disabled
This leads to non-working flashback databasefeature
Dont exclude flashbacking for SYSTEMtablespace
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
28/100
28 of 100
Space Issues DB_FLASHBACK_RETENTION_TARGET
is a TARGET parameter It does not guarantee your recovery
window
Flashback logs are not archived and arereused
Flashback logs can cause spacepressure over FRA
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
29/100
29 of 100
Space Pressure
If FRA is Full -> Recovery Writer (RVWR)will start to reuse flashback logs
If FRA is Full -> transient files will bedeleted
Flashback logs are treated as transientfiles in FRA
They can be automatically deleted inresponse of space pressure
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
30/100
30 of 100
Space Pressure - Recommendations
Set Flashback retention target to areasonable value. No more than few days.
Do not configure flashback retentiontarget bigger than RMAN recovery
window Configure the FRA size to be at most 90%
of the real physical available space
To delete immediately all flashback logs:SQL> ALTER DATABASE FLASHBACK OFF;
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
31/100
31 of 100
Current Flashback Window
V$FLASHBACK_DATABASE_LOG
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
32/100
32 of 100
Restore Points (10g R2)
They are not exactly a feature of the
Flashback Database Can be used with FLASHBACK TABLE
They are a map between an SCN, TIMEand DATABASE INCARNATION
Rely on archived redo logs from around
the time of their creation
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
33/100
33 of 100
Restore Points (10g R2)
The most common cause for downtime
is change
Use them before performing of anysignificant change within the database:
Application upgrades
Batch jobs Starting of flashback database operations
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
34/100
34 of 100
Normal Restore Points (10g R2) SQL> CREATE RESTORE POINT
before_app_upgrade;
Can be created when FlashbackDatabase is OFF
Automatically deleted if: More than 2048 in count
Older thanCONTROL_FILE_RECORD_KEEP_TIME
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
35/100
35 of 100
Guaranteed Restore Points (10g R2)
SQL> CREATE RESTORE POINTbefore_app_upgrade GUARANTEE FLASHBACK
DATABASE;
Flashback Database can be OFF Using Flashback Logs
Could generate a lot of flashback logs
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
36/100
36 of 100
Guaranteed Restore Points (10g R2)
Not dropped automatically Must be explicitly dropped
Usable for short periods of time
Message in the alert.logafter their
creation
They can cause the Database to HANG
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
37/100
37 of 100
Using Flashback Database
SQL> STARUP MOUNT
SQL> FLASHBACK DATABASE TO TIMESTAMP
to_timestamp('10.04.200620:50','dd.mm.yyyy hh24:mi');
SQL> FLASHBACK DATABASE TO RESTORE
POINT before_app_upgrade;
SQL> ALTER DATABASE OPEN RESETLOGS;
(10g R2) Keeps flashback logs afterRESETLOGS
(10g R2) SQL> FLASHBACK DATABASE TO BEFORERESETLOGS;
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
38/100
38 of 100
Monitoring with EM
In Home Page
In RecoverySettings
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
39/100
39 of 100
Flashback Database - Summary
Very powerful for faster point-in-timerecovery
Generate much less flash redo than
online redo logs Can be used with restore points
Space consumer
I/O consumer
A d
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
40/100
40 of 100
Agenda
Flash Recovery Area
Flashback Technology
Enhancements Space Pressure &
Database Hangs
Physical Backup &RecoveryEnhancements
Conclusion
Flashback DATABASE
Flashback DROP
Flashback TABLE
Flashback QUERY
Flashback VERSIONSQUERY
Flashback
TRANSACTIONQUERY
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
41/100
41 of 100
FLASHBACK DROP - Undo a Dropped
Table
Reverses the effect of a DROP TABLE
operation SQL> DROP TABLE my_table;
Uses logical container called RecycleBin
Table remains in the Recycle Bin
Can be queried
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
42/100
42 of 100
Flashback DROP
Using of Recycle Bin is ON by default
The objects in the Recycle Bin areincluded in backups
Can be disabled:
SQL> ALTER SESSION|SYSTEM SETRECYCLEBIN=OFF;
To remove a dropped table from the
Recycle bin: SQL> PURGE TABLE my_table;
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
43/100
43 of 100
Flashback DROP
To purge a tablespace:
SQL> PURGE TABLESPACE users;
To purge a user-specific objects: SQL> PURGE TABLESPACE users USER
app_user;
To purge all dropped objects in thedatabase: SQL> PURGE DBA_RECYCLEBIN;
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
44/100
44 of 100
Space Pressure
Objects in the Recycle Bin are not
counted as used space Oracle drops objects in the Recycle Bin
only in response of a space pressure
The recycle bin objects are deletedbefore performing automatic extending
of the datafile Be aware of user quotas
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
45/100
45 of 100
Flashback DROP
To restore a table from the Recycle bin:
SQL> FLASHBACK TABLE my_table TOBEFORE DROP;
Recover indexes
Does NOT recover constraints
Tables with defined security policies are
NOT kept in the Recycle Bin
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
46/100
46 of 100
FLASHBACK DROP - Summary
For fastest table recovery after DROP TABLE
Recovery success depends on the size of theunderlying tablespace
What is the difference:
1. SQL> DROP TABLE my_table;2. SQL> DROP TABLE my_table PURGE;
Most users are using the second statement
already
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
47/100
47 of 100
Agenda
Flash Recovery Area
Flashback Technology
Enhancements Space Pressure &
Database Hangs
Physical Backup &RecoveryEnhancements
Conclusion
Flashback DATABASE
Flashback DROP
Flashback TABLE
Flashback QUERY
Flashback VERSIONSQUERY
FlashbackTRANSACTIONQUERY
R t d l t d t bl d t ith
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
48/100
48 of 100
Restore deleted table data with
FLASHBACK TABLE
Can recover table to a point in time inthe past
Uses information in the UNDO
tablespace Indexes, constraints and triggers are
restored automatically
Different feature than the FLASHBACKDROP
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
49/100
49 of 100
Flashback Table
Enable row movement for the table: SQL>ALTER TABLE my_table ENABLE ROW
MOVEMENT;
Recovers a table to a point in time: SQL> FLASHBACK TABLE my_table TO
TIMESTAMP to_timestamp('11.04.200620:50','dd.mm.yyyy hh24:mi');
Can be used with restore points:
SQL> FLASHBACK TABLE my_table TORESTORE POINT before_app_upgrade;
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
50/100
50 of 100
Flashback Table
Cannot be used after DDL operationsover the table
Use Flashback Database to recoverfrom:
SQL> TRUNCATE TABLE my_table; The recovery window depends on the
size of UNDO tablespace
Can be configured with:UNDO_RETENTIONparameter
S P
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
51/100
51 of 100
Space Pressure
It is a TARGET parameter
In 10g UNDO_RETENTIONis automaticallytuned
In 10g the recovery window can beguaranteed: SQL>ALTER TABLESPACE undotbs RETENTION
GUARANTEE;
This can cause the database to HANG
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
52/100
52 of 100
Agenda
Flash Recovery Area
Flashback Technology
Enhancements Space Pressure &
Database Hangs
Physical Backup &RecoveryEnhancements
Conclusion
Flashback DATABASE
Flashback DROP
Flashback TABLE
Flashback QUERY
Flashback VERSIONSQUERY
FlashbackTRANSACTIONQUERY
FLASHBACK QUERY Recovery at Row
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
53/100
53 of 100
FLASHBACK QUERY Recovery at Row
Level
Allows a tables to be queried to the time
in the past
Available since Oracle9i
Uses UNDO tablespace Querying old state of my_table:
SQL> SELECT * FROM my_tableAS OF
TIMESTAMP TO_TIMESTAMP('11.04.200621:40', 'DD.MM.YYYY HH24:MI');
Fl hb k Q
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
54/100
54 of 100
Flashback Query
Configure recovery window withUNDO_RETENTIONparameter
Cannot be used after DDL operations
Recovery of PL/SQL package after
wrong compilation:SQL> SELECT text FROM dba_sourceAS OFTIMESTAMP TO_TIMESTAMP('11.04.200621:40', 'DD.MM.YYYY HH24:MI')
WHERE owner='APP_USER1' ANDNAME='LOST_PKG';
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
55/100
55 of 100
g
Flash Recovery Area
Flashback Technology
Enhancements Space Pressure &
Database Hangs
Physical Backup &RecoveryEnhancements
Conclusion
Flashback DATABASE
Flashback DROP
Flashback TABLE
Flashback QUERY
Flashback VERSIONSQUERY
FlashbackTRANSACTIONQUERY
FLASHBACK VERSIONS QUERY
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
56/100
56 of 100
FLASHBACK VERSIONS QUERY
Audit Rows Changes
Retrieve all versions of the rows
between two points of time
Uses UNDO tablespace SQL> SELECT versions_xid, name FROM
my_tableVERSIONS BETWEEN TIMESTAMP
t1AND t2;
Very useful for auditing of user actions
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
57/100
57 of 100
Flash Recovery Area
Flashback Technology
Enhancements Space Pressure &
Database Hangs
Physical Backup &RecoveryEnhancements
Conclusion
Flashback DATABASE
Flashback DROP
Flashback TABLE
Flashback QUERY
Flashback VERSIONSQUERY
FlashbackTRANSACTIONQUERY
FLASHBACK TRANSACTION QUERY
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
58/100
58 of 100
FLASHBACK TRANSACTION QUERY
Audit Transaction Changes
Displays which transaction were responsible for
certain changes for a given interval of time: SQL> SELECT start_scn, commit_scn,operation, logon_user,undo_sql FROMFLASHBACK_TRANSACTION_QUERY;
Uses UNDO tablespace Returns the exact undo statement to undo the
transaction
Cannot be used after DDL operation over thetable
Recovery with Flashback Features -
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
59/100
59 of 100
Recovery with Flashback Features -
Summary
Very powerful
Faster recovery
Faster response of human errors
Needs a space It is only an addition to your backup strategy,
not a replacement for it
There is no full protection from human errors- the DBA is a human too
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
60/100
60 of 100
Agenda
Flash Recovery Area
Flashback Technology Enhancements
Space Pressure & Database Hangs
Physical Backup & RecoveryEnhancements
Conclusion
Space Pressure & Database Hangs
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
61/100
61 of 100
Space Pressure & Database Hangs
An UNDO tablespace with RETENTIONGUARANTEEcan cause the database to
HANG
A SYSTEM tablespace that cannotextend can cause the database to
HANG
Space Pressure & Database Hangs
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
62/100
62 of 100
Space Pressure & Database Hangs
The Database cannot HANG if the
FRA is Full Only two exceptions of the above:
1. Archived logs that are treated as
permanent files in FRA and spacepressure from ARC process
2. Flashback logs that are treated as
permanent files. Caused by GuaranteedRestore Points
Database Hangs - Recommendations
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
63/100
63 of 100
Database Hangs Recommendations
Set smaller and reasonable recovery window
Backup archived logs regularly
Configure at least two archivelog destinations
Give more physical space to FRA
Configure the FRA size to be at most 90% ofthe real physical available space
Delete guaranteed restore points as soon aspossible
Monitor FRA to ensure that there us no spacepressure
ARC Process & Database Hangs
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
64/100
64 of 100
ARC Process & Database Hangs
Not started ARC process after puttingthe database in ARCHIVELOG modecan cause a hang
ARC process is started automatically in10g after putting the database in
ARCHIVELOG mode
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
65/100
65 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and ValidateBackups
New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup
Miscellaneous - RMAN
Recovery with Incrementally Updated
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
66/100
66 of 100
y y p
Backups
Incremental backups capture only blockchanges since the last backup
In 10g there is ability to recover by using
incrementally updated backup files
Incremental backups are applied to the
datafile image copies (level 0)
Incrementally Updated Backups
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
67/100
67 of 100
Incrementally Updated Backups
Incrementally Updated Backups
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
68/100
68 of 100
y p p
RMAN> RUN {
RECOVER COPY OF DATABASE WITH TAG
'incr_updated_baclup';
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPYWITH TAG 'incr_updated_backup'
DATABASE;
}
Provides smaller Recovery Time Objective
In case of real recovery image copies will beupdated with last incremental backup plus
needed small amount of archived logs
Incrementally Updated Backups
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
69/100
69 of 100
Incrementally Updated Backups
In case of media recovery RMAN will
choose the incremental backups overthe available archived logs
Then only a small amount of archived
logs will be applied It is much faster approach
Ensures much faster media recovery
Oracle-Suggested Backup Strategy
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
70/100
70 of 100
Oracle Suggested Backup Strategy
RUN {
ALLOCATE CHANNEL oem_disk backup DEVICE TYPE DISK;
RECOVER COPY OF DATABASE WITH TAG ORA$OEM_LEVEL_0;BACKUP INCREMENTAL LEVEL 1 CUMULATIVE COPIES=1 FORRECOVER OF COPY WITH TAG ORA$OEM_LEVEL_0 DATABASE;
}
This strategy is for 1 day recovery window
only Shouldnt be used if there is configured
recovery window bigger than 1 day
Instead this use UNTIL TIME clause inRECOVER COPY statement
Oracle-Suggested Backup Strategy
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
71/100
71 of 100
Oracle Suggested Backup Strategy
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
72/100
72 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups
New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Fast Incremental Backups with Change
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
73/100
73 of 100
Tracking File
Usually Incremental backups are slower
All blocks in a datafile are scanned This can result in bigger backup window
In 10g can be used a Change TrackingFile to perform faster incrementalbackups
Tracks the physical location of alldatabase changes
Change Tracking File
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
74/100
74 of 100
g g
RMAN uses it to find the location ofchanged blocks since the last
incremental backup Only these blocks will be scanned and
included in the backup
Improves significantly incrementalbackup strategies
Can make an incremental backup up to20 times faster
Change Tracking File
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
75/100
75 of 100
Change Tracking is disabled by default
Has minimal performance overhead
Enabling: SQL> ALTER DATABASE ENABLE BLOCKCHANGE TRACKING;
Uses the Database Area by default: DB_CREATE_FILE_DEST
The size of the Change Tracking File isaround 20 MB
Starwood Hotels Results
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
76/100
76 of 100
Oracle Open World 2005 - Session Id: 1181 Before
8 TB Data Warehouse
Backup takes 19 hours to complete Incremental backups have size 500 GB
Strategy
Incrementally updated backups Change Tacking File
After Backup takes 2 hours to complete
No need to perform full backup every Sunday Faster recovery
Fast Recovery with Disk-Based Strategy
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
77/100
77 of 100
Recovery strategy in case of media failure: Backup:
Incrementally updated backups in FRA Recovery
RMAN> SWITCH DATABASE TO COPY;
RMAN> RECOVER DATABASE;
Start the database by using its image copy,multiplexed control file and online redo logs fromFRA
Take backup immediately after the recoveryoperation
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
78/100
78 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups
New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Less Space for Backups with Compressed
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
79/100
79 of 100
Backups In 10g backups can be compressed with
RMAN
RMAN> BACKUPAS COMPRESSED BACKUPSETDATABASE;
Only for backupsets, not for image copies
1/5 of the size of the original files RMAN automatically uncompress during
recovery operations
The speed of backup & recovery operationsdepends on the CPU resources
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
80/100
80 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups
New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Simplified Recovery Through RESETLOGS
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
81/100
81 of 100
Before 10g - after every RESETLOGS a fullbackup must be performed immediately. Oldest
archived logs was not usable
In 10g there is ability to recover to an oldestincarnation. No need to perform full backup after
every RESETLOGS
The most important change is the new archivedlogs format:LOG_ARCHIVE_FORMAT="log%t_%s_%r.arc"
Simplified Recovery Through RESETLOGS
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
82/100
82 of 100
First archived log from Incarnation 17: ARC00001_0587681349.001
Last archived log from Incarnation 16: ARC00281_0587468099.001
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
83/100
83 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Preview and Validate Backups
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
84/100
84 of 100
To preview backups and commands that willbe used in a subsequent restore operation: RMAN> RESTORE DATABASE PREVIEW;
RMAN> RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' PREVIEW;
To test backups in a hypothetical recovery
situation: RMAN> RESTORE CONTROLFILEVALIDATE;
RMAN> RESTORE DATABASEVALIDATE;
RMAN> RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7'
VALIDATE; RMAN> RESTORE DATABASE ARCHIVELOG FROM TIME
'SYSDATE-7'VALIDATE;
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
85/100
85 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
New Views for RMAN (10g R2)
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
86/100
86 of 100
V$RMAN_BACKUP_JOB_DETAILS
V$BACKUP_ARCHIVELOG_DETAILS
V$BACKUP_ARCHIVELOG_SUMMARY
V$BACKUP_CONTROLFILE_DETAILSV$BACKUP_CONTROLFILE_SUMMARY
V$BACKUP_COPY_DETAILS
V$BACKUP_COPY_SUMMARY
V$BACKUP_DATAFILE_DETAILSV$BACKUP_DATAFILES_SUMMARY
V$BACKUP_PIECE_DETAILS
V$BACKUP_SET_DETAILS
V$BACKUP_SET_SUMMARY
V$BACKUP_SPFILE_DETAILSV$BACKUP_SPFILE_SUMMARY
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
87/100
87 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Cross-Platform Transportable Tablespaces
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
88/100
88 of 100
Easily move tablespaces between LittleEndian and Big Endian OS platforms:
RMAN> CONVERT TABLESPACE USERS
TO PLATFORM'Solaris[tm] OE (32-bit)'DB_FILE_NAME_CONVERT
'E:\oracle\oradata\orcl102','E:\oracle\oradata\';
V$TRANSPORTABLE_PLATFORM
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
89/100
89 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Oracle Secure Backup (10g R2)
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
90/100
90 of 100
Media ManagementSoftware coming fromOracle
Centralized backupmanagement
Security policy based
Supports most of tapedevices
Encryption to tapes
Expected in May 2006
Agenda
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
91/100
91 of 100
Flash Recovery Area
Flashback TechnologyEnhancements
Space Pressure &Database Hangs
Physical Backup &
Recovery Enhancements Conclusion
Incrementally UpdatedBackups
Change Tracking File
Compressed Backups
Simplified RESETLOGS
Preview and Validate
Backups New RMAN Views
Easy Tablespace Transport
Oracle Secure Backup Miscellaneous - RMAN
Miscellaneous - RMAN
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
92/100
92 of 100
(10g R2 EE) - Dynamic Channel Allocation overthe instances in RAC
(10g R2) - RMAN Channel Failover betweeninstances in RAC
(10g R2 EE) - RMAN encrypted backups RMAN> CONFIGURE ENCRYPTION ALGORITHM'algorithm_name';
Backup database to image copies: RMAN> BACKUPAS COPY DATABASE;
Miscellaneous - RMAN
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
93/100
93 of 100
(10g R2) - Transportable TablespaceSets from Backups
Before 10g R2 tablespaces can betransported only if they are in read-onlymode during tablespace transport process
In 10g R2 there is capability tablespaces tobe transported from backups instead ofdata files
Can be very useful for OLTP systems
Miscellaneous - RMAN
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
94/100
94 of 100
(10g R2) - RMAN excludes empty datablocks from backups. It can do this even
in MOUNT stage (10g R2) - Automatic Tempfile Creationafter Media Recovery with RMAN
Automatic Recovery of files that havenever been backed up: RMAN> RESTORE DATABASE;
Needs all archived redo logs from the timeof the data file creation till restore point
Miscellaneous - RMAN
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
95/100
95 of 100
Drop the database with simple command: RMAN> DROP DATABASE;
RMAN> DROP DATABASE INCLUDING BACKUPS;
Cataloging whole directories with RMAN RMAN> CATALOG START WITHD:\my_backups;
Specifying Limits for Backup Duration: RMAN> BACKUP DATABASE DURATION 07:00;
RMAN> BACKUP DATABASE DURATION 07:00MINIMUM LOAD|TIME;
Miscellaneous - RMAN
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
96/100
96 of 100
Cross-Platform Transportable Databases
A Whole Database can be transferredbetween different OS platforms
RMAN command: CONVERT DATABASE
Restriction: Target and Destination Platformmust be with same endian format
User-Managed Backups
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
97/100
97 of 100
In 10g the whole database can be put inOnline Backup Mode: SQL> ALTER DATABASE BEGIN BACKUP;
SQL> ALTER DATABASE END BACKUP;
Conclusion
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
98/100
98 of 100
Unified Storage for a Disk-Based
Backup Strategy Fast recovery from Human Errors with
Powerful Flashback Features
Faster Physical Backups
Faster Recovery from Media Failures
Integration with Enterprise Manager
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
99/100
99 of 100
A Backup is only as good asthe Recovery it can provide
Questions & Answers
-
7/25/2019 Backup&Recovery.Enhancements.in.Oracle10g-Presentation.pdf
100/100
100 of 100
Questions & Answers
URL: http://dba-blog.blogspot.com
Email: [email protected]