![Page 1: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/1.jpg)
1
Rman Best Practices - Michael S. Abbey © Pythian 2011
Rman Don’t Forget the Basics
1Michael S. Abbey
NYOUG WebinarFebruary 3, 2012
Michael S. Abbey Oracle DBA / Team Lead
![Page 2: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/2.jpg)
2
Rman Best Practices - Michael S. Abbey © Pythian 2011
www.pythian.com
![Page 3: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/3.jpg)
3
Rman Best Practices - Michael S. Abbey © Pythian 2011
Preaching to the converted
• The ultimate backup solution• Teenager of Oracle backup solutions• Least amount of intervention• Simple syntax• Redundant metadata (with catalog)• Native compression
![Page 4: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/4.jpg)
4
Rman Best Practices - Michael S. Abbey © Pythian 2011
Approach
• Overview of the top 10• The why• Interactive discussion• Summary and moving
forward
![Page 5: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/5.jpg)
5
Rman Best Practices - Michael S. Abbey © Pythian 2011
Mantra
Back up and take a good look at your backup; the secret about backup is to be able to get your backup and bring your
database back up …
![Page 6: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/6.jpg)
6
Rman Best Practices - Michael S. Abbey © Pythian 2011
10 Language concerns
9 Persistent configuration
8 Naming conventions
7 Duplicate database
6 Block change tracking
![Page 7: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/7.jpg)
7
Rman Best Practices - Michael S. Abbey © Pythian 2011
5 Prep for loss of everything
4 Recovery testing
3 Catalog-based
2 control_file_record_keep_time
1 Controlfile autobackup
![Page 8: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/8.jpg)
8
Rman Best Practices - Michael S. Abbey © Pythian 2011
10-Language concerns
• Avoid surprises of character translation– raison d'être raison d'jtre– André Andrh
• Assist reporting using list backup ...; commands [02-OCT-11 or 02-OCT-11 04:32:19]
• Instrumental when using restore/recovery set until functionality
![Page 9: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/9.jpg)
9
Rman Best Practices - Michael S. Abbey © Pythian 2011
10-Language concerns• Query the character set of your database
using V$NLS_PARAMETERS• Set environment accordingly
NLS_LANG=american_america.we8iso8859p1
NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS'
![Page 10: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/10.jpg)
10
Rman Best Practices - Michael S. Abbey © Pythian 2011
9-Persistent configuration
• Default device type• Compression preferences (10g and up)• Channel configuration• Recovery window (preferred to redundancy)
– avoid surprises; see here (Seiler, Pythian)– what becomes obsolete; see here (Shedai,
Pythian)– controls deletion of obsolete archived redo
![Page 11: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/11.jpg)
11
Rman Best Practices - Michael S. Abbey © Pythian 2011
9-Persistent configurationconfigure default device type to disk;configure device type disk backup type to compressed backupset;configure channel device type disk format '/rman/orcl/%d_%U_bsn%s_pn%p_%T.bak';configure retention policy to recovery window of 14 days;configure maxsetsize to 8g;
**
![Page 12: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/12.jpg)
12
Rman Best Practices - Michael S. Abbey © Pythian 2011
8-Naming conventions
Wild card Result%d Upper-case database name%T Timestamp (YYYYMMDD)%p Piece number within backupset%s Backup set number (counter
incremented in control file)
![Page 13: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/13.jpg)
13
Rman Best Practices - Michael S. Abbey © Pythian 2011
7-Duplicate database
• Fluency mandatory• Proof-of-concept on backup strategy• Features of 11g and 9i/10g• Build physical standby• Nuances of doing on same server
– db_name the same– lock_name_space
![Page 14: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/14.jpg)
14
Rman Best Practices - Michael S. Abbey © Pythian 2011
7-Duplicate database
PROD
• open "normal"• application
activities on-going
STDBY
• nomount• spfile in place
SQL*Net connectivity
SYS password = SYS password
![Page 15: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/15.jpg)
15
Rman Best Practices - Michael S. Abbey © Pythian 2011
• 10g• Rman backup
accessible to the standby site
• Restore from rman image
• Roll-forward to current point-in-time
• 11g
• No rman backup need be on standby site
• Active duplicate• Roll-forward
activities reduced
7-Duplicate database
![Page 16: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/16.jpg)
16
Rman Best Practices - Michael S. Abbey © Pythian 2011
6-Block change tracking
• Huge enhancement for incremental backups• BCT file used by rman as a roadmap to what
has changed• Discuss when turned on
– With personnel doing backups– Many organizations do not backup
ANYTHING in database directories or Oracle software locations
![Page 17: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/17.jpg)
17
Rman Best Practices - Michael S. Abbey © Pythian 2011
6-Block change tracking
alter database enable block change tracking using file '/database/orcl_bct.f';
alter database disable block change tracking;
![Page 18: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/18.jpg)
18
Rman Best Practices - Michael S. Abbey © Pythian 2011
6-Block change tracking
Minimal
![Page 19: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/19.jpg)
19
Rman Best Practices - Michael S. Abbey © Pythian 2011
5-Prep for loss of everything
1. Controlfile autobackup2. Precious DBID3. As many level 0’s as performance
and storage can "tolerate"4. Regular "show all;" to ALWAYS
know where rman will find backupset pieces
![Page 20: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/20.jpg)
20
Rman Best Practices - Michael S. Abbey © Pythian 2011
4-Recovery testing
• The full gamut of scenarios– full database– point-in-time
• cancel based• time based• change based
• Restore database validate• Restore database preview
![Page 21: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/21.jpg)
21
Rman Best Practices - Michael S. Abbey © Pythian 2011
4-Recovery testing
• Nothing replace "the real thing"• Same-server restore/recovery requirements
restore database preview
restore database validate
restore/recover database
![Page 22: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/22.jpg)
22
Rman Best Practices - Michael S. Abbey © Pythian 2011
set dbid 320066378; run { set controlfile autobackup format for device type disk to '/rman/orcl/%F'; restore controlfile from autobackup; }
**
![Page 23: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/23.jpg)
23
Rman Best Practices - Michael S. Abbey © Pythian 2011
3-Recovery catalog
• 2 locations for metadata• BP object in catalog frequent target of rman
reporting activities• Mandatory to allow master database
rescovery when writing rman on physical standby
• Same server with its own standby
![Page 24: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/24.jpg)
24
Rman Best Practices - Michael S. Abbey © Pythian 2011
3-Recovery catalog
User with– quota– create session– create table– create view– create procedure– recovery_catalog_owner
DBARESOURCE
![Page 25: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/25.jpg)
25
Rman Best Practices - Michael S. Abbey © Pythian 2011
• Specifies the minimum number of days before a reusable record in the control file can be reused
• Only applies to control file records that are circularly re-usable
• Archivelog records AND many types of backup records fall into this category
2-control_file_record_keep_time
![Page 26: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/26.jpg)
26
Rman Best Practices - Michael S. Abbey © Pythian 2011
2-control_file_record_keep_time
alter system set control_file_record_keep_time = 65;
9748480 Nov 5 cntrl1.ctl19496960 Nov 25 cntrl1.ctl
![Page 27: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/27.jpg)
27
Rman Best Practices - Michael S. Abbey © Pythian 2011
1-Controlfile autobackup
• The ultimate configuration• Controlfile backup taken
– structure change to database– ANY rman backup
• Restore controlfile to alternate location• Backup (then extract) spfile
![Page 28: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/28.jpg)
28
Rman Best Practices - Michael S. Abbey © Pythian 2011
1-Controlfile autobackup
• Written when– a successful rman backup completes– a structural change is done on the
database• Facilitates recovery from loss of everything
(even spfile)• Contains the DBID when %F used as
format mask
![Page 29: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/29.jpg)
29
Rman Best Practices - Michael S. Abbey © Pythian 2011
1-Controlfile autobackup
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/rman/orcl/%F';
![Page 30: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/30.jpg)
30
Rman Best Practices - Michael S. Abbey © Pythian 2011
pythianmsabbey pythianmabbey
![Page 31: Rman Don’t Forget the Basics - New York Oracle User · PDF file• Teenager of Oracle backup solutions ... 7 Duplicate database 6 Block change tracking. 7 ... • 11g • No rman](https://reader031.vdocuments.us/reader031/viewer/2022022005/5ab12b4c7f8b9a284c8c1a4c/html5/thumbnails/31.jpg)
31
Rman Best Practices - Michael S. Abbey © Pythian 2011
Q & A