Compelling%20Reasons%20to%20Use%20Oracle9i%20R2%20RMAN - PowerPoint PPT Presentation

About This Presentation
Title:

Compelling%20Reasons%20to%20Use%20Oracle9i%20R2%20RMAN

Description:

Shell Canada Limited. Session: 36487. Compelling Reasons to Use Oracle9i R2 RMAN. Wayne Linton ... 30 years Shell Canada Limited. 30 year industry, 10 years Oracle ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0

less

Transcript and Presenter's Notes

Title: Compelling%20Reasons%20to%20Use%20Oracle9i%20R2%20RMAN


1
Compelling Reasons to Use Oracle9i R2 RMAN
Session id 36487
  • Wayne LintonOracle Database Administrator
  • Shell Canada Limited

2
whoami
  • Wayne Linton, I.S.P.
  • 30 years Shell Canada Limited
  • 30 year industry, 10 years Oracle
  • OCP certified from 7.3 through 9i
  • past president Calgary Oracle Users Group
  • published in Select, Oracle magazines
  • part time Oracle DBA instructor at Southern
    Alberta Institute of Technology

3
Been There, Done That
  • traditional hot and cold backups scripted for
    OpenVMS with parallel output streams, NT, UNIX
  • 8i and 9iR2 RMAN on NT and UNIX dialects
  • cobbling of OS scripting wrapped around various
    Oracle utility backup commands
  • have performed complete and PIT production
    recoveries using both RMAN and traditional
    procedures

4
Intended Audience
  • Oracle Database Administrators who
  • have never used RMAN and currently perform
    backups in the old tried-n-true method
  • currently use a 3rd party tool because they
    understand the value of server managed backup and
    recovery
  • attempted previously to use but gave up on the
    earlier releases of RMAN
  • are currently using 8i RMAN having worked through
    the frustrations and look forward to 9iR2

5
Agenda
  • brief introduction to server managed
    backup/recovery and compelling reasons to start
    using RMAN
  • for users of 3rd Party backup tools, THE
    compelling reason to switch to RMAN
  • for pre-9i R2 users of RMAN, compelling reasons
    to upgrade!
  • 9iR2 RMAN backup demo
  • 9iR2 RMAN block recovery demo

6
RMAN at Shell Canada
Solaris 9203 (1)
Solaris9203 rdbmsRMANCatalog9203
Solaris 9203 (2)
sqlnet
Solaris 817 (5)
NT4 817 (1)
AIX 817 (3)
staggered backupschedules toprevent deadlocks
AIX 817 (1) 816 (2)
AIX 817 (1) 816 (2)
7
Backup and Recovery
  • only reason to backup is to be able to recover!
  • one day, you WILL have to recover
  • where are your backups? are they any good?
  • have you done a recovery test lately?
  • any database worth saving will be in archivelog
    mode so that you can perform ...
  • online (hot) backups for high availability
  • recover from media failure and significant user
    (yes, this includes the DBA!) errors

8
User Managed ...
  • dynamic O/S Oracle utility scripts
  • begin backup / copy datafile / end backup
  • can generate significant additional redo
  • backup complete datafiles (all blocks)
  • manual log switches and archivelog backup
  • manually scripted parallelism
  • manual copy of pfile, cfile binary and trace
  • manual management of backups, archive logs

9
User Managed contd. ...
  • backup scripts differ for each O/S
  • backup might contain corrupted data
  • do I have ALL the required archived redo to
    recover from this backup?
  • manual cloning tedious and preserves the internal
    dbid
  • restore / recovery is totally a manual process
  • Q where are the backups? can I recover?

10
Oracle Knows .
  • Everything about your database
  • datafiles, tablespaces, variable blocksizes
  • data blocks used and not used
  • data blocks changed since last backup
  • blocks changed during backup (fractured)
  • controlfile, backup history (can get big!)
  • current and archived redo logs
  • SPFILE (persistent server parameter file)
  • standby RAC databases (not discussed here)

11
Backup for Recovery
  • one day you WILL have to recover
  • do you know what backups are needed ?
  • do you know where they are located ?
  • are you certain that the backups are good ?
  • do you have all the required archive logs ?
  • are your recovery skills a little rusty?

12
(No Transcript)
13
A Matter of Trust ?
  • You Trust the Managementof your Data to Oracle
    ...
  • Why not Trustthe Management of your Backup and
    Recovery to Oracle?

14
What Is RMAN?
  • Recovery Manager
  • Oracle utility to backup, restore, recover
    databases from Oracle 8
  • invoked from command line or Enterprise Manager
    GUI
  • is aware of Oracle database internals
  • tracks location of all backup files needed for
    recovery (in controlfile or separate catalog)
  • server managed backup and recovery

15
Server Managed
polling / monitor
targetDB
target homeRMAN binaryserver processes
RMANCatalog-- Target versioncompatiblereposit
ory
channels
cf
mediamanagementlayer
16
RMAN Server Managed ...
  • RMAN uses Oracle-aware server processes to
    perform backup and recovery operations
  • fully integrated with database, fully supported
  • can skip never-used blocks and unchanged blocks
    (incremental) to save space and time
  • detects and re-reads fractured blocks so ...
  • hot backups do not generate additional redo
  • checks every block for corruption

17
RMAN Server Managed ...
  • parallelism built in (Enterprise Edition)
  • interfaces to tape via media management layer
    (MML) API (vendor-supplied software)
  • knows what backups have been taken, and where
    they are located (cfile or catalog)
  • manages log switches and archive log backups and
    clearing of archivelog disk(s)
  • manages removal of obsolete backups

18
RMAN Server Managed ...
  • O/S independent scripting language
  • scripts can be stored in catalog
  • can do backup / restore validation testing
  • lists backups and reports recoverability status
  • clone, standby database creation
  • knows where to find and what is needed to do
    recovery, and restores required backup files
    automatically

19
RMAN - Server Managed
  • RMAN uses Oracle-aware server processes to
    perform backup and recovery operations
  • fully integrated with database, fully supported
  • knows what backups to take, have been taken, and
    where they are located (cfile or catalog)
  • knows what backups are needed for recovery, and
    restores the required backup files to the right
    location automatically

20
RMAN Answers the Questions
Which backups do I need? Where are they? Can
I recover?
21
  • 1 Fully Integrated with Database
  • Fully Supported by Oracle
  • aware of internals so can optimize for
    performance
  • hot backup handling of fractured blocks
  • skips backup of unused / unchanged blocks
  • standby backups fully interchangeable with
    primary (can offload backup load to standby
    machine!)
  • can create clone and standby databases (duplicate
    command)
  • knows about RAC

22
  • 2 Supports Incremental Backups
  • smaller backups and reduced backup/recovery time
  • reads every block and checks for corruption
  • multi-level incremental and cumulative backup
    schemes possible
  • backups to disk (faster restore) or tape directly
  • can even do cold (mounted) incremental backups!

23
Incremental Backups
  • Time/space depends upon amount of change

archivelogs
space needed
changed block backup writes
backuptime
db block read / corruption checking
db block change
24
  • 3 Online Backups Simply Efficiently
  • no need for begin-end backup commands
  • fractured (changed) blocks re-read by RMAN during
    online backups
  • no additional redo generated
  • multiple output streams (channels) in parallel
  • multi-file read, block interleaving to one
    backupset
  • current redo log switched, archived, and backed
    up as part of backupset automatically

25
Things to Note ...
  • performance when using parallelism and
    interleaving depends on hardware configuration
    (cpu, disk, tape drives)
  • no control over what files to multiplex together
  • RMAN backupset format is proprietary, so
  • RMAN must be used for restore operation
  • also supports file image backups (to disk only)
    that can be used directly without restore

26
  • 4 Capture and Reporting of Backup Metadata
  • controlfile contains relevant RMAN backup
    metadata (whether you use RMAN or not!)
  • controlfile size governed by parameter
    control_file_record_keep_time days
  • LIST datafile, archivelog backup information
  • REPORT unrecoverable, report obsolete, etc.
  • recommended (but optional) use RMAN Catalog to
    also store backup metadata for multiple databases
  • backup will use controlfile if catalog not
    reachable

27
3rd Party Users
  • 3rd party tools differ little from RMAN
  • have nicer GUI than OEM ?
  • BUT cost increases with size or number of
    databases or servers where software used
  • why pay a lot of money for functionality you
    already have?

28
  • 5 RMAN is FREE!!
  • included in database license
  • comes with Legato MML software to write to tape
  • can purchase MML software from preferred
    third-party media management vendor
  • see http//otn.oracle.com/deploy/availability for
    members of the Backup Solutions Program

29
Pre-9i users of RMAN
  • early versions of RMAN were somewhat awkward to
    use
  • verbose scripting and messages
  • lacking in basic functionality like deletion of
    obsolete O/S backup files
  • 9i and 9iR2 have significantly improved usability
    and functionality

30
Pre-9i Users
  • 9i can still use the verbose scripting language
    of the earlier versions, but why would you want
    to?
  • Note you must use the RMAN executable version
    that comes in the ORACLE_HOME of the target
    database!
  • search metalink RMAN compatibility matrix
  • RMAN enhancements are a small part of the many
    reasons to upgrade to 9iR2!

31
  • 6 Persistent Configuration Parameters
  • RMAN remembers backup settings from one session
    to another (in controlfile, catalog), making
    routine backups as simple as
  • BACKUP DATABASE
  • set once and forget about them
  • can configure many parameters ...

32
8i vs 9i RMAN Backup Script
run allocate channel d1 type disk allocate
channel d2 type disk allocate channel d3 type
disk sql "alter system switch logfile"
backup incremental level 0 format
'HOME/BACKUP/d_t_s_p.bus' filesperset 5
(database include current controlfile) sql
"alter system archive log current" backup
format 'HOME/BACKUP/d_t_s_p.bus'
(archivelog all delete input) backup
format 'HOME/BACKUP/d_t_s_p.bus'
(current controlfile) release channel d1
release channel d2 release channel d3
backup database incremental level 0 plus
archivelog delete all input
33
Persistent Config. Params
  • show all
  • CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF
    1 DAYS
  • CONFIGURE BACKUP OPTIMIZATION OFF default
  • CONFIGURE DEFAULT DEVICE TYPE TO DISK default
  • CONFIGURE CONTROLFILE AUTOBACKUP ON
  • CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR
    DEVICE TYPE DISK TO 'd\orabackup\rman\d_cfile
    _F.bus'
  • CONFIGURE DEVICE TYPE DISK PARALLELISM 2
  • CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE
    DISK TO 1 default
  • CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE
    TYPE DISK TO 1 default
  • CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT
    'd\orabackup\rman\d_T_s_p.bus'
  • CONFIGURE MAXSETSIZE TO UNLIMITED
  • CONFIGURE SNAPSHOT CONTROLFILE NAME TO
    d\oracle\ora92\database\SNCFWAIN9I.ORA'
    default

34
  • 6a Configure Retention Policy
  • by backup redundancy count or number of days
    recovery window, will determine how many backups
    to keep for how long CONFIGURE RETENTION
    POLICY
  • then the obsolete OS backup files are physically
    removed by the command
  • DELETE OBSOLETE

35
  • 6b Auto Channel Allocation Parallelism
  • channels are allocated automatically
  • no need to code each channel separately
  • number of channels allocated specified with
    parallelism parameter
  • CONFIGURE DEVICE TYPE DISK PARALLELISM 2

36
  • 6c Controlfile, SPFILE Auto Backup
  • if set to ON, controlfile and spfile backed up
    together in separate backup piece with every
    backup
  • CONFIGURE CONTROLFILE AUTOBACKUP ON
  • controlfile and spfile always and automatically
    backed up with datafile 1 (system) if autobackup
    set to OFF
  • note that spfile automatically backed up, NOT
    pfile!

37
  • 6c Controlfile, SPFILE Auto Backup contd ...
  • if set to ON, controlfile and spfile backed up
    automatically whenever the database structure is
    changed
  • new, dropped, offlined, onlined tablespace,
    datafile, redo logs, renamed file, etc.
  • no need to invoke RMAN for this to happen
  • auto-backup event noted in the alert log

38
  • 6d Other Noteworthy Parameters
  • skip read-only tablespaces already backed-up
    with CONFIGURE BACKUP OPTIMIZATION ON
  • exclude specific tablespaces with CONFIGURE
    EXCLUDE FOR TABLESPACE xxxxxx
  • create up to 4 backup copies with CONFIGURE
    BACKUP COPIES TO n

39
  • 7 Auto Archive and Backup Current Redo
  • no need to manually switch, backup current log
  • one copy of all archived logs backed up, current
    log switched, archived, and then also backed up
  • guaranteed to save all requisite redo for
    recovery
  • BACKUP DATABASE PLUS ARCHIVELOG

40
  • 8 Clearing Multiple Archivelog Destinations
  • pre-9i supported clearing only 1 archivelog
    destination
  • multiple archivelog destinations searched if
    necessary to obtain good log copy for backup
  • all archivelog destinations cleared after backup
    with command
  • BACKUP DATABASE PLUS ARCHIVELOG DELETE ALL
    INPUT

41
  • 9 Less Verbose Runtime Messages
  • every line of pre-9i RMAN output was prefixed
    with RMAN-xxxxx, plus additional less useful
    informational messages obscured the good stuff
  • these can be optionally turned on, but are
    supressed by default
  • errors will still be prefixed with RMAN-xxxxx
  • scan the log for RMAN-00569

42
D E M O N S T R A T I O N
RMAN Incremental Backup
in progress
43
Demonstration
  • show all (persistent configuration parameters)
  • level 2 incremental backup
  • backup incremental level 2 database plus
    archivelog delete all input
  • list backup of tablespace WAIN
  • report unrecoverable
  • delete obsolete

44
  • 10 Block Media Recovery
  • no need to offline and restore large datafile
    when only a few blocks are corrupted
  • backup / validate places location of corrupted
    database blocks in view vdatabase_block_corrupt
    ion
  • alert log also lists corrupted file, block
  • BLOCKRECOVER CORRUPTION LIST

45
D E M O N S T R A T I O N
RMAN blockrecover
46
Demonstration
  • report unrecoverable
  • select from vdatabase_block_corruption
  • corrupt tablespace wain datafile
  • backup validate check logical tablespace wain
  • select from vdatabase_block _corruption
  • blockrecover corruption list
  • backup validate check logical tablespace wain
  • select from vdatabase_block _corruption

47
  • 11 Restartable Backups and Restores
  • BACKUP DATABASE NOT BACKED UP SINCE TIME
  • Restore failures may leave good versions of some
    datafiles in the right place
  • restarted restore will NOT restore those files
  • can force them to be restored anyway with
  • RESTORE FORCE ...

48
  • 12 Staging of Archivelogs During Recovery
  • sometimes you dont have enough disk space to
    restore all the archived redo logs required for
    recovery (in this example, only 100M)
  • new feature automatically stages restore of
    archived logs as per available disk, applies
    them, and deletes them to make room for next set
    of logs
  • RECOVER DATABASE DELETE ARCHIVELOG MAXSIZE
    100M

49
  • 13 Backing Up Backupsets
  • backupsets can reside on disk for faster restore
  • older backupsets can be backed up to tape and
    deleted automatically from disk to make room for
    new backups on disk
  • backupset backups are also checked for corruption
  • BACKUP BACKUPSET CREATED BEFORE DELETE
    INPUT

50
  • 14 Other Important RMAN Functions
  • recover to previous incarnations if using
    catalog
  • automatic tagging of backups
  • DBNEWID to change id of manually cloned DB
  • OEM GUI wizard improvements
  • automated TSPITR for self-contained tablespaces
  • DUPLICATE command to build clone and standby
    databases
  • BACKUP and RESTORE VALIDATE

51
My Personal Favourites
  • Configure Retention Policy (Delete Obsolete!)
  • Configure Controlfile Autobackup
  • Other Persistent Configuration Parameters!!!!!
  • Block Media Recovery while still Online!
  • Backup Database Plus Archivelog Delete All
    Input
  • Recover Database Delete Archivelog Maxsize
  • Restartable Backups and Restores

52
Upon The Shoulders of ...
  • Tammy Bednar, Oracle Corporation Database Backup
    Recovery Strategies and Best Practices - paper
    213, OOW 2001
  • Tammy Bednar, Oracle CorporationRich Bernat,
    Chevrontexaco CorporationAre You Using the Best
    Solution for Protecting Your Enterprise? - paper
    32513, OOW 2002

53
Upon The Shoulders of ...
  • Dave Anderson, SkillBuilders, Inc.A Practical
    Introduction to Oracle9i RMANOratechs, 2003

54
Next Steps.
  • Recommended sessions
  • 40104 RMAN 10g Reloaded - Tammy BednarTues.
    9th, 330 PM Moscone Room 304
  • 36675 RMAN 10g ATA Storage in Action - Bob
    NgWeds. 10th, 830 AM (not sure which room)
  • Recommended hands-on labs
  • Manage the Database Environment, Lesson
    6Performing Backups and Recovering Your Database
  • Demogrounds
  • 10g RMAN (many!) New Features, new EM interface

55
Next Steps.
  • Relevant web sites to visit for more information
  • Metalink - many technical notes, articles, papers
  • OTN Oracle Documentation
  • Oracle9i Recovery Manager Users Guide -
    A96566-01
  • Oracle9i Recovery Manager Reference - A96565-01
  • Oracle9i Recovery Manager Quick Reference -
    A96564-01
  • Oracle9i RMAN Backup and Recovery,Freeman
    Hart, ISBN 0-07-222662-5

56
Reminder please complete the OracleWorld
online session surveyThank you.
57
A
58
Session id 36487
Compelling Reasons to Use Oracle9i R2 RMAN
Wayne LintonOracle Database Administrator Shell
Canada Limited wayne.linton_at_shell.ca
Write a Comment
User Comments (0)
About PowerShow.com