Professional Documents
Culture Documents
”
The following is intended to outline our general product direction. It
is intended for information purposes only, and may not be
incorporated into any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in
making purchasing decision. The development, release, and timing
of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.
Timothy Chien
Senior Product Manager
Oracle Corporation
Saravanan Shanmugam
Senior Architect
The Hartford
“This presentation is for informational purposes only and may not be incorporated into a contract or agreement.”
Best Practices for
Oracle Database 10g
Backup and Recovery
Session Objectives
y Media Failure
– Restore database files to a new location
y Block Corruption
– Block Media Recovery, Trial Recovery,
LogMiner
y User Error
– Flashback, TSPITR, LogMiner
y Disaster
– Validate restoring all files to another host
Session Objectives
0 1 1 1 1 1 0 0 1 1 1 1 1 0
Incremental backup level Incremental backup level
y Read-Only Tablespaces
– Use range partitioning on large tables
– Required to be backed up one time
– Data may reside on CD-ROM or WORM
24
Session Objectives
* Hardware Mirroring
* Oracle Streams
* Utilize RMAN:
• Incrementally updated backups
- Take initial image copy of data files
- Take subsequent incremental backups
- Merge incrementals with data file image copies to
create new image copies, on regular basis
• Block change tracking for fast incremental
backups
- Reads only changed blocks, instead of whole data file
on incremental backup
• Recovery catalog
- Keep longer history of backups vs. control file, e.g.
monthly or quarterly incremental backups
* Our Solution: Use RMAN to incrementally update
transported tablespaces
ITTS Overview
Initial Month
Source Database Target Database
Tablespace Copy
Subsequent Months
Source Database Target Database
Incremental
Backups
Changed
Changed Blocks
Blocks Copy
Change
Tracking
File
NFS Mounted Filesystems
ITTS Procedure - First Month
1. One time image copy of datafiles performed after placing tablespace
in read-only mode
run {
allocate channel d1 device type disk format
'/prepsp_0006/appl/oracle/prepsp/db1.dbf';
allocate channel d2 device type disk format
'/prepsp_0006/appl/oracle/prepsp/db2.dbf';
BACKUP INCREMENTAL LEVEL 1 TAG "TEST9_BACKUP" for
recover of copy with tag "TEST9_BACKUP" tablespace
test1;
}
2. Plug in the tablespace in destination database via network
> impdp readonly/readonly DIRECTORY=exp_dir
NETWORK_LINK=dtest2.world
TRANSPORT_TABLESPACES=test1
TRANSPORT_FULL_CHECK=n
TRANSPORT_DATAFILES=
'/prepsp_0006/appl/oracle/prepsp/db1.dbf',
'/prepsp_0006/appl/oracle/prepsp/db2.dbf'
ITTS Procedure - Subsequent Months
3. Drop tablespace in destination database with only ‘INCLUDING
CONTENTS’ option (data files are preserved)
SQL> drop tablespace <tablespace name> including
contents;
4. Check for any new datafiles and create image copy in the destination
database location (tablespace must be in in read-only mode during
image copy)
run {
allocate channel d1 device type disk format
'/prepsp_0006/appl/oracle/prepsp/db3.dbf';
BACKUP INCREMENTAL LEVEL 1 TAG "TEST9_BACKUP" for
recover of copy with TAG "TEST9_BACKUP"
datafile 3;
}
ITTS Procedure - Subsequent Months
5. Perform incremental backup and merge it with datafiles in destination
database (tablespace must be in read-only mode during backup)
run {
allocate channel d1 device type disk format
'/prepsp_0005/appl/oracle/prepsp/db1%t.dbf';
allocate channel d2 device type disk format
'/prepsp_0005/appl/oracle/prepsp/db2%t.dbf';
BACKUP INCREMENTAL LEVEL 1 TAG "TEST9_BACKUP" for
recover of copy with TAG "TEST9_BACKUP" tablespace
test1;
recover copy of tablespace test1 with TAG
"TEST9_BACKUP";
}
6. Plug in the tablespace in destination database
> impdp readonly/readonly DIRECTORY=exp_dir
NETWORK_LINK=dtest2.world
TRANSPORT_TABLESPACES=test1 TRANSPORT_FULL_CHECK=n
TRANSPORT_DATAFILES=
'/prepsp_0006/appl/oracle/prepsp/db1.dbf',
'/prepsp_0006/appl/oracle/prepsp/db2.dbf'
ITTS Restrictions
Q U E S T I O N S
A N S W E R S