Documente Academic
Documente Profesional
Documente Cultură
D46524
Edition 1.0
D22057GC10
September 2010
Volume I • Student Guide
Oracle Database 10g:
Backup and Recovery
Maria Billings This document contains proprietary information and is protected by copyright and
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered in
Technical Contributors any way. Except where your use constitutes "fair use" under copyright law, you may
and Reviewers not use, share, download, upload, copy, print, display, perform, reproduce, publish,
license, post, transmit, or distribute this document in whole or in part without the
Christopher Andrews express authorization of Oracle.
Tammy Bednar
The information contained in this document is subject to change without notice. If you
Tom Best find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
Harald van Breederode warranted to be error-free.
Mary Jane Bryksa
Restricted Rights Notice
Marielle Canning
Editor
Daniel Milne
Graphic Designer
Satish Bettegowda
Publisher
Jobi Varghese
Contents
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
1 Introduction
Objectives 1-2
Course Objectives 1-3
What Is Backup and Recovery? 1-4
Performing Backup and Recovery Operations for an Oracle Database 1-5
iii
3 Using RMAN to Create Backups
Objectives 3-2
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
iv
Performing Complete Recovery: Loss of a System-Critical Datafile in ARCHIVELOG
Mode 4-8
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
v
Flashback Table: Considerations 5-26
Flashback Database: Overview 5-27
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
vi
Preparing for TSPITR 7-8
Determining the Correct Target Time 7-9
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
vii
9 Monitoring and Tuning RMAN
Objectives 9-2
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
viii
Virtual Tape Libraries (VTL) 10-17
Managing Data to Be Protected 10-18
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
ix
Managing Database Tape Backups 12-16
Performing Database Recovery 12-18
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
x
Oracle Secure Backup User: OS Permissions 15-9
Preauthorization 15-11
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
xi
Job Summaries 16-33
Displaying Log Files and Transcripts 16-34
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Summary 16-35
Practice Overview 16-36
Appendix A: Practices
Appendix D: Glossary
xii
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Introduction
• RMAN:
– Is a command-line client for advanced functions
– Has powerful control and scripting language
– Has a published API that enables interface with most
popular backup software
Server Recovery
Target database session Manager Enterprise
(control file (RMAN) Manager
repository)
Options
Server
Recovery
catalog
Disk Flash Recovery database
Area
auxiliary database can reside on the same host as its parent or on a different host.
Channel: A channel represents one stream of data to a device type. To perform and record
backup and recovery operations, RMAN requires a link to the target database. A channel
establishes this link by creating a session in the target database that is able to interface with the
host file system (to interface with disks) and the Media Management Library (to interface with
tapes). You can allocate channels manually or preconfigure channels by using automatic
channel allocation.
Flash Recovery Area: The Flash Recovery Area is a location in which Oracle Database can
• Backup strategies:
– Whole: A backup of the control file and all datafiles that
belong to a database
– Partial: A portion of the database
• Backup types:
• The online redo log files are used to roll the database
forward.
• Uncommitted changes are rolled back.
Recovered
Database with Database with database
restored committed and
datafiles uncommitted
transactions
Archiver
(ARCn)
Online redo Archived
Backup Destinations
Backups can be written to a designated disk directory, a Media Management Library, or the
Flash Recovery Area. Specifying a disk directory or the Flash Recovery Area means that
backups go to hard-disk media. Typically, backups are regularly moved offline to tape via the
media management interface in order to maintain disk space availability. Any disk directory
can be specified as the destination of a backup provided that it already exists.
If you set up a Flash Recovery Area, many backup and recovery tasks are simplified for you.
The Oracle database automatically names files for you, and deletes obsolete files when there is
space pressure. More information about configuring Flash Recovery is provided later in this
lesson.
Seven-day retention
If you require a certain number of backups to be retained, then you can set the retention policy
on the basis of the redundancy option. This option requires that a specified number of backups
be cataloged before any backup is identified as obsolete. The default retention policy has a
redundancy of 1, which means that only one backup of a file must exist at any given time. A
backup is deemed obsolete when a more recent version of the same files has been backed up.
Disk limit is
reached and a
Flash new file needs Files that are
Database file Recovery to be written no longer
backup Area into the Flash required on disk
1 Recovery Area are deleted
2
3 Space pressure
Warning issued
to user
RMAN updates 1
list of files that 2
may be deleted Backup files
to be deleted
Backup Destinations
Backups can be written to a designated disk directory, a Media Management Library, or the
Flash Recovery Area. Specifying a disk directory or the Flash Recovery Area means that
backups go to hard-disk media. Typically, they are regularly moved offline to tape via the
media management interface in order to maintain disk space availability. Any disk directory
can be specified as the destination of a backup provided that it already exists.
If you configure a Flash Recovery Area, many backup and recovery tasks are simplified for
you. The Oracle Database server automatically names files for you, and deletes obsolete files
when there is space pressure.
Datafile Datafile
2 2
Datafile Datafile
3 3
Tablespace Backup
HR_DATA set
• BACKUP COPIES
• SET BACKUP COPIES
• CONFIGURE ... BACKUP COPIES
RMAN does not produce multiple backup sets, but produces identical copies of each backup
piece in the set. You cannot use this option with the BACKUP AS COPY command to create
multiple image copies.
If you specify REUSE, you enable RMAN to overwrite an already existing backup set or
image copy with the same file name as the file that BACKUP is currently creating.
The PROXY copy functionality backs up the specified files by giving the media management
You can also create a backup (either a backup set or image copies) of previous image copies of
all datafiles and control files in the database by using the following command:
RMAN> BACKUP COPY OF DATABASE;
By default, RMAN executes each BACKUP command serially. However, you can parallelize
the copy operation by:
• Using the CONFIGURE DEVICE TYPE DISK PARALLELISM n command, where n is
the desired degree of parallelism
• Allocating multiple channels
• Specifying one BACKUP AS COPY command and listing multiple files
Oracle Database 10g: Backup and Recovery 3 - 16
RMAN Backup Types
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
• Differential: Is the default type of incremental backup that backs up all blocks changed
after the most recent incremental backup at either level 1 or level 0
• Cumulative: Backs up all blocks changed after the most recent backup at level 0
Examples
• To perform an incremental backup at level 0, use the following command:
RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;
• To perform a differential incremental backup, use the following command:
RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;
• To perform a cumulative incremental backup, use the following command:
List of changed
1011001010110 Change
blocks
CTWR 0001110100101 tracking
Redo 1010101110011 file
generation
SGA Redo log
QQ, where:
• IIIIIIIIII stands for the DBID
• YYYYMMDD is a time stamp of the day the backup is generated
• QQ is the hex sequence that starts with 00 and has a maximum of FF
You can change the default format by using the CONFIGURE CONTROLFILE AUTOBACKUP
FORMAT FOR DEVICE TYPE type TO 'string' command. The value of string must
contain the substitution variable %F and cannot contain other substitution variables. For
example:
Server
Recovery session
Manager (channel)
Media
management
library
the media manager to restore backups. Check with your media vendor to determine whether it
is a member of the Oracle BSP.
Before you can begin using RMAN with a media manager, you must install the media
manager software and make sure that RMAN can communicate with it. Instructions for this
procedure should be available in the media manager vendor’s software documentation.
Depending on the product that you are installing, perform the following basic steps:
1. Install and configure the media management software on the target host or production
network. No RMAN integration is required at this stage.
reports of files that are obsolete according to different retention policies by using
REDUNDANCY or RECOVERY WINDOW retention policy options with the REPORT
OBSOLETE command.
Refer to the Oracle Database Backup and Recovery Reference for detailed syntax information.
Archived
log Archived
log Online
Redo log
Changes applied
Database
2 opened Undo applied
1 3 6
Restored Datafiles containing
datafiles committed and Recovered
uncommitted datafiles
transactions
Image copy
of datafile Incrementally updated
backup
Server Server
parameter file parameter file
{
RESTORE SPFILE TO PFILE '?/oradata/test/initorcl.ora' FROM
AUTOBACKUP;
SHUTDOWN ABORT;
}
6. Edit the restored initialization parameter file to change any location-specific parameters,
such as those ending in _DEST, to reflect the new directory structure.
7. Start the instance in NOMOUNT mode using your edited text initialization parameter file.
RMAN> STARTUP NOMOUNT
Recovery
Manager
(RMAN)
Server
parameter
file Database
Restoring the Server Parameter File from the Control File Autobackup
If you have lost the server parameter file, you can restore it from the autobackup. The procedure
is similar to restoring the control file from autobackup. Set the DBID for your database and then
issue the RESTORE SPFILE FROM AUTOBACKUP command.
If you are restoring the SPFILE to a nondefault location, specify the command as follows:
RESTORE SPFILE TO <file_name> FROM AUTOBACKUP
If you are restoring the server parameter file from the flash recovery area, specify the command
as follows:
RMAN> run {
2> restore spfile from autobackup
3> recovery area = '<flash recovery area destination>'
4> db_name = '<db_name>';
5> }
Recovery
Manager
(RMAN) Flash Recovery
Area
Basic procedure:
• Restore an autobackup of the server parameter file.
• Start the target database instance.
• Restore the control file from autobackup.
• Mount the database.
RECYCLEBIN = ON
BIN$zbjrBdpw==$0 EMPLOYEES
BIN$zbjra9wy==$0 EMPLOYEES_PK
Recycle
bin
USER_OBJECTS
Objects are:
– Renamed
– Not moved
Recycle bin
BIN$zbjrBdpw==$0
BIN$zbjra9wy==$0 BIN$zbjrBdpw==$0
DBA_FREE_SPACE - RECYCLEBIN 1
Autoextend 3
PURGE [USER_|DBA_]RECYCLEBIN
USER_OBJECTS
DROPPED TABLE_NAME
NO SALES
Recycle
YES BIN$zbjrBdpw==$0 EMPLOYEES bin
SELECT ...
FROM "BIN$zbjrBdpw==$0"
WHERE ...
• Flashback Query
– Query all data at a specified point in time.
• Flashback Versions Query
– See all versions of a row between two times.
– See the transactions that changed the row.
Tx3
Tx2
Flashback
Tx1
200
FLASHBACK_TRANSACTION_QUERY
DBA
User
Flashback Table
With Flashback Table, you can recover a table or tables to a specific point in time without
restoring a backup. When you use this feature, the data in tables and their associated objects
(indexes, constraints, triggers, and so on) is restored. The data used to satisfy a Flashback
Table request is retrieved from the undo tablespace.
You can use Flashback Versions Query and Flashback Transaction Query to determine the
appropriate flashback time.
Flashback Table provides a way for users to easily and quickly recover from accidental
modifications without a database administrator’s involvement. You must grant the
FLASHBACK TABLE or FLASHBACK ANY TABLE system privilege to any user that uses the
Flashback Table feature. In addition, you must grant the SELECT, INSERT, DELETE, and
ALTER object privileges to the user.
You can use Enterprise Manager to flash back a table. The wizard guides you through the
process.
Note: Enabling row movement is described on the next page.
SGA
Redo log
Flashback buffer
buffer
Buffer cache
LGWR
Every
change
Log block
3 FROM v$flashback_database_stat;
Archived
redo log files
Auxiliary instance
Target database
File created.
SQL> startup nomount pfile='$HOME/auxinstance/initAUX.ora'
ORACLE instance started.
Ensuring That Backups and Archived Redo Log Files Are Available
The backups needed to restore the datafiles must be accessible on the duplicate host. You do not
need a whole database backup. RMAN can use a combination of full and incremental backups of
individual datafiles during the duplication process.
Archived redo logs required to recover the duplicate database to the desired point in time must
also be accessible. The archived redo log files can be backups, image copies, or the actual
archived redo logs. The backups or copies can be transferred to the local disk of the duplicate
database node or mounted across a network by some means such as NFS.
Option Purpose
Recovery
RMAN
Restore
Datafile
Restore backups
Recover
1 Archived
redo log files Recovered tablespace
Target database
2
RMAN
5
Import metadata
Auxiliary instance
Target database
4 3
Export
Point to recovered tablespace metadata
catalog, or if the information is not found in the recovery catalog, RMAN proceeds assuming
that the set of tablespaces with undo segments at the target time is the same as the set of
tablespaces with undo segments at the present time. If this assumption is not correct, the TSPITR
operation fails and an error is reported. To prevent this from happening, provide a list of
tablespaces with undo segments at the target time in the UNDO TABLESPACE clause.
Restarting manual auxiliary instance after TSPITR failure: If you are managing your own
auxiliary instance and there is a failure in TSPITR, then before you can retry TSPITR, you must
shut down the auxiliary instance, correct the problem, and put the auxiliary instance back in
Practice Overview
Recovery
Manager
(RMAN)
• Executing a script:
RUN { EXECUTE SCRIPT
script_name
; }
• Displaying a script:
• Updating a script:
• Deleting a script:
UPGRADE CATALOG;
DROP CATALOG;
then back up the desired object. For example, enter the following in session 1:
RUN
{
ALLOCATE CHANNEL c1 TYPE sbt;
SET COMMAND ID TO 'sess1';
BACKUP DATABASE;
}
Set the command ID to a string such as sess2 in the job running in session 2:
If you run the SET COMMAND ID command in the RMAN job, then the CLIENT_INFO
column displays in the following format:
id=command_id,rman channel=channel_id
For example, the following shows a sample output:
for restores, the number of blocks that have been processed to the files that are being
restored in this one job step; and for proxy copies, the number of files that have been
copied
• TOTALWORK: For image copies, the total number of blocks in the file; for backup input
rows, the total number of blocks to be read from all files that are processed in this job
step; for backup output rows, the value is 0 because RMAN does not know how many
blocks that it will write into any backup piece; for restores, the total number of blocks in
all files restored in this job step; and for proxy copies, the total number of files to be
Tuning RMAN
RMAN backup and restore operations perform the following distinct tasks:
• Reading or writing input data
• Processing data by validating and copying blocks from the input to the output buffers
The slowest of these tasks is called a bottleneck. RMAN tuning involves identifying the
bottleneck (or bottlenecks) and attempting to make it more efficient by using RMAN
commands, initialization parameter settings, or adjustments to the physical media. The key to
tuning RMAN is understanding I/O. The backup and restore jobs of RMAN use two types of
I/O buffers: disk and tertiary storage (usually tape). When performing a backup, RMAN reads
input files by using disk buffers and writes the output backup file by using either the disk or
the tape buffer. When performing restores, RMAN reverses these roles. I/O can be
synchronous and asynchronous. Synchronous devices perform only one I/O task at a time.
Therefore, you can easily determine how much time the backup jobs require. In contrast to
synchronous I/O (SIO), asynchronous I/O (AIO) can perform more than one task at a time. To
tune RMAN effectively, you must thoroughly understand the concepts of synchronous and
asynchronous I/O, disk and tape buffers, and channel architecture. With an understanding of
these concepts, you can use fixed views to monitor bottlenecks.
Less than or equal to 4 1 MB buffers are allocated so that the total buffer
size for all the input files is 16 MB.
Greater than 8 RMAN allocates four 128 KB disk buffers for each
file, so that the total size is 512 KB for each file.
RMAN Multiplexing
RMAN uses two different types of buffers for I/O: disk and tape. RMAN multiplexing
determines how RMAN allocates disk buffers. RMAN multiplexing is the number of files in a
backup read simultaneously and then written to the same backup piece. The degree of
multiplexing depends on the FILESPERSET parameter of the BACKUP command as well as
the MAXOPENFILES parameter of the CONFIGURE CHANNEL or ALLOCATE CHANNEL
commands.
For example, assume that you back up two data files with one channel. You set
FILESPERSET to 3 and set MAXOPENFILES to 8. In this case, the number of files in each
backup set is 2 (the lesser of FILESPERSET and the files read by each channel) and the level
of multiplexing is 2 (the lesser of MAXOPENFILES and the number of files in each backup
set). When RMAN backs up from disk, it uses the algorithm that is described in the table
shown in the slide.
Note: For best recovery performance, do not set FILESPERSET to a value greater than 8.
1 MB 1 MB
1 MB 1 MB
1 MB 1 MB
1 MB 1 MB
1 MB 1 MB
Synchronous I/O
Asynchronous I/O
Channel Tuning
You can set various channel limit parameters that apply to operations that are performed by
the allocated server session in the CONFIGURE CHANNEL and ALLOCATE CHANNEL
commands.
The MAXPIECESIZE parameter specifies the maximum size of a backup piece. Use this
parameter to make RMAN create multiple backup pieces in a backup set. RMAN creates each
backup piece with a size that is no larger than the value that has been specified in the
parameter.
The RATE parameter specifies the bytes per second that RMAN reads on the channel. This
parameter is useful in preventing RMAN from consuming excessive disk bandwidth and
degrading OLTP performance. For example, if each disk drive delivers 3 MB per second and
you set RATE=1500K, some disk bandwidth will still be available to the online system.
The MAXOPENFILES parameter determines the maximum number of input files that a backup
or copy can have open at a given time. If not set manually, then the value defaults to 8. The
level of RMAN multiplexing is partially determined by MAXOPENFILES. The level of
multiplexing in turn determines how RMAN allocates disk buffers. Multiplexing is the number
of input files that are simultaneously read and then written into the same backup piece.
Setting LARGE_POOL_SIZE
The requests for contiguous memory allocations from the shared pool are small, usually under
5 KB in size. It is possible that a request for a large contiguous memory allocation can fail or
require significant memory housekeeping to release the required amount of contiguous
memory. The large pool may be able to satisfy the memory request. The large pool does not
have a least recently used list, so Oracle does not attempt to age memory out of the large pool.
Use the LARGE_POOL_SIZE initialization parameter to configure the large pool. Query
V$SGASTAT.POOL to see in which pool (shared pool or large pool) the memory for an object
resides. The suggested value for LARGE_POOL_SIZE is calculated as:
#_of_allocated_channels * (16 MB + (4*size_of_tape_buffer ))
For backups to disk, the tape buffer is obviously 0, so set LARGE_POOL_SIZE to 16 MB. For
tape backups, the size of a single tape buffer is defined by the RMAN channel parameter
BLKSIZE, which defaults to 256 KB. Assume a case in which you are backing up to two tape
drives. If the tape buffer size is 256 KB, then set LARGE_POOL_SIZE to 18 MB. If you
increase BLKSIZE to 512 KB, then increase LARGE_POOL_SIZE to 20 MB.
Note: The large pool is used only for disk buffers when DBWR_IO_SLAVES > 0 and for tape
buffers when BACKUP_TAPE_IO_SLAVES = TRUE. If you are using Automatic Shared
Memory Management, the large pool is sized automatically in response to system workload.
blocks from datafiles to tape, so that any bottleneck on writing to tape has less impact on
your overall backup strategy. In particular, if tape drives are not locally attached to the
node running the database being backed up, then incremental backups can be faster.
Practice Overview
Tape
Oracle Secure Backup: Tape Management and Integration with Oracle Products
Some of the many options available for protecting your Oracle data are backing up solely to disk,
backing up to disk as a staging area for tape backups, or backing up directly to tape. Disk backup and
restore operations are generally faster than the equivalent tape operations. However, tape backups
provide some advantages for long-term backup requirements, such as offsite storage and portability,
which allow you to move backups from one data center to another.
Oracle Secure Backup provides tape backup management for all your files relating to Oracle
products, including:
• Oracle database backups stored on tape through integration with Recovery Manager
• Seamless support of Oracle Real Application Clusters (RAC)
• Support for Oracle Cluster File System (OCFS) and Automatic Storage Management (ASM)
• Central administration of distributed clients and media servers including:
- Oracle Application Servers
- Oracle Collaboration Suite
- Oracle Home and binaries
• Administrative server
Administrative – Maintains
server configuration
Oracle Secure settings and backup
Backup catalog history catalog
N
E • Media server
UNIX or
NAS Windows
Linux
Heterogeneous
clients backed up
Oracle Secure Backup over the network
administrative server LAN
LAN
Administrative
server
Fibre
Oracle Secure Backup: Oracle
connectivity
• Dynamically shares tape Database
drives attached to the
Storage Area Network (SAN)
• Manages any resource Tape devices
contention
EM Web tool
Oracle
Media family
Volume set
Volume Volume
Backup image
Backup does not associate a specific date with the backup piece, but updates the piece attribute
from “content manages use” to “deleted” status as instructed by RMAN. By issuing the RMAN
DELETE OBSOLETE command, RMAN deletes any disk backups no longer needed to meet the
user-configured retention policies and notifies the media management software (Oracle Secure
Backup) about which pieces can be deleted. The expiration status is updated in the Oracle
Secure Backup catalog, but the actual pieces are not deleted from tape. Instead, the backup
pieces receive the “deleted” attribute. After all backup pieces on a specific tape have a
“deleted” attribute, Oracle Secure Backup considers the tape eligible for reuse, and overwrites
the tape, when a tape is needed.
mainlib
Tape library Tape library Barcode reader
robotics move scans labels on
Robotic control
tapes between ____________
cartridges.
drives and slots. ____________
____________ maintd1
____________
____________
for the device so that only one host is permitted access to it at any time. For example, SAN-attached
devices often have multiple attachments, one for each host that has local access to the device through
its Fibre channel interface.
Log
Job
Backup
ID
Restore
Transcript
Job
summaries
Encryption
File-system backups on tape are not encrypted by Oracle Secure Backup. When you use Oracle
Secure Backup to create a new file-system backup, Oracle Secure Backup applies encryption to the
data as it passes over the network. After Oracle Secure Backup writes the data to tape, the file system
data resides in unencrypted form.
When you use RMAN to make an encrypted backup of a database, RMAN encrypts the backup data
before it is provided to the SBT interface. If the data is transmitted over the network, Oracle Secure
Backup transfers the RMAN-encrypted data without applying additional encryption to the data as it
OTN CD-ROM
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
Welcome to installob, Oracle Secure Backup's UNIX installation
program.
- - - - - - - - - - - - - - - -
Oracle Secure
Backup
Enterprise Manager
interface
web_home_page.gif
Devices lsdev
accept a login from this user using the username and password you have supplied. This is not
required for normal Oracle Secure Backup operation and is typically set to “no.”
11. Enter the e-mail address for the user in the Email address field. When Oracle Secure Backup
wants to communicate with this user, such as to deliver a summary report or notify the user of a
pending input request, it does so by sending an e-mail to this address.
12. Choose one of the following:
- Click Apply to add the user account and remain in this page.
- Click OK to add the user account and return to the Users page. The user account appears in
the User Name box on the Users page. A message appears in the Status box informing you
Preauthorizing Access
To provide preauthorized access, you can modify parameters for an existing user account:
1. From the Users page, select the name of the user from the User Name box.
2. Click the Edit button. A page appears with details for the user you selected.
3. Make any required changes. To modify users, you need to be a member of a class that has this
right enabled.
4. Choose one of the following:
- Click Apply to remain in this page.
- Click OK to save the changes and return to the Users page.
- Click Cancel to avoid the operation and move back one page.
• If your Oracle Secure Backup user needs to initiate backup and restore operations on Windows
clients, then you need to add Windows Domains information.
• To configure RMAN and/or command-line preauthorization, click Preauthorized Access and
specify the appropriate attributes. The combination of Hosts, OS username, and Windows
domain name must be unique.
Note: For more information about the Oracle Secure Backup user, see the lesson titled “Managing
Oracle Secure Backup Security.”
5
RMAN 1
4
2
3
Oracle Secure Backup Data being Media server
Client: backed up
Database server
Database
name
Wait time Database ID
Database
Restricted
devices Media family
Content
following:
- archivelog: Backs up or restores database archived redo logs
- full: Backs up or restores the database files, regardless of when they were last
backed up. This option is the same as a level 0 backup.
- incremental: Backs up or restores only data that has been modified since the last
backup, regardless of the backup level
- autobackup: Backs up or restores control files
- * : Represents all content types
• The names of devices to which backups controlled by this storage selector are restricted.
Enterprise
Manager
Backup Settings
In Enterprise Manager, you must configure “Tape Drives” (in this screenshot set to 1) and you
must configure a database backup storage selector. Optional, but recommended: You should test
your tape drive.
to the DELETED status. If the backup is stored on tape and managed by Oracle Secure Backup,
the Oracle Secure Backup catalog is also updated to indicate that the backup pieces are deleted.
You can create a job using the Delete All Expired function to remove expired records. First, use
the Crosscheck All function to determine whether backups recorded in the repository still exist
on disk or tape. If Enterprise Manager cannot locate the backups, then it updates their records to
the EXPIRED status. Then, you can use the Delete All Expired function to remove the records.
Up to nine levels
Backup level 0 1 2 3 2 3
Create datasets.
File-System Backups
Assuming that you have already configured your administrative domain, you perform the following
steps when using Oracle Secure Backup to create file-system file backups:
1. Log in as a UNIX, Linux, or Windows operating system user that has access to the files to be
backed up, and log in to Oracle Secure Backup with backup privileges.
2. Configure media families to help manage the volumes created by the backup operation, if you
have not done so already.
3. Create a dataset description file that identifies the hosts and files you want to back up.
For scheduled backups, perform the following additional steps:
• Create at least one backup window, if you need to restrict the hours in which backups can be
performed. If there are no restrictions, then you can use the default backup window.
• Create a schedule for your backup job and add at least one trigger to this schedule.
For on-demand backups, perform the following additional steps:
• Create one or more backup requests.
• Send your backup requests to the scheduler. Doing so turns each backup request into a backup
job, making it eligible to run.
When you terminate your Oracle Secure Backup session, any backup requests that have not been
submitted, are lost.
files to back up
home
• Examples
# Dataset "common-exclusions":
exclude name tmp
exclude name *.tmp
exclude name *.temp
exclude name *.backup
starting with tmp, *.tmp, *.temp, *.backup, and *.junk only for /home/usr4.
When Oracle Secure Backup starts backing up data in /home/usr3 on stc3, it executes the
/etc/local/nfy executable. The same executable is also executed when Oracle Secure Backup
finishes its backup of /home/usr3.
When performing a normal (nondatabase) backup, you may want to skip files that would be included
in a database backup. Examples of such files include the database files themselves, control files, redo
logs, and flashback logs. To exclude these files, specify the exclude oracle files directive
in your dataset.
Creating Datasets
Using the Web Tool Interface
You can use the Oracle Secure Backup Web tool to create a dataset:
1. From the Home page, click the Backup tab in the menu bar.
2. On the Backup menu, click Datasets in the submenu under Settings. The Datasets page appears.
Dataset directories appear in the Path box with a slash as the last character in the name.
3. Click the Add button to create a new dataset. When you create a new dataset description, the
initial contents of the dataset are defined by a dataset template.
4. Select File or Directory from the Dataset type list. Like Windows and UNIX file systems, Oracle
Secure Backup’s datasets are organized in a naming tree. You may optionally create dataset
directories to help you organize your data definitions. Later, you will discover that when you
want Oracle Secure Backup to back up data, you identify the name of the dataset description
defining the data. If you give the name of a dataset directory, it is equivalent to naming all the
dataset description files contained within that directory tree. Dataset directories may be nested
up to 10 levels deep. By default, a dataset file is created under the
<OSB_Home>/admin/config/dataset/NEW_CLIENTS directory.
4. Select a local time range (expressed in 24-hour format) from the Time range field. Oracle Secure
Backup will start scheduled backups during this time range. A time range is an interval specified
as <start time>-<end time>, where the start and end times are in the form
hour:minute:second. You can also use a four-digit hour-minute specifier (for example,
1430, which indicates 2:30 p.m.). The time range is based on the local time and takes into
account Daylight Savings Time, if it applies to your locale. If the end time precedes the start
time, Oracle Secure Backup assumes that the end time refers to the following day. For example,
20:00–02:00 indicates 8:00 p.m. as the start time and 02:00 a.m. of the next day as the end time.
5. Select one of the following:
- Select daily: To trigger the schedule to run on all seven days of the week
- Select weekdays: To trigger the backup to run on weekdays only (Monday through
Friday)
- Select weekends: To trigger the backup to run only on weekends (Saturday and Sunday)
- Alternatively, from both the “Select weekdays” and “Select weekends” fields, you can
select a mix of individual days on which you can trigger scheduled backups to run. For
example, Monday, Tuesday, and Saturday at 8:00 a.m.
8. Optionally, select an option from the “Week in month” group. This option enables you to
limit which week in the month the backup schedule will run. Your choice are:
Reviewing Jobs
On the Manage: Jobs page in the Web tool, you can view a list of jobs according to your selection
criteria. For more details, click a job (it is highlighted), then click Show Properties or Show
Transcript.
18. Select the “NDMP incremental restore” check box to direct certain NAS data servers to apply
incremental restore rules. Normally, recoveries are additive: each file and directory restored
from a full or an incremental backup is added to its destination directory. When you select
NDMP incremental restore, NAS data servers that implement this feature restore each directory
to its exact state as of the last incremental backup image applied during the restore job. Files
that were deleted before the last incremental backup are deleted by the NAS data service upon
restore of that incremental backup.
19. Select “Replace existing files” to overwrite any existing files with those restored from the
backup image. Alternatively, select “Keep existing files” to keep any existing files instead of
Practice Overview
Class Class
- Notdenied: Users can browse any directory for which they are not explicitly denied
access. This option differs from permitted in that it allows access to a directory
having no stat record stored in the catalog.
- Permitted: Users can browse a directory to which, based on operating system file
ownership and protection, they have read rights.
- Named: Users can browse a directory if the UNIX user defined in the Oracle Secure
Backup identity is listed as the owner of the directory or the UNIX group defined in
the Oracle Secure Backup identity matches the group of the directory. If the UNIX
• Receive e-mail requesting operator assistance allows the class member to receive e-
mail messages when Oracle Secure Backup needs manual intervention. Occasionally,
during backups and recoveries, operator assistance may be required—for example, if a
new tape is required to continue a backup. In such cases, e-mails are sent to all users who
belong to classes having this attribute.
• Receive e-mail describing internal errors enables the class member to receive e-mail
messages describing errors that occurred in any Oracle Secure Backup activity.
• Query and display information about devices allows the class member to query the
Preauthorization Class
user information privileges
Oracle
Windows domain
E-mail address account & password
NDMP access
authorization
% obtool
Oracle Secure Backup 10.1
login: osbuser1 osbuser1 can only back
up and restore data
accessible to
UNIX name: jdoe
UNIX group: sysadmin
Oracle Secure Backup admin user, which is typically root on UNIX-like systems or
LocalSystem on Windows systems.
• If you perform an on-demand backup, the OS namespace associated with the Oracle
Secure Backup user of the current session is used, unless you specify the backup should
run as a privileged operation. A backup that runs in privileged mode runs under the root
operating system identity. On Windows systems, the backup runs under the same account
as the Oracle Secure Backup service on the Windows client. Backup and restore requests
submitted through the RMAN interface are treated as on-demand jobs.
Preauthorization
You can preauthorize Oracle Secure Backup users for the use of obtool, RMAN or both.
Using the example from the previous slide, the jdoe OS user can be preauthorized to use
Oracle Secure Backup as the osbuser1 Oracle Secure Backup user, without having to
supply an Oracle Secure Backup username or password. Preauthorization for file system
backups is primarily used to avoid login to Oracle Secure Backup when running custom
scripts. Without preauthorization, the script would fail because access to Oracle Secure
Backup would not be granted without user login.
While obtool preauthorization is optional, RMAN preauthorization is required to
successfully back up or restore the Oracle database. Oracle database backups are evoked from
RMAN or Enterprise Manager which then communicates with Oracle Secure Backup.
Because access to Oracle Secure Backup requires login as an authorized Oracle Secure Backup
user, the communication attempt will fail unless the Oracle Secure Backup user has been
preauthorized to perform RMAN backup and restore on that host.
• Confirm a match using OS user identity of the Oracle instance associated with the
database (which is usually "oracle")
• User assigned to a class with rights to back up and/or restore Oracle database
If these three criteria have not been successfully met, Oracle Secure Backup will not perform
the RMAN backup or restore requests.
Authentication
For hosts to securely exchange control messages and backup data within the domain, they
must first authenticate themselves to one another. Host connections are always two-way
authenticated with the exception of the initial host invitation to join a domain and
communication with NDMP servers.
In two-way authentication, the hosts participate in a handshake process whereby they mutually
decide on a cipher suite to use, exchange identity certificates, and validate that each other’s
certificate has been issued by a trusted certificate authority (CA). At the end of this process, a
secure and trusted communication channel is established for the exchange of data.
The use of identity certificates and SSL prevents outside attackers from impersonating a client
in the administrative domain and accessing backup data. For example, an outside attacker
would not be able to run an application on a nondomain host that sends messages to domain
hosts that claim origin from a host within the domain.
Note: Currently, the NDMP protocol does not include a mechanism to accommodate the
negotiation of an SSL connection to NDMP filers.
Identity
certificate
from tape.
Oracle Wallets
When you add hosts to the administrative domain, Oracle Secure Backup creates the wallet,
keys, and certificates for each host. No additional intervention or configuration is required. All
required wallet functionality is embedded in Oracle Secure Backup, thereby eliminating the
need for other wallet utilities.
Every host in the domain, including the administrative server, has a private key known only to
that host that is stored with the host’s identity certificate. This private key corresponds to a
public key that is made available to other hosts in the administrative domain. Any host in the
domain can use a public key to send an encrypted message to another host, but only the host
with the corresponding private key can decrypt the message. Oracle Wallets are encrypted
containers designed to store X.509 certificates. Unlike the database encryption key wallet, the
Oracle Secure Backup wallet does not store encryption keys for data.
Oracle Secure Backup does not share its wallets with other Oracle products.
Besides maintaining its password-protected wallet, each host in the domain maintains an
obfuscated wallet. This version of the wallet does not require a password. The obfuscated
wallet, which is scrambled but not encrypted, enables the Oracle Secure Backup software to
run without requiring a password during system startup.
Media Serv.
- Devices
- Libraries
Volumes
Jobs
obhttpd obndmpd
obixd obproxyd
obproxyd
Media Serv.
- Devices
- Libraries
Volumes
Oracle Secure Backup provides customizable Jobs
administrative policies to easily manage simple
or complex environments:
• Policy settings for devices, catalog indexing, log
management, and general backup and recovery
1
3
Media Serv.
- Devices
- Libraries
Volumes
Jobs
/usr/local/oracle/backup
<OSB_Home> directory
• config • conf
• history • htdocs lib tools.linux32 man
• log • images
• state • logs
• modules .drv.linux32 samples
Administrative server
Media Serv.
- Devices
- Libraries
Volumes
Jobs
Adding Client
Adding Clients may be your most common management task:
1. In the Oracle Secure Backup Web tool, click Configure, and then click Hosts.
2. Select the “Suppress communication with host” check box if you want to add a (stand-
alone) machine to the administrative domain.
3. Click the Add button. Then enter a host name of your choice in the Host field. The name
must be unique among all Oracle Secure Backup host names.
4. Optionally, enter one IP interface name in the “IP Interface name(s)” field. If you leave
this blank, Oracle Secure Backup uses the name of the host (step 3) as the resolvable IP
name for the host.
5. Select a status from the Status field. Your choices are:
- In service: Indicates that the machine is logically available for backup and restores
- Not in service: Indicates that the machine is unavailable
6. Select one or more administrative domain roles for the host from the Roles field.
7. Select an access method for the host (if applicable) from the “Access method” field. Your
choices are: ob or NDMP.
Media Serv.
> - Devices
- Libraries
Volumes
• Communicate via NDMP Jobs
• Do not require installation of Oracle Secure
Backup software on NAS appliance
• Support local data transfer (from file server directly to
and from tape drives) with simultaneous central
NAS Devices
The Network Data Management Protocol (NDMP) defines a common architecture for backups
of heterogeneous file servers on a network. NDMP allows administrators to back up data using
any combination of compliant network–attached servers, backup devices, and management
applications. With NDMP, network congestion is minimized because the data path and control
path are separated. Backups can occur locally—from file servers directly to tape drives—
whereas management occurs centrally.
NDMP is commonly used by NAS devices, which are also known as filers, to perform backup
and restore operations without requiring an Oracle Secure Backup installation on the
appliance. The filer communicates with the backup software through NDMP. This model is
very different from the classical backup model, which requires the installation of an agent or
backup software component on each host to communicate and perform backup and restore
operations as directed by the backup software server.
For supported NAS devices, see Certify on MetaLink.
Adding Devices
You can add new devices in one of two ways:
• By automatically discovering them. Oracle Secure Backup can automatically discover and
configure secondary storage devices connected to certain types of NDMP servers, such as
Network Appliance filers.
• By adding them manually to define devices that cannot be automatically discovered
On the Device page, click either Add Library or Add Drive to add a new device to your
configuration.
You can also use the obtool command mkdev to add an Oracle Secure Backup device
object to your administrative domain configuration. Here are some examples:
ob> mkdev --type library --attach hasun20:/dev/obl0 tc-lib
ob> mkdev --type tape --library tc-lib --dte 1 --attach hasun20:/dev/obt0
tc-tape
ob> lsdev
The following output displays:
library tc-lib in service
drive 1 tc-tape in service
The second example is doing the same thing for a tape drive that is part of your tape library. In
addition to the type, attachment, and name, you need to specify the corresponding tape library
as well as the tape drive’s data transfer element (DTE). Oracle Secure Backup identifies each
tape drive within a tape library by its DTE number. A DTE must be specified if library is
specified.
The third example shows you the output of the lsdev command, which shows you the
current configuration for both devices.
Unlike SCSI, which is a host-centric protocol, Fibre Channel libraries and tape drives are
typically shared among multiple Oracle Secure Backup media servers. A Fibre Channel–
Managing Devices
From the EM Administrative Server page, you can click the link corresponding to the Devices
number.
This takes you to the Devices page from where you have the options to Add Library and Add
Drive. You can also select an existing device, and Edit or Remove that device.
A tape has to be mounted in the drive before you can write to it. “Mounting a volume” means
logically preparing a tape volume in a drive to be read or written.
Note: Unlike tape devices, Oracle Secure Backup will refuse to communicate with a tape
library that it does not recognize (a tape library whose product ID does not appear in the
<OSB_Home>/devices/ob_robots file). Too many things may go wrong when trying
to control an unknown tape library.
Media Serv.
- Devices
> - Libraries
Volumes
Jobs
Em_devices_crop.gif
Media Serv.
- Devices
- Libraries
> Volumes
Jobs
Managing Volumes
You can access the Volumes page from the EM Administrative Server page by clicking the
Details link to the right of the Volumes label in the Resources section. You can use the
Volumes page to display a list of all volumes associated with an administrative server.
To display the volumes, you have to first specify a filter option. You do so by using the Search
section. In the example in the slide, the filter option limits the volumes displayed to only those
for the RMAN-DEFAULT media family. If you want a listing of all volumes, then choose the
All search option, and then click Go.
The Results table identifies the Volume ID and other important information related to your
volumes. You can view all the backup sections in a selected volume by choosing Backup
Sections.
Note: For more information about how to manage volumes within Oracle Secure Backup,
refer to the Oracle Secure Backup Administrator’s Guide.
Media Serv.
- Devices
- Libraries
Volumes
• Oracle Secure Backup uses different types of > Jobs
jobs to perform backup and restore tasks:
– Dataset jobs
– Backup jobs
– Restore jobs
of the logged-in username, a slash, and a unique numerical identifier. If Oracle Secure
Backup creates multiple jobs to satisfy one restore request, it marks each job except the
first as dependent on the success of the previous job. The effect of this notation is that,
should a job fail on which a later job is dependent, that later job is also marked as
failed.
• RMAN creates an Oracle Secure Backup job with types of oracle backup or
oracle restore instead of the backup and restore type.
Oracle Secure Backup keeps a log for each job. This “job log” describes high-level events,
Managing Jobs
After your backup has been submitted to the Oracle Secure Backup scheduler, you manage
these jobs from the Oracle Secure Backup Web tool:
1. From the Manage page, click the Jobs link in the Maintenance section. You are directed to
the Jobs page.
2. To limit the jobs displayed to:
a. A specific host, select that host from the Host list
b. Those instantiated by a certain user, select that user from the User list
c. A particular dataset, select that dataset from the Dataset list
3. Select one or more of the following Viewing options:
- Active: Select this option if you want to view the status of backup jobs that are
currently in progress.
- Complete: Select this option to view the status of completed jobs, whether they
succeeded or not.
- Pending: Select this option if you want to view the statuses of jobs that are pending,
but not presently running.
- Input pending: Select this option to view the statuses of jobs that are running and
requesting input now.
lines of the transcript having a message severity level at or above the value you
selected.
8. Optionally, select the “Tail lines” option if you want to display the last N lines of the
transcript having a message severity level at or above the value you selected.
9. Optionally, select a value in the “Page refresh (in seconds)” list. The default is 60
seconds.
10. Click Apply to accept your changes, if any, and redisplay the transcript.
To view a job transcript, you must be the owner of the job or belong to a user class that has
Job Summaries
A “job summary” is a text file report that describes the backup and restore activity performed
by Oracle Secure Backup. You can use job summaries to monitor specific backup jobs, or you
can use a job summary report to monitor all backup and restore activity for a time period.
You can create a “job summary schedule,” which enables Oracle Secure Backup to generate
multiple summary reports, each covering different time periods or activities. If an e-mail
system such as sendmail is operational on the administrative server, then you can supply the
e-mail addresses for the recipients of job summary reports and the report will be sent in an e-
mail to those recipients.
It is recommended that you create at least one job summary schedule so that you receive an
automated e-mail describing your backup jobs.
Using the Web tool, in the Advanced section of the Configure page, click Job Summaries to
list the configured job summary schedules. To remove a job summary schedule, select the
schedule you want to remove, and then click Remove.
Practices
Appendix A
2) Use Enterprise Manager to verify that the Flash Recovery Area has been configured
for your database and increase the Flash Recovery Area size to 3 GB.
3) Set Preferred Credentials in Enterprise Manager.
4) Use Recovery Manager (RMAN) to connect to your target database. Make note of the
database identifier (DBID) of your database.
In this practice, you configure automatic backup of the control file. You also configure a
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in
the HR.REGIONS table.
2) At the operating system prompt, execute the lab_04_01_02_01.sh script to
simulate a failure in your database. This script deletes the EXAMPLE tablespace
datafile.
3) Use SQL*Plus to query the HR.JOBS table.
4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace
datafile.
recovery.
1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in
the HR.REGIONS table.
2) At the operating system prompt, execute the lab_04_02_02_01.sh script to
simulate a failure in your database. This script deletes the EXAMPLE tablespace
datafile.
3) Use SQL*Plus to query the HR.DEPARTMENTS table.
4) Use the RMAN SWITCH TO COPY command to recover the datafile.
V$CONTROLFILE.
2) Simulate a failure in your environment by executing the lab_04_03_02_01.sh
script to delete all your control files.
3) You need some more information about your control files. Query
V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your
control file.
4) You have lost all your control files and will need to recover them from the control file
autobackup. Use Recovery Manager to recover the control files.
3) You can also use RMAN to verify that your obsolete backups were deleted.
database.
In this practice, you use tablespace point-in-time recovery to recover from unwanted
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you create a recovery catalog in your instructor’s database and register
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
in the instructor database. The tablespaces are named RCTS01 – RCTS12. The users are
named RCUSER01 – RCUSER12.
1) Connect to the recovery catalog database (instructor’s database) with the appropriate
recovery catalog owner name (if you are using PC01, connect as RCUSER01) using
RMAN. Create the recovery catalog in your assigned tablespace. (If you are using
PC01, your assigned tablespace is RCTS01.) The service name is RCDB.
2) Using RMAN, connect to your target database and the recovery catalog database.
3) Using RMAN, execute the command to resynchronize the control file and recovery
In this practice, you monitor the progress of your RMAN backup jobs.
2) Open a second terminal window. Change to the labs directory. Invoke SQL*Plus
and connect as SYSDBA. You will use this second session to monitor a database
backup.
3) Return to your first terminal window. In your RMAN session, begin a whole database
backup.
4) Use your SQL*Plus session to monitor the progress of the whole database backup by
querying the V$SESSION_LONGOPS view. By using this view you can determine
whether the backup is progressing normally or hanging. If the backup is progressing
• View information about the configured devices and the default media family via
the obtool interface.
1) In a terminal window, navigate to the /home/oracle/labs directory and execute
the ./lab_11_02_01.sh script, to configure the vlib tape library directly attached
to your administrative server.
2) In the /home/oracle/labs directory, execute the ./lab_11_02_02.sh script, to
configure the vt tape drive for the library:
3) Start the obtool as the admin user with the oracle password, and view the
currently configured devices.
• In Enterprise Manager, create a database backup storage selector for your Oracle
database.
• In Enterprise Manager, perform a test backup to verify that the Oracle Secure
Backup configuration is correct.
Unless specified otherwise, you should log on as the oracle user to your terminal
emulator session, and as SYSDBA to your Database Control Console and SQL*Plus
sessions.
1) First, verify that the database is in ARCHIVELOG mode. If your database is in
ARCHIVELOG mode, continue with the next step. If not, shut down the database,
session, and as SYSDBA to your Database Control Console and SQL*Plus sessions.
1) In Enterprise Manager, schedule Oracle-Suggested Backup with the following
specifications:
• Backup destination: both disk and tape
• Daily backup of archivelogs and incremental backup
• Tape Drives: 1
• Schedule daily backup within 5 minutes of your current date and time
2) Review your backup job. If this is your first scheduled backup, you should see a full
Unless specified otherwise, you should log in as the SYS user (with the oracle
password) and connect as SYSDBA to Enterprise Manager Database Control. To access
the Oracle Secure Backup Web tool, use admin as username and oracle as password.
1) The administrative server maintains a catalog in which it stores metadata relating to
backup and restore operations for the administrative domain. Use the Oracle Secure
Backup Web tool to browse the Oracle Secure Backup catalog to view what you have
backed up so far.
2) View the volumes and their content.
3) View a category of jobs—for example, completed ones. Include a review of a job
When prompted for input, supply the following dataset directives, where
<hostname> is the host name of your assigned computer:
include host <hostname> {
include path /etc/obconfig
include path /usr/etc/ob/xcr
include path /usr/local/oracle/backup/admin }
3) Create a backup request for this dataset, and then submit the backup request.
To create the backup request using the following obtool command:
backup –l full –p 1 –r vt –g --dataset catback.ds
What does this command do?
4) Use the information from the message returned in the previous step to verify that the
backup completed successfully. (State should show “completed successfully”).
5) Identify the volume that contains the backup.
Practice Solutions
Appendix B
Answer:
1. Start the Web browser and enter http://your host name:1158/em.
2. Enter SYS in the User Name field and oracle in the Password field. Select
SYSDBA in the Connect As menu. Click Login.
3. Click “I agree” on the Oracle Database 10g Licensing Information page.
4. Select the Maintenance page.
5. Select Recovery Settings in the Backup/Recovery Settings section.
6. In the Media Recovery section, select “ARCHIVELOG Mode” and click Apply.
RMAN>
Make note of the database identifier (DBID) of your database.
RMAN> exit
Recovery Manager complete.
In this practice, you configure automatic backup of the control file. You also configure a
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
9. In the output log, you can see that RMAN has made a datafile copy backup of
each datafile in your database.
10. Click the Database tab to return to the Database Home page.
4) Use Enterprise Manager to view information about your backups.
Answer:
1. Select Maintenance > High Availability > Backup/Recovery > Backup Reports.
3. Use the RMAN LIST BACKUP SUMMARY command to view a listing of the
backup sets and pieces. The #Copies column shows the duplexed backup set
copies you made. Exit from RMAN.
RMAN> @sol_03_01_05_03.rmn
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces
#Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------
- ---------- ---
5 B F A DISK 21-MAR-06 1 1
NO TAG200600
7 B F A DISK 22-MAR-06 1 1
NO TAG200607
8 B F A DISK 22-MAR-06 1 2
NO TAG200603
9 B F A DISK 22-MAR-06 1 1
NO TAG200608
RMAN> **end-of-file**
RMAN> exit
Answer:
1. Select Maintenance > High Availability > Backup/Recovery > Manage Current
Backups.
2. Click Crosscheck All.
1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in
the HR.REGIONS table.
Answer:
1. Open a terminal window and log in to SQL*Plus and connect as the HR user with
HR as the password.
2. Query the HR.REGIONS table and record the number of rows.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
- Production
With the Partitioning, OLAP and Data Mining options
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
3. Exit from your SQL*Plus session.
2) At the operating system prompt, execute the lab_04_01_02_01.sh script to
simulate a failure in your database. This script deletes the EXAMPLE tablespace
datafile.
Answer:
1. At the operating system prompt, change to the labs directory and execute the
lab_04_01_02_01.sh script.
[oracle@edrsr10p1 labs]$ ./lab_04_01_02_01.sh
7. On the “Perform Object Level Recovery: Review” page, click Edit RMAN Script
to view the script that will be executed. Click Submit.
8. The Processing page is displayed. After the recovery operation completes, the
Result page is displayed indicating that the recovery operation succeeded.
5) Return to your SQL*Plus session and again attempt to query the HR.JOBS table.
Answer:
1. Query the HR.JOBS table.
SQL> select * from jobs;
19 rows selected.
recovery.
1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in
the HR.REGIONS table.
Answer:
1. Log in to SQL*Plus and connect as the HR user with HR as the password.
2. Query the HR.REGIONS table.
3. Exit from SQL*Plus.
[oracle@edrsr10p1 labs]$
3. Execute the SWITCH TO COPY command for the datafile you noted in step 3.
RMAN> switch datafile 5 to copy;
RMAN>
6. Exit from your RMAN session.
5) Query the HR.JOBS table.
Answer:
1. Log in to SQL*Plus as HR/HR and query the HR.JOBS table. (Output has been
formatted to fit the code box.)
SQL> select * from jobs;
19 rows selected.
6) Using Enterprise Manager Database Control, verify that the datafile being used for
the EXAMPLE tablespace is in the Flash Recovery Area.
Answer:
V$CONTROLFILE.
Answer:
1. Log in to SQL*Plus as SYSDBA.
2. Query the NAME column in V$CONTROLFILE. Exit from SQL*Plus.
SQL> SELECT name FROM v$controlfile;
NAME
---------------------------------------------
[oracle@edrsr10p1 labs]$
3) You need some more information about your control files. Query
V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your
control file.
Answer:
1. Log in to SQL*Plus as SYSDBA.
2. Query the V$CONTROLFILE_RECORD_SECTION view.
SQL> SELECT * FROM v$controlfile_record_section;
SELECT * FROM v$controlfile_record_section
*
ERROR at line 1:
ORA-00210: cannot open the specified control file
ORA-00202: control file:
'/u01/app/oracle/oradata/orcl/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
4) You have lost all your control files and will need to recover them from the control file
autobackup. Use Recovery Manager to recover the control files.
Answer:
1. Use SQL*Plus to shut down your instance. Exit from your SQL*Plus session.
[oracle@edrsr10p1 oracle]$ sqlplus / as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
- Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown abort
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition
Release 10.2.0.1.0 - Pn
With the Partitioning, OLAP and Data Mining options
[oracle@edrsr10p1 oracle]$
2. Use RMAN to connect to your target database.
[oracle@edrsr10p1 oracle]$ rman
RMAN>
database mounted
released channel: ORA_DISK_1
Crosschecked 5 objects
Finished implicit crosscheck copy at 28-MAR-06
database opened
9. Back up the current online redo log file and back up all the archived redo log
files.
RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
stamp=587391580
channel ORA_DISK_1: starting piece 1 at 10-APR-06
channel ORA_DISK_1: finished piece 1 at 10-APR-06
piece
handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/
2006_04_10/o1_mE
channel ORA_DISK_1: backup set complete, elapsed time:
00:00:02
Finished backup at 10-APR-06
4. Review the information on the Delete All Obsolete: Specify Job Parameters page
and click Submit Job.
database.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
- Production
With the Partitioning, OLAP and Data Mining options
Database altered.
remember a significant change so that you can quickly recover to that point in time
without having to record an SCN or time.
1) You must enable row movement to use restore points. Use Enterprise Manager to
enable row movement for the HR.LOCATIONS table.
Answer:
1. Navigate to the Administration page. Select Tables in the Database Objects
section.
2. Enter HR in the Schema field and LOCATIONS in the Object Name field. Click
POSTAL_CODE
------------
10934
2901
26192
M5V 2L7
01307-002
…
1730
3095
99236
80925
23 rows selected.
23 rows updated.
POSTAL_CODE
------------
11111
6. Select “Flashback to a known SCN” and paste the SCN that you copied in step 2.
Click Next.
8. Enter HR in the Schema Name field and LOCATIONS in the Table field. Click
Search.
11. Accept the default of “Cascade: Flashback the selected tables and all dependent
tables” on the Dependency Options page. Click Next.
12. On the “Perform Object Level Recovery: Review” page, confirm the information.
Click Submit.
POSTAL_CODE
------------
10934
YSW 9T2
…
99236
80925
23 rows selected.
LOCATION_ID STREET_ADDRESS
POSTAL_CODE
----------- ---------------------------------------- -----
-------
CITY STATE_PROVINCE
CO
------------------------------ ------------------------- -
-
1400 2014 Jabberwocky Rd 26192
Southlake Texas
US
1 row updated.
SQL> commit
2 /
Commit complete.
LOCATION_ID STREET_ADDRESS
POSTAL_CODE
----------- ---------------------------------------- -----
-------
1 row updated.
SQL> commit
2 /
Commit complete.
5) Use Enterprise Manager to perform Flashback Versions Query to correct the user
errors.
Answer:
1. Navigate to the Administration page.
2. Select Tables in the Database Objects section.
6. Enter “where location_id = 1400” in the “Bind the Row Value” field.
Click Next.
LOCATION_ID STREET_ADDRESS
POSTAL_CODE
----------- ---------------------------------------- -----
-------
CITY STATE_PROVINCE
CO
------------------------------ ------------------------- -
-
1400 2014 Jabberwocky Rd 26192
Southlake Texas
US
COUNT(*)
----------
10
table.
Answer:
1. Execute the lab_05_04_04_01.sql script.
SQL> @lab_05_04_04_01
SQL> truncate table hr.job_history
2 /
Table truncated.
COUNT(*)
----------
0
19. The “The database has been opened successfully” message is displayed. Click
OK.
7) Return to your SQL*Plus session. Execute the lab_05_04_07_02.sql script to
query the HR.JOB_HISTORY table again to be sure the data has been restored.
Answer:
1. Invoke SQL*Plus and log in as SYS/ORACLE as SYSDBA.
2. Execute the lab_05_04_07_02.sql script.
SQL> @lab_05_04_07_02
SQL> SELECT count(*)
2 FROM hr.job_history
3 /
COUNT(*)
----------
10
2) Use Oracle Net Manager to create an entry called AUXDB in the tnsnames.ora
file.
Answer:
1. Open a terminal window and enter netmgr at the operating system prompt.
[oracle@edrsr10p1 oracle]$ netmgr
2. The Oracle Net Manager window appears.
3. Expand Local and Service Naming.
4. Select Service Naming and click the green plus sign to create a new Net service
name.
11. Click File and Exit to exit from Oracle Net Manager.
12. You can view your updated tnsnames.ora file in the
/u01/app/oracle/product/10.2.0/db_1/network/admin
directory.
edrsr10p1.us.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = aux.oracle.com)
)
3) Create an initialization parameter file for the auxiliary instance.
Answer:
1. Create a text initialization parameter file named initAUX.ora from your server
parameter file in the $HOME/auxinstance directory.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
- Production
With the Partitioning, OLAP and Data Mining options
File created.
2. Edit the initAUX.ora initialization parameter file to make the following
changes for the auxiliary instance:
audit_file_dest='/u01/app/oracle/admin/aux/adump'
background_dump_dest='/u01/app/oracle/admin/aux/bdump
control_files='/u01/app/oracle/oradata/aux/control01.c
tl','/u01/app/oracle/oradata/aux/control02.ctl','/u01/
app/oracle/oradata/aux/control03.ctl'
db_name='aux'
user_dump_dest='/u01/app/oracle/admin/aux/udump'
Remove the lines at the beginning of the file that begin with orcl.__.
4) Start the auxiliary instance in NOMOUNT mode using the initAUX.ora file.
Answer:
1. Set the ORACLE_SID environment variable to aux.
[oracle@edrsr10p1 oracle]$ ORACLE_SID=aux
[oracle@edrsr10p1 oracle]$ echo $ORACLE_SID
aux
3. Start the instance in NOMOUNT mode using the initialization parameter file you
created in step 2.
SQL> startup nomount pfile='$HOME/auxinstance/initAUX.ora'
ORACLE instance started.
File created.
OPEN_MODE
----------
/u01/app/oracle/oradata/aux/undotbs0f
channel ORA_AUX_DISK_1: copied datafile copy of datafile
00002
output filename=/u01/app/oracle/oradata/aux/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003
input datafile copy recid=22 stamp=586270526
filename=/u01/app/oracle/flash_recf
destination for restore of datafile 00003:
/u01/app/oracle/oradata/aux/sysaux01f
channel aux1: copied datafile copy of datafile 00001
output filename=/u01/app/oracle/oradata/aux/system01.dbf
}
executing Memory Script
database opened
Finished Duplicate Db at 10-APR-06
REGION_ID REGION_NAME
---------- -------------------------
1 Europe
2 Americas
3 Asia
4 Middle East and Africa
10) Now that you have completed the test recovery by creating a duplicate database, shut
down the aux instance.
Answer:
1. Connect as SYSDBA and execute the SHUTDOWN IMMEDIATE command.
SQL> shutdown immediate
SQL>
2. Exit from SQL*Plus.
11) Change your ORACLE_SID to orcl in preparation for later practices.
Answer:
1. At the operating prompt, enter ORACLE_SID=orcl to change your
ORACLE_SID.
[oracle@edrsr10p1 oracle]$ ORACLE_SID=orcl
[oracle@edrsr10p1 oracle]$ echo $ORACLE_SID
In this practice, you use tablespace point-in-time recovery to recover from unwanted
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Answer:
1. In a terminal window, change to the labs directory and execute the
lab_07_01_01_01.sh script to export the HR schema.
. . exported "HR"."EMPLOYEES"
15.76 KB 107 rows
. . exported "HR"."JOBS"
6.609 KB 19 rows
. . exported "HR"."JOB_HISTORY"
6.585 KB 10 rows
. . exported "HR"."LOCATIONS"
7.710 KB 23 rows
. . exported "HR"."REGIONS"
5.289 KB 4 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully
Tablespace created.
SQL> REM ***** User/schema for the HR import *****
SQL> CREATE USER hrtest
2 PROFILE DEFAULT
3 IDENTIFIED BY hrtest
4 DEFAULT TABLESPACE hrtest
5 TEMPORARY TABLESPACE temp
8 ;
User created.
SQL> GRANT connect, resource
2 TO hrtest;
Grant succeeded.
. . imported "HRTEST"."JOBS"
6.609 KB 19 rows
. . imported "HRTEST"."JOB_HISTORY"
6.585 KB 10 rows
Processing object type
SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type
SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type
SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile fno=00003
name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00005
name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile fno=00002
name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00004
name=/u01/app/oracle/oradata/orcl/users01.dbf
input datafile fno=00007
name=/u01/app/oracle/oradata/orcl/hrtest01.dbf
CURRENT_SCN
-----------
4725352
6) Record the current time.
Answer:
1. Execute the date command at the operating system prompt.
[oracle@edrsr10p1 labs]$ date
Fri Apr 14 13:07:57 PDT 2006
5 rows updated.
SQL> select employee_id, last_name, salary
2 from hrtest.employees
3 where department_id = 60
4 /
whether there are any dependencies that will prevent the TSPITR operation.
Answer:
1. Execute the lab_07_01_09_01.sql script.
SQL> @lab_07_01_09_01
SQL> SELECT obj1_owner, obj1_name, obj1_type, ts1_name,
2 obj2_owner, obj2_name, obj2_type, ts2_name,
3 constraint_name, reason
4 FROM SYS.TS_PITR_CHECK
5 WHERE (TS1_NAME IN ('HRTEST')
no rows selected
“No rows selected” indicates that there are no dependencies to any tablespaces
outside of the recovery set, so you can proceed with the tablespace point-in-time
recovery.
10) You can use Enterprise Manager Database Control or RMAN command line to
perform tablespace point-in-time recovery.
Answer:
The answer presents the solution using Enterprise Manager Database Control.
If you want to use RMAN command line, refer to the course notes for detailed
information and execute the RECOVER TABLESPACE command as follows:
RECOVER TABLESPACE hrtest UNTIL SCN <scn>
AUXILIARY DESTINATION ‘/u01/app/oracle/oradata/tspitr’;
1. Invoke Enterprise Manager Database Control and log in as SYS/ORACLE as
SYSDBA.
2. Select the Maintenance page.
3. Select Perform Recovery in the Backup/Recovery section.
4. Select Tablespaces in the Object Level Recovery section. The page refreshes.
Accept the default selection “Recover to current time or a previous point-in-time.”
Click Perform Object Level Recovery.
Grant succeeded.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Table altered.
15) If you wanted to complete the tablespace point-in-time recovery for the HRTEST
tablespace now, what would you need to do?
In this practice, you create a recovery catalog in your instructor’s database and register
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
in the instructor database. The tablespaces are named RCTS01 – RCTS12. The users are
named RCUSER01 – RCUSER12.
1) Connect to the recovery catalog database (instructor’s database) with the appropriate
recovery catalog owner name (if you are using PC01, connect as RCUSER01) using
RMAN. Create the recovery catalog in your assigned tablespace. (If you are using
PC01, your assigned tablespace is RCTS01.) The service name is RCDB.
Answer: This example uses RCUSER10 as the username and password. Your
assigned username and password may differ from this example.
RMAN> exit
RMAN>
3) Using RMAN, execute the command to resynchronize the control file and recovery
catalog. What happens? Why?
RMAN-00571:
==========================================================
=
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
===============
RMAN-00571:
==========================================================
=
Review the information on the Add Recovery Catalog: Review page and click
Finish.
The Processing: Configure Catalog page is displayed. After processing completes,
you are returned to the Recovery Catalog Settings page. Select Use Recovery
Catalog and click OK.
RMAN>
7) In preparation for later practices, use RMAN to unregister your database from the
recovery catalog.
In this practice, you monitor the progress of your RMAN backup jobs.
RMAN>
backup.
3) Return to your first terminal window. In your RMAN session, begin a whole database
backup.
Answer:
1. Execute the RMAN BACKUP DATABASE command.
RMAN> backup database;
4) Use your SQL*Plus session to monitor the progress of the whole database backup by
querying the V$SESSION_LONGOPS view. By using this view you can determine
whether the backup is progressing normally or hanging. If the backup is progressing
normally, the TIME_REMAINING column should be decreasing. Execute the
lab_09_01_04_01.sql script to query V$SESSION_LONGOPS.
Answer:
1. Execute the lab_09_01_04_01.sql script.
SQL> @lab_09_01_04_01
SQL> SELECT sid,start_time,elapsed_seconds, time_remaining
2 FROM v$session_longops
3 /
SID START_TIM ELAPSED_SECONDS TIME_REMAINING
---------- --------- --------------- --------------
131 17-APR-06 0
2. Execute the lab_09_01_04_01.sql script again. You should notice that the
value in the TIME_REMAINING column is decreasing.
SQL> /
SID START_TIM ELAPSED_SECONDS TIME_REMAINING
---------- --------- --------------- --------------
131 17-APR-06 0
133 17-APR-06 17 46
133 17-APR-06 17
2) Continue as the root user. Start the installation of Oracle Secure Backup from the
staging directory. Begin with the setup program.
Answer:
Note: The output has been slightly formatted to reduce the number of space lines.
[root@edrsr4p1 backup]# /stage/osb/osb_10_1cdrom/setup
Welcome to Oracle's setup program for Oracle Secure
Backup. This program loads Oracle Secure Backup software
from the CD-ROM to a filesystem directory of your
choosing.
- - - - - - - - - - - - - - - - - - - -
You may load any of the following Oracle Secure Backup
packages:
1. linux32 (RH 2.1, RHEL 3, RHEL 4, SuSE 8, SuSE 9)
administrative server, media server, client
2. solaris64 (Solaris 2.8 and later, SPARC)
administrative server, media server, client
- - - - - - - - - - - - - - - - - - - -
Loading Oracle Secure Backup installation tools... done.
Loading linux32 administrative server, media server,
client... done.
- - - - - - - - - - - - - - - - - - - -
Loading of Oracle Secure Backup software from CD-ROM is
complete.
You may unmount and remove the CD-ROM.
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
You must now enter a password for the Oracle Secure Backup
'admin' user.
Oracle suggests you choose a password of at least 8
characters in length,
containing a mixture of alphabetic and numeric characters.
- - - - - - - - - - - - - - - - - - - -
3) Start the obtool as the admin user with the oracle password, and view the
currently configured devices.
(Hint: Use the lsdev command.)
Answer:
[oracle@edrsr4p1 labs]$ obtool
Oracle Secure Backup 10.1.0
login: admin
Password:oracle <<Password not echoed >>
ob> lsdev
library vlib in service
drive 1 vt in service
Answer:
ob> lsmf --long
RMAN-DEFAULT:
Keep volume set: content manages reuse
Appendable: yes
Volume ID used: unique to this media family
Comment: Default RMAN backup media family
ob> quit
[oracle@edrsr4p1 oracle]$
3. On the Database Login page, enter SYS as User Name, oracle as Password,
select SYSDBA from the Connect As drop-down list, and then click Login.
4. Because this is the first time you are connecting to EM Database Control as the
SYS user, the Oracle Database 10g Licensing Information page is displayed. At
the bottom of the page, click the “I agree” button.
2) In Enterprise Manager, register your administrative server.
2. On the Maintenance tabbed page, click the “Oracle Secure Backup Device and
Media” link in the Oracle Secure Backup section.
3. On the Add Administrative Server page, enter /usr/local/oracle/backup in
the Oracle Secure Backup Home field. Then, make sure that admin is set in the
Username field, enter oracle in the Password field, and then click the OK
button. (Click No, if the Password Manager offers to remember the password.)
3) Use Enterprise Manager to insert four volumes into the vlib test library. (An
unlabeled tape is synonymous with a blank tape within Oracle Secure Backup.)
Answer:
1. On the Administrative Server page, click the Manage link corresponding to the
Devices field.
3. On the Device Action: insertvol page, make sure that the “This is an unlabeled
tape” option is selected for Source, and for Destination, enter 1-4 in Storage
Element.
5. When returned to the Devices page, click the plus sign (+) to the left of vlib to
see your device.
8. On the New Users page, enter or select the following values: User: oracle,
Password: oracle, User class: oracle, UNIX name: oracle, UNIX group:
dba, and NDMP server user: no. Click Apply.
2) Configure the oracle Oracle Secure Backup user as a preauthorized RMAN and
command-line user with the following values: Hosts: all hosts, OS username: *,
Windows domain name: *, and Attributes: cmdline and rman.
Best Practice Tip: Limit preauthorized access to selected hosts.
Answer:
1. Click the Preauthorized Access button.
6. On the Administrative Server Login page, make sure that your Administration
Server is selected from the list. Enter oracle/oracle for the host username
and password. If these fields are already filled in, make sure the supplied values
7. On the Backup Storage Selectors page, click Add to configure a Backup Storage
Selector for your database.
8. On the Add Backup Storage Selector page, under the heading “For These Types
of Backups,” select all check boxes (for Archive Logs, Auto Backup, Full, and
Incremental database backup types). Then, click OK.
Answer:
1. On the Backup Settings page, scroll down to see that the administrative server is
set. Make sure that your Host Credentials are correct, and then click “Test Tape
Backup” in the Tape Settings section in the middle of the page.
(continued)
session, and as SYSDBA to your Database Control Console and SQL*Plus sessions.
1) In Enterprise Manager, schedule Oracle-Suggested Backup with the following
specifications:
• Backup destination: both disk and tape
• Daily backup of archivelogs and incremental backup
• Tape Drives: 1
• Schedule daily backup within 5 minutes of your current date and time
Answer:
2) Review your backup job. If this is your first scheduled backup, you should see a full
backup (otherwise an incremental one) first to the Flash Recovery Area, and then to
tape. Review the RMAN command, as well as the job execution.
8. On the New Datasets page, set the Name field to mylabs, and replace the given
template with the following:
Make sure that you replace <hostname> with the machine name of your student
computer.
To not back up the local root directory, place comment signs (#) before the
relevant lines, or delete these lines.
2) Create a backup with your mylabs dataset. The backup should run immediately.
Answer:
1. On the Backup: Datasets page, click Backup Now on the bottom of the page.
2. On the Backup Now page, click the Add button.
3. On the Backup: Backup Now > Options page, select the mylabs dataset and
click OK.
Oracle Secure Backup submits the backup request and assigns a job number.
3) View Oracle Secure Backup job information. Query the Manage: Jobs page for the
previously created and executed job.
Answer:
1. Click the Manage tab.
2. On the Manage page, click Jobs.
3. On the Jobs page, restrict the display to only Active, Complete, or Pending jobs
by selecting those options. In the Types box, select backup, then hold the [Ctrl]
key and select dataset and Oracle backup. Click Apply.
5. Continue drilling down until you reach the labs directory. Select this directory,
and then click Add.
8. After viewing the information, click Go to submit the restore request to the
scheduler.
4. Review the displayed job and verify that your restore job was successful.
Unless specified otherwise, you should log in as SYS user (with the oracle password)
and connect as SYSDBA to Enterprise Manager Database Control.
1) In Enterprise Manager, schedule a customized tape backup of the whole database
with the following specifications: full online backup with archive logs to tape. Start
the backup immediately.
Answer:
3. If you completed the task to perform an Oracle Suggested backup, then you see
the following information:
4. Accept “Whole Database” under the Customized Backup section and click
Schedule Customized Backup.
2) Edit the RMAN script and include the command to encrypt the backup, specifying
demo as the password. The command syntax is:
Answer:
1. On the “Schedule Customized Backup: Review” page, click Edit RMAN Script.
Note: Specifying “ONLY” in the command means decryption will require the demo
password, and no other encryption keys will exist for this backup.
3) Check the backup job status. Verify that the RMAN SET ENCRYPTION command is
successfully executed.
Answer:
1. Click View Job.
2. Click the Backup link in the Name column of the table under the Logs section.
When you have finished viewing the presentation, close your Web browser window.
Unless specified otherwise, you should log in as SYS user (with the oracle password)
and connect as SYSDBA to Enterprise Manager Database Control.
1) In Enterprise Manager, perform an object-level recovery of the EXAMPLE tablespace
to the current time or a previous point in time. Restore the files to the default location.
Answer:
3. Select Tablespaces from the Object Type list, ensure that your Host Credentials
are correct, and click Perform Object Level Recovery.
5. Click Add.
8. Accept the “No. Restore the files to the default location” option and click Next.
Notice that there is a tablespace offline and its datafile needs media recovery. This is
due to the failed tablespace recovery attempt.
4) Perform an object-level recovery of the EXAMPLE tablespace to the current time or a
previous point in time. Restore the files to the default location.
Answer:
1. Select Tablespaces from the Object Type list and click Perform Object Level
Recovery.
3. On the “Perform Object Level Recovery: Tablespaces” page, make sure that the
EXAMPLE tablespace is displayed, and click Next.
5) Edit the RMAN script on the “Perform Object Level Recovery: Review” page.
Include the command to decrypt the backup, specifying demo as the password. The
command syntax is:
6) View the Perform Recovery: Result page. Notice the successful execution of your
SET DECRYPTION command.
Answer:
1. Notice that the SET DECRYPTION command was executed.
their content, jobs and job transcripts, and defaults and policies.
Unless specified otherwise, you should log in as the SYS user (with the oracle
password) and connect as SYSDBA to Enterprise Manager Database Control. To access
the Oracle Secure Backup Web tool, use admin as username and oracle as password.
1) The administrative server maintains a catalog in which it stores metadata relating to
backup and restore operations for the administrative domain. Use the Oracle Secure
Backup Web tool to browse the Oracle Secure Backup catalog to view what you have
backed up so far.
Answer:
7. Click until you see the files, which you backed up during a previous practice
session.
4. Review the List Section Properties. The content of your Backup Sections will be
different from this screenshot. Then click Close.
3) View a category of jobs—for example, completed ones. Include a review of a job
transcript.
Answer:
1. In the Oracle Secure Backup Web tool, click the Home tab.
4. Scroll to the end of the job transcript and view the error rate. It should be 0%.
5. On the Configure: Defaults and Policies page, click the security Policy.
The default value is 15 minutes, which means after 15 minutes of inactivity, you need
to repeat your Oracle Secure Backup login.
When prompted for input, supply the following dataset directives, where
<hostname> is the host name of your assigned computer:
include host <hostname> {
include path /etc/obconfig
include path /usr/etc/ob/xcr
include path /usr/local/oracle/backup/admin }
Answer:
ob> mkds --dir catalog_backup
ob> mkds --input catback.ds
Input the new dataset contents. Terminate with an EOF or
a line containing just a dot (".").
include host <hostname> {
include path /etc/obconfig
include path /usr/etc/ob/xcr
include path /usr/local/oracle/backup/admin }
.
Apply your changes [yes]?
ob>
3) Create a backup request for this dataset, and then submit the backup request.
To create the backup request using the following obtool command:
backup –l full –p 1 –r vt –g --dataset catback.ds
Answer:
This command performs a full backup (-l full) of the files defined by the
dataset description catback.ds. (--dataset). All the files described are
backed up regardless of when the last backup was taken or what files have
changed. The backup is executed as the privileged root user (-g) and is given
the highest priority (-p 1). The backup is restricted to only the vt tape drive, so
the volume that contains the backup can be easily located.
ob> backup –l full –p 1 –r vt –g --dataset catback.ds
ob> backup --go
4) Use the information from the message returned in the previous step to verify that the
backup completed successfully. (State should show “completed successfully”).
Answer:
ob> lsjob --long admin/3
admin/3:
Type: dataset catback.ds
Level: full
Family: OSB_catalogs
Scheduled time: none
State: completed successfully at
2006/05/19.21:51
Priority: 1
Privileged op: yes
Run on host: (administrative server)
Attempts: 1
ob>
ob>
(continued)
ob> exit
*: in use list
Stop drivers
Run setup.exe
Install
Windows drivers claim devices to be used by Oracle Secure Backup. If not disabled, the Windows
drivers will preempt the Oracle Secure Backup device driver (ob) on the next reboot.
Continued:
Continued:
<OSB_Home> directory
• config • conf
• history • htdocs
• log • images
• state • logs
• modules
Configuration
Administrative server file
UNIX systems.
On a Windows host, an Oracle Secure Backup installation also includes the following file objects:
• db\xcr\: Transcripts for jobs that ran on this host
• temp\: The directory containing observiced and obndmpd log files and temporary files
A UNIX or Linux host has the following additional files:
• .bin.<operating_system>/: Executables for operating_system, where operating_system
is a derivative of the operating system name. For example, the directory for Sun Solaris is
.bin.solaris.
<OSB_Home>
/usr/local/oracle/backup
directory
Media server
Client
- .etc.<operating_system>/
- man/
- /usr/etc/ob/.hostid
- /usr/etc/ob/xcr/
- /usr/tmp/
- .wrapper
<OSB_Home> directory
• config • conf
• history • htdocs
• log • images
• state • logs
• modules
Configuration
file
Note: The directory structure under the <OSB_Home> directory is the same for both Windows and
UNIX systems.
On a Windows host, an Oracle Secure Backup installation also includes the following file objects:
• db\xcr\: Transcripts for jobs that ran on this host
• temp\: The directory containing observiced and obndmpd log files and temporary files
A UNIX or Linux host has the following additional files:
• .bin.<operating_system>/: Executables for operating_system, where operating_system
is a derivative of the operating system name. For example, the directory for Sun Solaris is
<OSB_Home>
/usr/local/oracle/backup
directory
<OSB_Home>
/usr/local/oracle/backup
directory
…
# _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#
/usr/etc/ob.
• <OS type> temp dir: Is used to alter the location of the temp area. By default, Oracle
Secure Backup uses the /usr/tmp directory on each host for the storage of transient files
during installation. Oracle Secure Backup requires that the temp directory be able to contain
lockable files, which eliminates temp directories mounted as SunOS “tmpfs” file systems. You
can select a temp directory on a per-OS basis by modifying the appropriate line.
• <OS type> links: Indicates whether or not Oracle Secure Backup should create symbolic
links. Oracle Secure Backup by default creates symbolic links so that users of Oracle Secure
Backup do not need to change their search paths. You can choose not to create these links or to
Would you like to install Oracle Secure Backup on any other machine
[yes]?
Enter the name of a host onto which you'd like to install Oracle Secure
Backup: media_x
You can install this host one of three ways:
(a) an admin server, (b) a media server or,(c) a client
Which would you like (one of a b c; q to quit) [c]? b
Oracle Secure Backup's Web Server Interface software has been loaded.
…
Some examples:
• View Oracle Secure Backup processes in Linux:
ps -e | grep ob
Appendix D
Glossary