Oracle Database 10g: Backup and Recovery

Volume II • Student Guide

D22057GC10 Production 1.0 June 2006 D46525

r O

cl a

In e
®

rn te

l& a

O

I A

s U

O e

ly n

Authors Donna Keesling Maria Billings Technical Contributors and Reviewers Christopher Andrews Tammy Bednar Tom Best Harald van Breederode Mary Jane Bryksa Marielle Canning Tim Chien Donna Cooksey Judy Ferstenberg Gerlinde Frenzen Joel Goodman Pete Jones Isabelle Marchand Sabiha Miri Manish Pawar Jim Spiller George Stabler Anthony Woodell Editor Daniel Milne Graphic Designer Satish Bettegowda Publisher Jobi Varghese

Copyright © 2006, Oracle. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and 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 any way. Except where your use constitutes "fair use" under copyright law, you may 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 express authorization of Oracle. The information contained in this document is subject to change without notice. If you 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 warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Contents

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 Using Oracle Recovery Manager 1-6 Recovery Manager Components 1-7 Using Oracle Secure Backup 1-9 Overview of Oracle Backup Methods 1-10 When Do You Need to Use a Backup for Recovery? 1-12 Responding to User Error 1-13 Overview of Data Recovery 1-14 Oracle Database Architecture: Crash Recovery 1-15 Oracle Database Architecture: Recovery After Media Failure 1-16 Developing a Backup and Recovery Strategy for Your Oracle Database 1-17 Oracle Solutions for High Availability 1-18 Oracle High Availability Solutions for Unplanned Downtime 1-19 Summary 1-21 Configuring for Recoverability Objectives 2-2 Configuring Your Database for Backup and Recovery Operations 2-3 Configuring ARCHIVELOG Mode 2-4 Specifying a Backup Destination 2-5 Specifying a Retention Policy 2-6 Using a Flash Recovery Area 2-8 Defining a Flash Recovery Area 2-9 Defining Flash Recovery Area Using Enterprise Manager 2-10 Flash Recovery Area Space Management 2-11 Flash Recovery Area Space Usage 2-13 Monitoring the Flash Recovery Area 2-14 Benefits of Using a Flash Recovery Area 2-15 Summary 2-16 Practice Overview 2-17

2

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

iii

3

Using RMAN to Create Backups Objectives 3-2 Using RMAN to Create Backups 3-3 Backup Destinations 3-4 Configuring Persistent Settings for RMAN 3-5 Using Enterprise Manager to Configure RMAN Settings 3-6 Managing Persistent Settings 3-7 Configuring and Allocating Channels for Use in Backups 3-8 Configuring Backup Optimization 3-9 Creating Backup Sets 3-11 Creating Image Copies 3-12 BACKUP Command Options 3-14 Creating a Whole Database Backup 3-16 RMAN Backup Types 3-17 Fast Incremental Backup 3-19 Enabling Fast Incremental Backup 3-20 Monitoring Block Change Tracking 3-21 Creating an Oracle-Suggested Backup 3-22 Creating Duplexed Backup Sets 3-23 Creating Duplexed Backup Sets Using CONFIGURE BACKUP COPIES 3-24 Creating Duplexed Backup Sets Using BACKUP COPIES 3-25 Creating Backups of Backup Sets 3-26 Configuring Control File Autobackups 3-27 Using a Media Manager 3-29 Creating Proxy Copies 3-31 Managing Backups: Reporting 3-32 Using Enterprise Manager to View Backup Reports 3-34 Managing Backups: Crosschecking and Deleting 3-35 Using Enterprise Manager to Manage Backups 3-36 Summary 3-37 Practice Overview 3-38

4

r O

Using RMAN to Perform Recovery Objectives 4-2 Using RMAN RESTORE and RECOVER Commands 4-3 Performing Recovery Using Enterprise Manager 4-4 Comparing Complete and Incomplete Recovery 4-5 Complete Recovery Following the Loss of Datafiles 4-6 Performing Complete Recovery: Loss of a Non-Critical datafile in ARCHIVELOG Mode 4-7

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

iv

Performing Complete Recovery: Loss of a System-Critical Datafile in ARCHIVELOG Mode 4-8 Recovery Using Incrementally Updated Backups 4-9 Using the Flash Recovery Area for Fast Recovery 4-10 Performing Restore and Recovery of a Database in NOARCHIVELOG Mode 4-11 Using Incremental Backups to Recover a Database in NOARCHIVELOG Mode 4-12 Restoring and Recovering the Database on a New Host 4-13 Preparing to Restore the Database to a New Host 4-14 Restoring the Database to a New Host 4-15 Performing Recovery with a Backup Control File 4-19 Restoring the Server Parameter File from the Control File Autobackup 4-20 Restoring the Control File from Autobackup 4-21 Performing Disaster Recovery 4-23 Summary 4-25 Practice Overview 4-26 5 Using Oracle Flashback Technologies Objectives 5-2 Using Oracle Flashback Technology 5-3 Flashback Drop and the Recycle Bin 5-4 Understanding the Recycle Bin 5-5 Restoring Tables from the Recycle Bin 5-6 Automatic Space Reclamation in the Recycle Bin 5-7 Manual Space Reclamation in the Recycle Bin 5-8 Bypassing the Recycle Bin 5-9 Querying the Recycle Bin 5-10 Querying Data in Dropped Tables 5-11 Using Flashback Technology to Query Data 5-12 Configuring Undo for Flashback 5-13 Flashback Query: Overview 5-14 Flashback Query: Example 5-15 Flashback Versions Query: Overview 5-16 Using Enterprise Manager to Perform Flashback Versions Query 5-17 Flashback Versions Query: Considerations 5-18 Flashback Transaction Query: Overview 5-19 Using Enterprise Manager to Perform Flashback Transaction Query 5-20 Flashback Transaction Query: Considerations 5-21 Flashback Table: Overview 5-22 Flashback Table 5-23 Enabling Row Movement on a Table 5-24 Performing Flashback Table 5-25

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

v

Flashback Table: Considerations 5-26 Flashback Database: Overview 5-27 Flashback Database Architecture 5-28 Configuring Flashback Database 5-29 Using Enterprise Manager to Configure Flashback Database 5-30 Flashback Database: Examples 5-31 Using Enterprise Manager to Perform Flashback Database 5-32 Flashback Database Considerations 5-35 Monitoring Flashback Database 5-36 Tuning Considerations for Flashback Database 5-39 Using Guaranteed Restore Points 5-41 Summary 5-42 Practice Overview 5-43 6 Using RMAN to Create a Duplicate Database Objectives 6-2 Using RMAN to Create a Duplicate Database 6-3 Using a Duplicate Database 6-4 Creating a Duplicate Database 6-5 Creating an Initialization Parameter File for the Auxiliary Instance 6-6 Specifying Parameters to Control File Naming 6-7 Starting the Instance in NOMOUNT Mode 6-9 Ensuring That Backups and Archived Redo Log Files Are Available 6-10 Allocating Auxiliary Channels 6-11 Using the RMAN DUPLICATE Command 6-12 Understanding the RMAN Duplication Operation 6-13 Specifying Options for the DUPLICATE Command 6-14 Using Enterprise Manager to Create a Duplicate Database 6-15 Using Enterprise Manager: Source Working Directory 6-16 Using Enterprise Manager: Select Destination 6-17 Using Enterprise Manager: Destination Options 6-18 Using Enterprise Manager: Review Page 6-19 Summary 6-20 Practice Overview 6-21 Performing Tablespace Point-in-Time Recovery Objectives 7-2 Tablespace Point-in-Time Recovery (TSPITR) Concepts 7-3 Tablespace Point-in-Time Recovery (TSPITR): Terminology 7-4 Tablespace Point-in-Time Recovery: Architecture 7-5 Understanding When to Use TSPITR 7-7 7 r O cl a In e rn te l& a O I A s U O e ly n vi .

Preparing for TSPITR 7-8 Determining the Correct Target Time 7-9 Determining the Tablespaces for the Recovery Set 7-10 Identifying Objects That Will Be Lost 7-11 Performing Basic RMAN TSPITR 7-12 Performing Fully Automated TSPITR 7-13 Using Enterprise Manager to Perform TSPITR 7-14 Understanding TSPITR Processing 7-15 Performing Customized RMAN TSPITR with an RMAN-Managed Auxiliary Instance 7-17 Performing RMAN TSPITR Using Your Own Auxiliary Instance 7-18 Troubleshooting RMAN TSPITR 7-19 Summary 7-21 Practice Overview 7-22 8 Using the RMAN Recovery Catalog Objectives 8-2 RMAN Repository Data Storage: Comparison of Options 8-3 Storing Information in the Recovery Catalog 8-4 Reasons to Use a Recovery Catalog 8-5 Creating the Recovery Catalog: Three Steps 8-6 Configuring the Recovery Catalog Database 8-7 Creating the Recovery Catalog Owner 8-8 Creating the Recovery Catalog 8-9 Managing Target Database Records in the Recovery Catalog 8-10 Registering a Database in the Recovery Catalog 8-11 Using Enterprise Manager to Register a Database 8-12 Unregistering a Target Database from the Recovery Catalog 8-14 Cataloging Additional Backup Files 8-15 Manually Resynchronizing the Recovery Catalog 8-16 Using RMAN Stored Scripts 8-17 Creating RMAN Stored Scripts 8-18 Executing RMAN Stored Scripts 8-19 Displaying RMAN Stored Script Information 8-20 Updating and Deleting RMAN Stored Scripts 8-21 Backing Up and Recovering the Recovery Catalog 8-22 Re-creating an Unrecoverable Recovery Catalog 8-23 Exporting and Importing the Recovery Catalog 8-24 Upgrading the Recovery Catalog 8-25 Dropping the Recovery Catalog 8-26 Summary 8-27 Practice Overview 8-28 r O cl a In e rn te l& a O I A s U O e ly n vii .

9 Monitoring and Tuning RMAN Objectives 9-2 Monitoring RMAN Sessions 9-3 Monitoring RMAN Job Progress 9-5 Monitoring RMAN Job Performance 9-7 Interpreting RMAN Message Output 9-8 Using the DEBUG Option 9-9 Understanding RMAN Code Layer Error Numbers 9-10 Interpreting RMAN Error Stacks 9-11 Tuning RMAN 9-12 RMAN Multiplexing 9-13 Allocating Disk Buffer: Example 9-14 Allocating Tape Buffers 9-15 Comparing Synchronous and Asynchronous I/O 9-16 Monitoring RMAN Job Performance 9-18 Asynchronous I/O Bottlenecks 9-19 Synchronous I/O Bottlenecks 9-20 Tape Backup Speed 9-21 Tape Subsystem Performance Rules 9-22 Controlling Tape Buffer Size with BLKSIZE 9-23 Channel Tuning 9-24 Tuning the BACKUP Command 9-25 Tuning RMAN Backup Performance 9-26 Setting LARGE_POOL_SIZE 9-27 Tuning RMAN Tape Streaming Performance Bottlenecks 9-28 Summary 9-30 Practice Overview 9-31 10 Oracle Secure Backup Overview Objectives 10-2 Oracle Secure Backup Tape Backup Management 10-3 What Is Oracle Secure Backup? 10-4 Oracle Secure Backup: Tape Management and Integration with Oracle Products 10-5 r O Client/Server Architecture Host Roles 10-6 Oracle Secure Backup for Centralized Tape Backup Management 10-7 Typical SAN Environment 10-8 Oracle Secure Backup Interface Options 10-9 Media Concepts: Overview 10-10 Backup Pieces and Backup Images 10-11 Media Management Expiration Policies 10-12 Oracle Secure Backup Media Family 10-14 cl a In e rn te l& a O I A s U O e ly n viii .

Tape Drives and Libraries 10-15 Virtual Tape Libraries (VTL) 10-17 Managing Data to Be Protected 10-18 Oracle Secure Backup Jobs 10-19 Securing Data and Access to the Backup Domain 10-20 Oracle Secure Backup: The Integration Advantage 10-22 Why Use Oracle Secure Backup? 10-23 Summary 10-24 11 Installing Oracle Secure Backup Objectives 11-2 Performing Preinstallation Tasks 11-3 Installation and Configuration of the Administrative Domain 11-4 Performing Installation Tasks 11-5 Administrative Server Installation: Example 11-6 Wizard-Based Installation on Windows 11-13 Oracle Secure Backup Interfaces 11-14 Integration with Enterprise Manager 11-15 Oracle Secure Backup Administrative Server Page 11-16 Configuring the Administrative Server in EM 11-17 Oracle Secure Backup Web Tool Home Page 11-18 Common obtool Commands 11-19 Configuring Oracle Secure Backup Users 11-20 Adding Oracle Secure Backup Users 11-21 Preauthorizing Access 11-23 Summary 11-24 Practice Overview 11-25 12 Using RMAN and Oracle Secure Backup Objectives 12-2 RMAN and Oracle Secure Backup Basic Process Flow 12-3 RMAN Database Backup to Tape 12-4 Database Backup Storage Selector 12-5 Defining Database Storage Selectors 12-7 Media Families and RMAN 12-8 Oracle Database Disk and Tape Backup Solution 12-9 Backing Up the Flash Recovery Area to Tape 12-10 Defining Retention for RMAN Backups 12-11 Backup Settings 12-12 Scheduling Backups with EM 12-13 Oracle-Suggested Backup to Tape 12-14 r O cl a In e rn te l& a O I A s U O e ly n ix .

RMAN and Oracle Secure Backup Job Execution 12-15 Managing Database Tape Backups 12-16 Performing Database Recovery 12-18 RMAN Automatic Failover to Previous Backup 12-19 Summary 12-20 Practice Overview 12-21 13 Backing Up File-System Files with Oracle Secure Backup Objectives 13-2 Backing Up File-System Files with Oracle Secure Backup 13-3 File-System Backups 13-4 Managing Media Families 13-5 Dataset Script: Examples 13-6 Creating Datasets 13-9 Creating Backup Windows 13-11 Creating Backup Schedules 13-13 Creating Backup Triggers 13-14 Previewing a Backup Trigger 13-16 Creating On-Demand Backup Requests 13-17 Submitting Backup Requests 13-19 Reviewing Jobs 13-20 Summary 13-21 Practice Overview 13-22 14 Restoring File-System Backups with Oracle Secure Backup Objectives 14-2 Browsing the Catalog for File-System Backup Data 14-3 Restoring File-System Data 14-4 Restoring File-System Files with Oracle Secure Backup 14-5 The Restore Page 14-6 Listing All File-System Backups of a Client 14-7 Creating a Catalog-Based Restore Request 14-8 Submitting Restore Requests 14-12 Summary 14-13 Practice Overview 14-14 r O cl a In e rn te l& a O I A s U O e ly n x .

15 Managing Oracle Secure Backup Security Objectives 15-2 Guarding Access and Data 15-3 Managing User Access Control 15-4 Predefined Classes and User Rights 15-5 Defining an Oracle Secure Backup User 15-8 Oracle Secure Backup User: OS Permissions 15-9 Preauthorization 15-11 Assigning Windows Account Information 15-12 Authentication 15-13 Leveraging Oracle Security Technology 15-14 Administrative Server Certificate Authority (CA) 15-16 Oracle Wallets 15-18 Encrypted Backups to Tape 15-20 Creating RMAN Encrypted Backups 15-21 Using Transparent Mode Encryption 15-22 Using Password Mode Encryption 15-24 Using Dual Mode Encryption 15-25 Restoring Encrypted Backups 15-26 Performing Encrypted Recovery 15-27 Summary 15-28 Practice Overview 15-29 16 Managing the Administrative Domain Objectives 16-2 Oracle Secure Backup Processes: Daemons 16-3 Managing Common Daemon Operations 16-5 Managing Policies and Defaults 16-6 Configuring Oracle Secure Backup Policies 16-7 Oracle Secure Backup: Backup Metadata Catalogs 16-8 Oracle Secure Backup: Directory Structure 16-10 Backing Up the Catalog 16-11 Adding Clients 16-12 Adding Media Servers 16-13 NAS Devices 16-15 Adding NDMP Media Servers 16-16 Adding Devices 16-17 Discovering Devices on NDMP Hosts 16-19 Managing Devices 16-20 Tape Library Properties 16-21 Tape Drive Properties 16-22 r O cl a In e rn te l& a O I A s U O e ly n xi .

Managing Volumes 16-23 Oracle Secure Backup Jobs 16-25 Managing Jobs 16-27 Viewing Job Properties and Transcripts 16-29 Suspending and Resuming Job Dispatching 16-31 Job Summaries 16-33 Displaying Log Files and Transcripts 16-34 Summary 16-35 Practice Overview 16-36 Appendix A: Practices Appendix B: Practice Solutions Appendix C: Oracle Secure Backup Additional Installation Topics Topics C-2 Windows Installation: Overview C-3 Stopping Tape Device Drivers C-4 Oracle Secure Backup Setup C-6 Service Startup Dialogs C-8 Service Login Dialog Box C-9 Oracle Secure Backup Installed Files C-10 Installed Files for Host Role: Administrative Server C-14 Installed Files for Host Role: Media Server C-16 Installed Files for Host Role: Client C-17 Specifying Installation Parameters C-18 Client Installation: Example C-20 Media Server Installation: Example C-21 Verifying Your Installation C-22 Uninstalling Oracle Secure Backup C-23 Summary C-25 Appendix D: Glossary r O cl a In e rn te l& a O I A s U O e ly n xii .

Appendix A Practices r O cl a In e rn te l& a O I A s U O e ly n .

............. 35 Practice 13-1: Back Up Your File System with Oracle Secure Backup .... 19 Practice 7-1: Use Tablespace Point-in-time Recovery ............................. 44 Practice 16-2: Back Up the Oracle Secure Backup Catalog .................................................................................................................................................................................. 29 Practice 11-2: Configure Devices for Oracle Secure Backup... 23 Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups ........................... 37 Practice 14-1: Restore File-System Data with Oracle Secure Backup ................................. 25 Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs ........................................................ 39 Practice 15-1: Create an Encrypted Backup ............................................................................ 30 Practice 11-3: Register the Administrative Server................................................................ 12 Practice 5-1: Enable Flashback Database ........................... 41 Practice 15-2: Recover a Tablespace from an Encrypted Backup.......................................................................... 21 Practice 8-1: Create the Recovery Catalog and Register the Database ........................................................................................................ 34 Practice 12-2: Perform Oracle-Suggested Backup ....... 7 Practice 4-1: Use RMAN to Recover a Datafile.. 26 Practice 11-1: Install Oracle Secure Backup ......................................... 10 Practice 4-3: Recover Control Files......... 9 Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile ............... 15 Practice 5-3: Use Flashback Query and Flashback Versions Query..................... 16 Practice 5-4: Use Flashback Database .......................................................................................................................................................... 5 Practice 3-1: Use RMAN to Create and Manage Backups ................................................................... 45 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-2 ...........................................................................................Table of Contents Practice 2-1: Configure Your Database .................................................... 11 Practice 4-4: Delete Obsolete Backups....... 42 Practice 16-1: View Oracle Secure Backup Information........ 17 Practice 6-1: Create a Duplicate Database....................... 14 Practice 5-2: Set Restore Points and Perform Flashback Table.......................... 31 Practice 11-4: Configure Oracle Secure Backup User.................................................. 32 Practice 12-1: Create a Database Backup Storage Selector.....................................

Practice for Lesson 1 There are no practices for Lesson 1. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-3 .

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-4 .Practice for Lesson 2 In this practice. you configure your database for recoverability.

5) Use the RMAN SHOW ALL command to view the configuration settings in your database and then exit from your RMAN session.Practice 2-1: Configure Your Database 1) Use Enterprise Manager to configure your database in ARCHIVELOG mode. Make note of the database identifier (DBID) of your database. Database Identifier: ____________________________ Make note of the database identifier (DBID) of your database. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-5 . 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.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-6 . you configure automatic backup of the control file.Practice for Lesson 3 In this practice. You also configure a backup of your database using the Oracle-Suggested Backup Strategy feature in Enterprise Manager Database Control.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-7 . 5) Use RMAN to create a duplexed backup set of the EXAMPLE tablespace.f for the name of the block change tracking file. 3) Use Enterprise Manager Database Control to create a whole database backup using the Oracle-suggested backup strategy.Practice 3-1: Use RMAN to Create and Manage Backups 1) Use Enterprise Manager Database Control to configure autobackup of the control file and the server parameter file. 4) Use Enterprise Manager to view information about your backups. Specify /u01/app/oracle/oradata/orcl/chg_track. 2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking. 6) Use Enterprise Manager Database Control to perform a crosscheck of your backups.

you use RMAN to perform recovery.Practice for Lesson 4 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-8 .

sh script to simulate a failure in your database.JOBS table. Make note of the number of rows in the HR. 5) Return to your SQL*Plus session and again attempt to query the HR. 2) At the operating system prompt.JOBS table. 1) Use SQL*Plus to query the HR.REGIONS table. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-9 .Practice 4-1: Use RMAN to Recover a Datafile In this practice. execute the lab_04_01_02_01.REGIONS table. Notice how you are prompted by Enterprise Manager to recover the lost datafile. This script deletes the EXAMPLE tablespace datafile. 3) Use SQL*Plus to query the HR. you use RMAN to recover a lost datafile. 4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace datafile.

verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area.REGIONS table.sh script to simulate a failure in your database. 1) Use SQL*Plus to query the HR. 3) Use SQL*Plus to query the HR. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-10 . 4) Use the RMAN SWITCH TO COPY command to recover the datafile. execute the lab_04_02_02_01. Make note of the number of rows in the HR. 8) Use Enterprise Manager Database Control to verify the file.JOBS table.REGIONS table.Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile In this practice. 6) Using Enterprise Manager Database Control. 5) Query the HR.DEPARTMENTS table. 2) At the operating system prompt. This script deletes the EXAMPLE tablespace datafile. you recover a lost datafile by using the Flash Recovery Area for fast recovery. 7) Make a copy of the datafile in the original location and switch back to it.

sh script to delete all your control files. 4) You have lost all your control files and will need to recover them from the control file autobackup. 1) Use SQL*Plus to view files information for the control files in your database.Practice 4-3: Recover Control Files In this practice. 3) You need some more information about your control files. 2) Simulate a failure in your environment by executing the lab_04_03_02_01. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file. Query V$CONTROLFILE. Use Recovery Manager to recover the control files. you recover your control file using an autobackup. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-11 .

2) Use Enterprise Manager Database Control to delete obsolete backups.Practice 4-4: Delete Obsolete Backups 1) Use Recovery Manager to view obsolete backups. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-12 . 3) You can also use RMAN to verify that your obsolete backups were deleted.

you use Oracle Flashback features to recover from errors in your database.Practice for Lesson 5 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-13 .

Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-14 . 2) Use the ALTER DATABASE command to enable supplemental logging.

Use Enterprise Manager to enable row movement for the HR. 2) Create a normal restore point.Practice 5-2: Set Restore Points and Perform Flashback Table Restore points are a way to “bookmark” database points in time. 3) Use SQL*Plus to query the POSTAL_CODE column in the HR. 5) Execute the lab_05_02_05_01.LOCATIONS table so that all postal codes are set to 11111.sql script to update the POSTAL_CODE column in the HR. Set a restore point to remember a significant change so that you can quickly recover to that point in time without having to record an SCN or time. 4) Execute the lab_05_02_04_01. 1) You must enable row movement to use restore points. 6) Restore the POSTAL_CODE column values using the restore point. Execute the lab_05_02_07_01. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-15 .LOCATIONS table.sql script to query the POSTAL_CODE column in the HR.LOCATIONS again to be sure the correct values have been restored.LOCATIONS table again.sql script to query the POSTAL_CODE column in HR.LOCATIONS table. 7) Return to your SQL*Plus session.

2) Execute the lab_05_03_02_01. 3) Execute the lab_05_03_03_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table.sql script to query the POSTAL_CODE column in HR.LOCATIONS table to confirm the Flashback operation.LOCATIONS table.sql script to update the POSTAL_CODE column in the HR. 6) Return to your SQL*Plus session. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-16 .LOCATIONS table for location ID 1400.Practice 5-3: Use Flashback Query and Flashback Versions Query 1) Execute the lab_05_03_01_01. Query the HR.LOCATIONS and view the change. 4) Execute the lab_05_03_04_01. simulating user error. simulating user error. 5) Use Enterprise Manager to perform Flashback Versions Query to correct the user errors.sql script to query the HR.

3) Execute the lab_05_04_03_01. Execute the lab_05_04_07_02.sql script to determine the number of rows in the HR. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-17 .JOB_HISTORY table.JOB_HISTORY table again to be sure the data has been restored.Practice 5-4: Use Flashback Database 1) Use Enterprise Manager to verify that Flashback Database is enabled. 2) Use Enterprise Manager to create a Guaranteed Restore Point. 6) Use Flashback Database to restore the HR.sql script to determine the number of rows in the HR. 7) Return to your SQL*Plus session. 5) Execute the lab_05_04_05_01.sql script to truncate the HR.JOB_HISTORY table.JOB_HISTORY table.JOB_HISTORY table rows. Record the number of rows: ___________ 4) Execute the lab_05_04_04_01.sql script to query the HR.

Practice for Lesson 6 In this practice. you create a duplicate database. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-18 .

6) Verify that your target database (orcl database) is mounted or open. 8) Create the duplicate database by executing the DUPLICATE command. 1) Create an Oracle password file for your auxiliary instance.ora file.ora file. 2) Use Oracle Net Manager to create an entry called AUXDB in the tnsnames. 9) Use SQL*Plus to log in to your AUX database and execute a query against the HR. you use RMAN to create a duplicate database on the same host as your database.Practice 6-1: Create a Duplicate Database In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-19 . shut down the aux instance.REGIONS table. 3) Create an initialization parameter file for the auxiliary instance. 4) Start the auxiliary instance in NOMOUNT mode using the initAUX. 10) Now that you have completed the test recovery by creating a duplicate database. 11) Change your ORACLE_SID to orcl in preparation for later practices. 7) Start RMAN with a connection to the target database (orcl) and the auxiliary instance. 5) Create a server parameter file (SPFILE).

you use tablespace point-in-time recovery to recover from unwanted changes to your database. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-20 .Practice for Lesson 7 In this practice.

and LOCATIONS tables.sql script to query the HRTEST. Make note of the highest salary that is displayed: ________ 8) Execute the lab_07_01_08_01.sql script to determine whether there are any dependencies that will prevent the TSPITR operation.DEPARTMENTS table or you would need to add the tablespace that contains the HR. Execute the lab_07_01_09_01. what would you need to do? r O Note: You will not perform another tablespace point-in-recovery in this practice. 2) Execute the lab_07_01_02_02. 10) You can use Enterprise Manager Database Control or RMAN command line to perform tablespace point-in-time recovery. These messages can be ignored. REGIONS.LOCATIONS table to your recovery set. 12) Verify that the SALARY columns in HRTEST.sh script to export the HR schema.DEPARTMENTS table. 15) If you wanted to complete the tablespace point-in-time recovery for the HRTEST tablespace now.sql query to determine whether there are any dependencies outside the recovery set. 4) Create a backup of your database using RMAN.EMPLOYEES for the employees in department 60 contain the correct values. Highest salary: _____________ 9) You now want to perform TSPITR for the HRTEST tablespace to return it to the state prior to the updates. 11) Verify that the HRTEST tablespace is online. 7) Execute the lab_07_01_07_01. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-21 . 3) Execute the lab_07_01_03_01. 5) Record the current SCN: ____________ 6) Record the current time.Practice 7-1: Use Tablespace Point-in-time Recovery 1) Execute the lab_07_01_01_01. 14) Assume you need to perform TSPITR on the HRTEST tablespace again.sql script to add a constraint to the HRTEST.EMPLOYEES table and view information about employees in department 60. Note: The import should complete successfully. You will receive error messages because the import excludes the COUNTRIES. Execute the lab_07_01_14_02.sh script to populate the new tablespace with a copy of the data from the HR schema. You would need to disable the DEPT_LOC_ID_FK constraint that was added to your HRTEST. 13) Execute the lab_07_01_13_02.sql script to update the salaries for the employees in department 60 and note the highest salary displayed.sql script to create a new tablespace and a new user in your database.

you create a recovery catalog in your instructor’s database and register your database in the recovery catalog. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-22 .Practice for Lesson 8 In this practice.

The tablespaces are named RCTS01 – RCTS12. (If you are using PC01. your assigned tablespace is RCTS01. 5) Create an RMAN script named whole_backup to make a whole database backup. You can use RMAN commandline or Enterprise Manager for this step. connect as RCUSER01) using RMAN. execute the command to resynchronize the control file and recovery catalog. use RMAN to unregister your database from the recovery catalog. 7) In preparation for later practices.The tablespace for the recovery catalog and the recovery catalog owner have been created in the instructor database. connect to your target database and the recovery catalog database. 2) Using RMAN. 3) Using RMAN. Practice 8-1: Create the Recovery Catalog and Register the Database r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-23 . What happens? Why? 4) Register the target database in the recovery catalog. Create the recovery catalog in your assigned tablespace. 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. 6) Use the PRINT command to query the recovery catalog and verify the creation of your whole_backup script.) The service name is RCDB. Do not execute the whole_backup script at this time.

you monitor the progress of your RMAN backup jobs. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-24 .Practice for Lesson 9 In this practice.

By using this view you can determine whether the backup is progressing normally or hanging.sql script to query V$SESSION_LONGOPS. If the backup is progressing normally.Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups 1) Invoke RMAN and delete all obsolete backups. 2) Open a second terminal window. 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. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-25 . the TIME_REMAINING column should be decreasing. Execute the lab_09_01_04_01. Change to the labs directory. 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.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-26 . 1) Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA.Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs You can easily monitor RMAN jobs in Enterprise Manager. 3) Start a whole database backup. 2) Delete obsolete backups.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-27 .Practice for Lesson 10 There are no practices for Lesson 10.

• Configure preauthorization for this user. • Register your administrative server with EM. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-28 . • Test connectivity to the tape drive. • Connect to the EM Database Console application using your browser. THEY ARE NOT SUPPORTED FOR PRODUCTION USE. • Install the Oracle Secure Backup software. • View information about the configured devices. you perform the following tasks: • Create your Oracle Secure Backup home directory. • Configure virtual test devices. THE VIRTUAL TEST DEVICES USED IN THIS LAB ARE FOR TRAINING PURPOSES ONLY.Practice for Lesson 11 In this practice. • Define a new Oracle Secure Backup user. • Insert four volumes into the tape library.

you perform the following tasks: • Create your Oracle Secure Backup home directory. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-29 . you should log in as the oracle user to your terminal emulator session. 2) Continue as the root user. Start the installation of Oracle Secure Backup from the staging directory. you configure only the local machine as an administrative server with no attached devices. Begin with the setup program. • Your Oracle Secure Backup home directory is /usr/local/oracle/backup. • During installation.Practice 11-1: Install Oracle Secure Backup In this practice. • Install the Oracle Secure Backup software. 1) Log in as the root user and create /usr/local/oracle/backup as your Oracle Secure Backup home directory. Use the following information to install the software: • The Oracle Secure Backup software is staged on your server in the /stage/osb/osb_10_1cdrom directory. Unless specified otherwise during this practice. Change to that directory.

execute the . you perform the following tasks: • Configure a virtual test library and a virtual test drive. (Hint: Use the lsmf --long command. to configure the vt tape drive for the library: 3) Start the obtool as the admin user with the oracle password.) 4) View the RMAN-DEFAULT media family./lab_11_02_02. .sh script./lab_11_02_01. and view the currently configured devices. and use the quit command to exit. (Hint: Use the lsdev command. to configure the vlib tape library directly attached to your administrative server. • View information about the configured devices and the default media family via the obtool interface. navigate to the /home/oracle/labs directory and execute the .Practice 11-2: Configure Devices for Oracle Secure Backup In this practice. 1) In a terminal window. 2) In the /home/oracle/labs directory.) r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-30 .sh script.

2) In Enterprise Manager. Practice 11-3: Register the Administrative Server r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-31 .In this practice. Unless specified otherwise. 3) Use Enterprise Manager to insert four volumes into the vlib test library. test the virtual tape drive access. On the Devices page. register your administrative server. you should log in as the oracle user to your terminal emulator session. • Insert four volumes into the virtual test library. connect to Enterprise Manager Database Control using the IP address or machine name for your host.) 4) Before taking any backups. you want to make sure you can access your tape drives. • Register your administrative server with EM. and as SYSDBA to your Database Control console and SQL*Plus sessions. (An unlabeled tape is synonymous with a blank tape within Oracle Secure Backup. • Test connectivity to the virtual test drive. 1) With your browser. you perform the following tasks: • Connect to the EM Database Console application using your browser.

UNIX name: oracle. Unless specified otherwise. set the value to “yes”. such as clicking the Administrative Server link in the upper-left part of the Devices page. Windows domain name: *. • Configure preauthorization for this user. OS username: *. you perform the following tasks: • Define a new Oracle Secure Backup user.” 2) Configure the oracle Oracle Secure Backup user as a preauthorized RMAN and command line user with following values: Hosts: all hosts. an NDMP server is not available. Best Practice Tip: Limit pre-authorized access to selected hosts.In this practice. 1) Use the Oracle Secure Backup Web tool to create the oracle Oracle Secure Backup user with the following values: User oracle. you can use shortcuts. but inside the regular classrooms. If you are already in Enterprise Manager. Note: If you have an NDMP server. User class: oracle. Then if you rightclick the “File System Backup and Restore” link (at the bottom of the page) and select the “Open Link in New Window” or “Open Link in New Tab” option. you should log on as the oracle user to your terminal emulator session and as SYSDBA to your EM Database Control Console session. one for Enterprise Manager and the other for the Oracle Secure Backup Web tool. so set the value to “no. Practice 11-4: Configure Oracle Secure Backup User r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-32 . and Attributes: cmdline and rman. Password: oracle. UNIX group: dba and NDMP server user: no. you can have two windows open.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-33 .Practice for Lesson 12 In this practice. • Perform a backup of your Oracle database with the Oracle-Suggested Backup strategy. you perform the following tasks: • Create a database backup storage selector for your database.

Full. verify that the database is in ARCHIVELOG mode. verify that the database is in ARCHIVELOG mode. • In Enterprise Manager. continue with the next step. and “Save as Preferred Credential” Database Backup Types: Archive log. shut down the database. Auto Backup. If your database is in ARCHIVELOG mode. • In Enterprise Manager. Unless specified otherwise. 2) In Enterprise Manager.Practice 12-1: Create a Database Backup Storage Selector In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-34 . create a database backup storage selector for your Oracle database. If not. and as SYSDBA to your Database Control Console and SQL*Plus sessions. you perform the following tasks: • In SQL*Plus. Password: oracle. you should log on as the oracle user to your terminal emulator session. 1) First. and Incremental 3) Test your tape backup. perform a test backup to verify that the Oracle Secure Backup configuration is correct. create a backup selector for your database with the following specifications: • • • Tape Drives: 1 Host Credentials Username: oracle. enable archiving. and then restart the database.

1) In Enterprise Manager. 3) Optionally. Review the RMAN command. Unless specified otherwise. then to tape. and as SYSDBA to your Database Control Console and SQL*Plus sessions. you should see a full backup (otherwise an incremental one) first to the Flash Recovery Area. as well as the job execution. If this is your first scheduled backup. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-35 . you can view the Oracle_Suggested_Strategy_viewlet_swf. to reinforce this practice topic.html viewlet in the /home/oracle/solutions/viewlets directory. you should log on as the oracle user to your terminal emulator session.Practice 12-2: Perform Oracle-Suggested Backup In Enterprise Manager. perform Oracle-Suggested Backup. 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.

you perform the following tasks: • Create a dataset for a file-system backup. • Schedule a backup of the dataset. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-36 .Practice for Lesson 13 In this practice.

Unless specified otherwise. Note: Do not back up the local root directory. The dataset should be of the form: include host <hostname> { include path /home/oracle/labs } Make sure that you replace <hostname> with the machine name of your student computer. you can view the Scheduling_filesystem_backups_viewlet_swf. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-37 . 3) View Oracle Secure Backup job information. Both use oracle as password. 1) Create a new dataset called mylabs that you will use to back up your $HOME/labs directory. 2) Create a backup with your mylabs dataset. which can be accessed from Enterprise Manager for the tasks in this practice session. Query the Manage: Jobs page for the previously created and executed job. access Enterprise Manager as SYDBA and the Oracle Secure Backup Web tool as admin user. The backup should run immediately.html viewlet in the /home/oracle/solutions/viewlets directory. 4) Optionally.Practice 13-1: Back Up Your File System with Oracle Secure Backup Use the Oracle Secure Backup Web tool. to reinforce this practice topic.

• Restore the missing lab files.Practice for Lesson 14 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-38 . you perform the following tasks: • Delete the contents of your labs directory. • Verify that the files are recovered.

remove all the files located in your $HOME/labs directory. 4) In a terminal window. verify that your lab files are present. Unless specified otherwise. you should log on as the oracle user to your terminal emulator session. Use the Browse Host button to locate the desired backup. 3) Monitor the progress of the restore request. you first delete your lab files and then restore them from the backup created in the previous practice. 1) From your terminal emulator session. which can be accessed from Enterprise Manager.In this practice. log in as admin user (with the oracle password) into the Oracle Secure Backup Web tool. For tasks 2 to 5. Practice 14-1: Restore File-System Data with Oracle Secure Backup r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-39 . and as SYSDBA to your Database Control Console session. 2) Restore your $HOME/labs directory contents by selecting the appropriate backup from the Oracle Secure Backup catalog.

• Recover a tablespace from an encrypted backup. you perform the following tasks: • Create an encrypted backup. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-40 .Practice for Lesson 15 In this practice.

you perform the following tasks: • Schedule a customized tape backup of the whole database. and no other encryption keys will exist for this backup. specifying demo as the password. Verify that the RMAN SET ENCRYPTION command is successfully executed. verify that the backup was encrypted. • After the backup operation completes. 5) Optionally. 4) Verify the successful completion of your backup. you can view the Backup_Encryption_viewlet_swf. 2) Edit the RMAN script and include the command to encrypt the backup. schedule a customized tape backup of the whole database with the following specifications: full online backup with archive logs to tape. Unless specified otherwise. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-41 . Start the backup immediately.Practice 15-1: Create an Encrypted Backup In this practice. you should log in as SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. to reinforce this practice topic. 3) Check the backup job status.html viewlet the /home/oracle/solutions/viewlets directory. The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY. Note: Specifying “ONLY” in the command means decryption will require the demo password. 1) In Enterprise Manager. • Edit the RMAN script to encrypt the backup using a password.

Practice 15-2: Recover a Tablespace from an Encrypted Backup In this practice. Restore the files to the default location. 6) View the Perform Recovery: Result page. you perform the following tasks: • Perform a tablespace recovery using the encrypted backup. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-42 . The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY. Notice the successful execution of your SET DECRYPTION command. 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. Unless specified otherwise. you should log in as SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. Why? 3) Troubleshoot the recovery process. Include the command to decrypt the backup. 5) Edit the RMAN script on the “Perform Object Level Recovery: Review” page. • Edit the RMAN script to decrypt the backup. What do you notice on the Perform Recovery page? 4) Perform an object level recovery of the EXAMPLE tablespace to the current time or a previous point in time. • Troubleshoot the recovery process. 2) The recovery operation fails. 1) In Enterprise Manager. specifying demo as the password.

Practice for Lesson 16 In this practice. • Back up the Oracle Secure Backup catalog. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-43 . you perform the following tasks: • View Oracle Secure Backup information.

use admin as username and oracle as password. 3) View a category of jobs—for example. 2) View the volumes and their content. 4) View the configuration of your security policies. Include a review of a job transcript. Use the Oracle Secure Backup Web tool to browse the Oracle Secure Backup catalog to view what you have backed up so far. What is the value of the “Login token duration” policy? Practice 16-1: View Oracle Secure Backup Information r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-44 . jobs and job transcripts. 1) The administrative server maintains a catalog in which it stores metadata relating to backup and restore operations for the administrative domain. Unless specified otherwise. To access the Oracle Secure Backup Web tool. you should log in as the SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control.In this practice. completed ones. volumes and their content. and defaults and policies. you view Oracle Secure Backup information: the catalog.

(State should show “completed successfully”). supply the following dataset directives. where <hostname> is the host name of your assigned computer: include include include include host path path path <hostname> { /etc/obconfig /usr/etc/ob/xcr /usr/local/oracle/backup/admin } 3) Create a backup request for this dataset.ds 4) Use the information from the message returned in the previous step to verify that the backup completed successfully. 5) Identify the volume that contains the backup. • Create a backup request. • Submit the backup request to the scheduler. using the commands listed here: mkds --dir catalog_backup mkds --input catback.Practice 16-2: Back Up the Oracle Secure Backup Catalog In this practice. and then submit the backup request. you used the Oracle Secure Backup Web tool for a file-system backup. Previously. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-45 . 1) Create a media family to be used when backing up the Oracle Secure Backup catalog files. • Verify that the backup completed successfully. Use the following command: mkmf --vidunique --writewindow 7days --retain 28days --noappend OSB_catalogs 2) Create a backup set for the catalog data. Now use the obtool utility with admin as username and oracle as password. • Identify the volume that contains the backup data.ds When prompted for input. you perform the following tasks using obtool: • Create a dataset for the <OSB_HOME>/admin directory. To create the backup request using the following obtool command: What does this command do? backup –l full –p 1 –r vt –g --dataset catback.

r O cl a In e rn te l& a O I A s U O e ly n .

Appendix B Practice Solutions r O cl a In e rn te l& a O I A s U O e ly n .

................. 52 Solutions for Practice 6-1: Create a Duplicate Database ........................................................................................ 10 Solutions for Practice 4-1: Use RMAN to Recover a Datafile ........................... 129 Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup 138 Solutions for Practice 14-1: Restore File-System Data with Oracle Secure Backup ......................................... 110 Solutions for Practice 11-3: Register the Administrative Server................................................. 36 Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table............... 5 Solutions for Practice 3-1: Use RMAN to Create and Manage Backups ....................................................... 118 Solutions for Practice 12-1: Create a Database Backup Storage Selector ............... 33 Solutions for Practice 5-1: Enable Flashback Database ........................................................... 21 Solutions for Practice 4-3: Recover Control Files ......... 17 Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile ................................. 112 Solutions for Practice 11-4: Configure Oracle Secure Backup User........ 74 Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database............................................ 60 Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery...Table of Contents Solutions for Practice 2-1: Configure Your Database ............................. 106 Solutions for Practice 11-2: Configure Devices for Oracle Secure Backup... 99 Solutions for Practice 11-1: Install Oracle Secure Backup................................ 168 Solutions for Practice 16-2: Back Up the Oracle Secure Backup Catalog ...................................................................... 158 Solutions for Practice 16-1: View Oracle Secure Backup Information.......................................................... 145 Solutions for Practice 15-1: Create an Encrypted Backup..... 46 Solutions for Practice 5-4: Use Flashback Database .............................................................................................................. 174 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-2 ......... 123 Solutions for Practice 12-2: Perform Oracle-Suggested Backup......... 38 Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query.................. 26 Solutions for Practice 4-4: Delete Obsolete Backups ............. 151 Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup . 96 Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs .. 89 Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-3 .Practice Solutions for Lesson 1 There are no practices for Lesson 1.

you configure your database for recoverability.Practice Solutions for Lesson 2 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-4 .

The Restart Database: Activity Information page is displayed. In the Host Credentials section.Solutions for Practice 2-1: Configure Your Database 1) Use Enterprise Manager to configure your database in ARCHIVELOG mode. Select the Maintenance page. 9. Start the Web browser and enter http://your host name:1158/em. 6. Click Login. The Confirmation page is displayed. Answer: 1. 8. Click Yes to restart the database instance. 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. select “ARCHIVELOG Mode” and click Apply. 7. In the Database Credentials section. The Restart Database: Confirmation page is displayed. Click Yes to confirm the restart of the database instance. Select Recovery Settings in the Backup/Recovery Settings section. 10. 2. Answer: 1. enter oracle in the Username and Password fields. Enter SYS in the User Name field and oracle in the Password field. 5. 4.” Click OK. Click “I agree” on the Oracle Database 10g Licensing Information page. Select the Maintenance page. enter SYS in the Username field and oracle in the Password field. Select SYSDBA in the Connect As menu. Select “Save as Preferred Credential. 2. On the Restart Database: Specify Host and Target Database Credentials page. In the Media Recovery section. Select Recovery Settings in the Backup/Recovery Settings section. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-5 . 3. Wait a few minutes and then click Refresh.

4. Click Database to return to the Database home page. If you have any errors. Enter 3 in the Flash Recovery Area Size field and click Apply.Solutions for Practice 2-1: Configure Your Database (continued) 3. 4) Use Recovery Manager (RMAN) to connect to your target database. r O Database Identifier: ____________________________ Answer: 1. Select Preferred Credentials on the left side of the page. 7. 3) Set Preferred Credentials in Enterprise Manager. 2. correct them and click Test again.oracle. 4. Scroll to the Flash Recovery Area and verify that the Flash Recovery Area is enabled. Answer: 1. Click the Set Credentials icon for the database instance. Click Test. Click Apply to save the settings. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-6 . Open a terminal window and log in as oracle/oracle. 6. Click the Database instance link to return to the Maintenance page. Select Preferences at the top of the Maintenance page.com” message is displayed. Make note of the database identifier (DBID) of your database. 3. The “Credentials successfully verified for orcl. 5. The Update Message is displayed. Supply the following values: Normal Username: system Normal Password: oracle SYSDBA Username: sys SYSDBA Password: oracle Host Username: oracle Host Password: oracle 5.

# default CONFIGURE BACKUP OPTIMIZATION OFF. # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1. # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1. All rights reserved. # deft CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET. CONFIGURE MAXSETSIZE TO UNLIMITED.0 . # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'. # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1. Start RMAN and connect to the target database by entering the following command at the operating system prompt: rman target / [oracle@edrsr10p1 oracle]$ rman target / Recovery Manager: Release 10. # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'. # default CONFIGURE ENCRYPTION FOR DATABASE OFF. connected to target database: ORCL (DBID=1090770270) RMAN> Make note of the database identifier (DBID) of your database.Solutions for Practice 2-1: Configure Your Database (continued) 2. 2005. # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1. Oracle.2.Production on Tue Mar 7 12:51:53 2006 Copyright (c) 1982. # default CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%U'.0. # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10. using target database control file instead of recovery catalog RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1. # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'. 5) Use the RMAN SHOW ALL command to view the configuration settings in your database and then exit from your RMAN session. Answer: RMAN> show all.2. # default CONFIGURE DEFAULT DEVICE TYPE TO DISK.1. # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE. # default CONFIGURE CONTROLFILE AUTOBACKUP OFF. # default CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET.0/db_1/dbst r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-7 .

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-8 .Solutions for Practice 2-1: Configure Your Database (continued) RMAN> exit Recovery Manager complete.

You also configure a backup of your database using the Oracle-Suggested Backup Strategy feature in Enterprise Manager Database Control.Practice Solutions for Lesson 3 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-9 . you configure automatic backup of the control file.

Answer: 1. select the Policy tab.f in the Block Change Tracking File field. You are returned to the Maintenance page. select the Policy tab.” 4. 4. 2. select “Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up. Answer: 1. Select Maintenance > High Availability > Backup/Recovery Settings > Backup Settings. On the Backup Settings page. 2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking. select “Automatically backup the control file and server parameter file (SPFILE) with every backup and database structural change. Select Maintenance > High Availability > Backup/Recovery Settings > Backup Settings. 2. In the Backup Policy section. Select “Enable block change tracking for faster incremental backups” and enter /u01/app/oracle/oradata/orcl/chg_track.” Click OK. In the Backup Policy section. On the Backup Settings page. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-10 . Specify /u01/app/oracle/oradata/orcl/chg_track. 3.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups 1) Use Enterprise Manager Database Control to configure autobackup of the control file and the server parameter file. 3. Click OK.f for the name of the block change tracking file.

an incremental backup to disk will be performed every day. Select Maintenance > High Availability > Backup/Recovery > Schedule Backup. click Schedule Oracle-Suggested Backup. On the Schedule Oracle-Suggested Backup: Schedule page. 3) Use Enterprise Manager Database Control to create a whole database backup using the Oracle-suggested backup strategy. Set the Time Zone field to correspond to your time zone.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) 5. Oracle Database 10g: Backup and Recovery B-11 cl a In e rn te l& a O I A s U O e ly n . You are returned to the Maintenance page. 2. In the Oracle-Suggested Backup section of the Schedule Backup page. Note that a full database copy will be performed during the first backup. 5. Click Next. 3. Answer: 1. you can specify the time for your backups. select Disk. After that. r O 4. Click Next. On the Schedule Oracle-Suggested Backup: Destination page. Review the information on the Schedule Oracle-Suggested Backup: Setup page.

8. cl a In e rn te l& a O I A s U O e ly n . Click Next. 9. Review the information on the Schedule Oracle-Suggested Backup: Review page.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) Select a backup time that is five minutes from the current time. Select Maintenance > High Availability > Backup/Recovery > Backup Reports. Answer: 1. Click the Backup link to view the output log. In the output log. r O 10. Click the Refresh button on your browser to refresh the Execution page. Oracle Database 10g: Backup and Recovery B-12 4) Use Enterprise Manager to view information about your backups. 7. 6. you can see that RMAN has made a datafile copy backup of each datafile in your database. Click the Database tab to return to the Database Home page. Click Submit Job. The Status page is displayed indicating that the job has been submitted. Click View Job to monitor the status of the backup job.

Answer: 1. Click the link for the backup you took in Question 3 to view detailed information about the backup.0 . One copy should be in the /home/oracle/backup1 directory and one copy should be in the /home/oracle/backup2 directory. '/home/oracle/backup2/%U'. connected to target database: ORCL (DBID=1090770270) 2.1.Production on Wed Mar 22 10:38:18 2006 Copyright (c) 1982. RMAN> @sol_03_01_05_02.2. 5) Use RMAN to create a duplexed backup set of the EXAMPLE tablespace. Create two backup set copies. Oracle.rmn RMAN> backup device type disk 2> copies 2 3> tablespace example 4> format '/home/oracle/backup1/%U'.0. [oracle@edrsr10p1 backup1]$ rman target / Recovery Manager: Release 10. Start RMAN and connect to the target database. Starting backup at 22-MAR-06 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset r O cl a In e rn te l& a O I A All rights reserved. s U O e ly n Oracle Database 10g: Backup and Recovery B-13 .Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) 2. 3. Click the Database Instance link to return to the Maintenance page. 2005.

RMAN> @sol_03_01_05_03.--5 B F A DISK NO TAG200600 7 B F A DISK NO TAG200607 8 B F A DISK NO TAG200603 9 B F A DISK NO TAG200608 RMAN> **end-of-file** RMAN> exit Completion Time #Pieces --------------.dbf channel ORA_DISK_1: starting piece 1 at 22-MAR-06 channel ORA_DISK_1: finished piece 1 at 22-MAR-06 with 2 copies and tag TAG20063 piece handle=/home/oracle/backup1/0ehejks7_1_1 comment=NONE piece handle=/home/oracle/backup2/0ehejks7_1_2 comment=NONE channel ORA_DISK_1: backup set complete..---------.------. The #Copies column shows the duplexed backup set copies you made. Use the RMAN LIST BACKUP SUMMARY command to view a listing of the backup sets and pieces.-.-----21-MAR-06 22-MAR-06 22-MAR-06 22-MAR-06 1 1 1 1 1 1 2 1 r O cl a In e rn te l& a O I A s U O e ly n Recovery Manager complete.-. using target database control file instead of recovery catalog List of Backups =============== Key TY LV S Device Type #Copies Compressed Tag ------. elapsed time: 00:00:15 Finished backup at 22-MAR-06 Starting Control File and SPFILE Autobackup at 22-MAR-06 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/autobackup /2006_03_22/o1_E Finished Control File and SPFILE Autobackup at 22-MAR-06 RMAN> **end-of-file** RMAN> 3.----------.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01. Exit from RMAN.rmn RMAN> list backup summary. Oracle Database 10g: Backup and Recovery B-14 .

5. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-15 . Answer: 1. You receive the “Job submission succeeded” message. Review the information on the Crosscheck All: Specify Job Parameters page and accept the default values.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) 6) Use Enterprise Manager Database Control to perform a cross-check of your backups. return to the Database Home page. 3. 4. Click Submit Job. Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups. Log out of Enterprise Manager. 2. Click Crosscheck All. After it completes successfully. You can click View Job to monitor the cross-check job.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-16 .Practice Solutions for Lesson 4 In this practice. you use RMAN to perform recovery.

[oracle@edrsr10p1 labs]$ . Make note of the number of rows in the HR.1. Answer: 1. 1) Use SQL*Plus to query the HR. Notice how you are prompted by Enterprise Manager to recover the lost datafile. Number of rows: ___________ [oracle@edrsr10p1 oracle]$ sqlplus hr/hr SQL*Plus: Release 10. This script deletes the EXAMPLE tablespace datafile. REGION_ID ---------1 2 3 4 REGION_NAME ------------------------Europe Americas Asia Middle East and Africa 3.1.0. 2. OLAP and Data Mining options SQL> select * from regions. change to the labs directory and execute the lab_04_01_02_01. Answer: 1.REGIONS table and record the number of rows.Production With the Partitioning.sh script to simulate a failure in your database.0. All rights reserved. you use RMAN to recover a lost datafile./lab_04_01_02_01. At the operating system prompt.0 .sh EXAMPLE tablespace file deleted r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-17 . Exit from your SQL*Plus session.2. Connected to: Oracle Database 10g Enterprise Edition Release 10.Production on Thu Mar 23 12:51:00 2006 Copyright (c) 1982.REGIONS table.0 . Open a terminal window and log in to SQL*Plus and connect as the HR user with HR as the password. 2) At the operating system prompt. execute the lab_04_01_02_01. Oracle.2. 2005.Solutions for Practice 4-1: Use RMAN to Recover a Datafile In this practice.sh script. Query the HR.REGIONS table.

dbf' 4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace datafile. 4. Select Perform Recovery on the Maintenance page. Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA.JOBS table. Click the “Datafiles Need Media Recovery” link.Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 3) Use SQL*Plus to query the HR. 2. select * from jobs * ERROR at line 1: ORA-00376: file 5 cannot be read at this time ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-18 . SQL> select * from jobs. Answer: 1. Answer: 1.JOBS table. Log in to SQL*Plus and connect as the HR user with HR as the password. 2. Navigate to the Maintenance page. 3. Query the HR.

On the “Perform Object Level Recovery: Review” page. 8. the Result page is displayed indicating that the recovery operation succeeded. 6.” Click Next. Restore the files to the default location. The Processing page is displayed.Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 5. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-19 . Click Submit. Select the file and click Next. Select “No. After the recovery operation completes. 7. click Edit RMAN Script to view the script that will be executed.

Query the HR. SQL> select * from jobs.JOBS table. le c te In Marketing Representative Human Resources Representative Public Relations Representative na r l& O I A s U O e MIN_SALARY ly n 3000 8200 20000 15000 4000 4000 4500 Oracle Database 10g: Backup and Recovery B-20 .---------President Administration Vice President Administration Assistant Finance Manager ra O 19 rows selected. JOB_ID MAX_SALARY ------------------AD_PRES 40000 AD_VP 30000 AD_ASST 6000 FI_MGR 16000 … MK_REP 9000 HR_REP 9000 PR_REP 10500 JOB_TITLE ----------------------------------. Click OK to return to the Maintenance page. Answer: 1.Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 9. 5) Return to your SQL*Plus session and again attempt to query the HR.JOBS table.

REGIONS table. This script deletes the EXAMPLE tablespace datafile. 2. 2) At the operating system prompt. cl a SQL> select * from departments.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile In this practice. Answer: 1. Make note of the number of rows in the HR. you recover a lost datafile by using the Flash Recovery Area for fast recovery.sh EXAMPLE tablespace file deleted [oracle@edrsr10p1 labs]$ 3) Use SQL*Plus to query the HR. change to the labs directory and execute the lab_04_02_02_01. Datafile number: ____ 4./lab_04_02_02_01. 1) Use SQL*Plus to query the HR. Query the HR. Exit from SQL*Plus.REGIONS table. Log in to SQL*Plus and connect as the HR user with HR as the password. At the operating system prompt.DEPARTMENTS table. r O 3.sh script to simulate a failure in your database. Oracle Database 10g: Backup and Recovery B-21 . 3.sh script. select * from departments * ERROR at line 1: ORA-01116: error in opening database file 5 ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01. Log in to SQL*Plus and connect as the HR user with HR as the password. Make note of the number of the datafile that is unavailable. execute the lab_04_02_02_01.REGIONS table. [oracle@edrsr10p1 labs]$ . Answer: 2.DEPARTMENTS table. Query the HR. 1. Answer: 1. Exit from your SQL*Plus session.dbf' ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 In e rn te l& a O I A s U O e ly n 4) Use the RMAN SWITCH TO COPY command to recover the datafile.

5) Query the HR. RMAN> SQL 'alter database datafile 5 offline'. Bring the datafile online. Recover the datafile. datafile 5 switched to datafile copy "/u01/app/oracle/flash_recovery_area/ORCL/" 4. elapsed time: 00:00:03 Finished recover at 24-MAR-06 5. RMAN> switch datafile 5 to copy. sql statement: alter database datafile 5 online RMAN> 6. Log in to your target database using RMAN. RMAN> sql 'alter database datafile 5 online'. Starting recover at 24-MAR-06 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=132 devtype=DISK allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=130 devtype=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Secure Backup starting media recovery media recovery complete. Execute the SWITCH TO COPY command for the datafile you noted in step 3.JOBS table.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile (continued) Answer: 1.---------AD_PRES President 20000 40000 Oracle Database 10g: Backup and Recovery B-22 .JOBS table. JOB_ID JOB_TITLE MIN_S MAX_SALARY ---------. Log in to SQL*Plus as HR/HR and query the HR. Answer: 1. Exit from your RMAN session. RMAN> recover datafile 5. Take the datafile offline.) r O cl a In e rn te l& a O I A s U O e ly n SQL> select * from jobs.-----------------------------. sql statement: alter database datafile 5 offline 3. (Output has been formatted to fit the code box. 2.----.

1.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile (continued) AD_VP … HR_REP PR_REP Administration Vice President 15000 30000 9000 10500 Human Resources Representative 4000 Public Relations Representative 4500 19 rows selected. Select Tablespaces on the Administration page. elapsed time: 00:00:07 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-23 . RMAN> @sol_04_02_07_02.rmn RMAN> backup as copy datafile 5 2> format '/u01/app/oracle/oradata/orcl/example01. Create an image copy of the datafile in the original location. 3.dbf tag=TAG20060324T13447 channel ORA_DISK_1: datafile copy complete. Log in to RMAN and connect to your target database. verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area. 2. Click Return to return to the Tablespaces page. Starting backup at 24-MAR-06 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=129 devtype=DISK channel ORA_DISK_1: starting datafile copy input datafile fno=00005 name=/u01/app/oracle/flash_recovery_area/ORCL/datafilef output filename=/u01/app/oracle/oradata/orcl/example01. Answer: 1. 6) Using Enterprise Manager Database Control. Select the Example tablespace and click View. 2. Answer: 7) Make a copy of the datafile in the original location and switch back to it.dbf'.

Recover the datafile. Starting recover at 24-MAR-06 using channel ORA_DISK_1 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=154 devtype=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Secure Backup starting media recovery media recovery complete. Bring the datafile back online.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile (continued) Finished backup at 24-MAR-06 Starting Control File and SPFILE Autobackup at 24-MAR-06 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/autobackup /2006_03_24/o1_E Finished Control File and SPFILE Autobackup at 24-MAR-06 RMAN> **end-of-file** 3. RMAN> recover datafile 5. Take the datafile offline. Exit from RMAN. Select Tablespace on the Administration page. elapsed time: 00:00:02 Finished recover at 24-MAR-06 6. Answer: 1. RMAN> sql 'alter database datafile 5 offline'. sql statement: alter database datafile 5 online 8) Use Enterprise Manager Database Control to verify the file.dbf" 5. RMAN> sql 'alter database datafile 5 online'. sql statement: alter database datafile 5 offline 4. RMAN> switch datafile 5 to copy. Switch to the new copy you made. datafile 5 switched to datafile copy "/u01/app/oracle/oradata/orcl/example01. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-24 .

Note that the datafile is the one you switched to. Click the Database tab to return to your database home page. 4. Select the EXAMPLE tablespace and click View.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile (continued) 2. 3. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-25 .

Answer: 1. change to the labs directory and execute the lab_04_03_02_01. Query V$CONTROLFILE.sh script. 1) Use SQL*Plus to view files information for the control files in your database.ctl' ORA-27041: unable to open file Linux Error: 2: No such file or directory r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-26 . NAME --------------------------------------------/u01/app/oracle/oradata/orcl/control01. Query the NAME column in V$CONTROLFILE. 2. Query the V$CONTROLFILE_RECORD_SECTION view.ctl /u01/app/oracle/oradata/orcl/control02. Exit from SQL*Plus.ctl /u01/app/oracle/oradata/orcl/control03. you recover your control file by using an autobackup. 2.sh Control files deleted [oracle@edrsr10p1 labs]$ 3) You need some more information about your control files. Log in to SQL*Plus as SYSDBA.ctl 2) Simulate a failure in your environment by executing the lab_04_03_02_01. Answer: 1.Solutions for Practice 4-3: Recover Control Files In this practice./lab_04_03_02_01.sh script to delete all your control files. Log in to SQL*Plus as SYSDBA. In your terminal window session. SQL> SELECT name FROM v$controlfile. [oracle@edrsr10p1 oracle]$ cd labs [oracle@edrsr10p1 labs]$ . 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. Answer: 1. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file. SQL> SELECT * FROM v$controlfile_record_section.

Answer: 1. 2005. Oracle. Oracle Database 10g: Backup and Recovery B-27 .1. Oracle.0. OLAP and Data Mining options [oracle@edrsr10p1 oracle]$ 2. [oracle@edrsr10p1 oracle]$ sqlplus / as sysdba SQL*Plus: Release 10.0 . Restart the instance in NOMOUNT mode.2.2. RMAN> connect target / connected to target database (not started) RMAN> ra O 3.0 . Use Recovery Manager to recover the control files.0.0 . OLAP and Data Mining options SQL> shutdown abort ORACLE instance shut down. Use SQL*Plus to shut down your instance.Production on Tue Mar 28 10:23:17 2006 Copyright (c) 1982. RMAN> startup nomount Oracle instance started Total System Global Area 285212672 bytes le c te In na r l& O I A s U O e ly n All rights reserved.Production on Tue Mar 28 10:20:26 2006 Copyright (c) 1982.0 . Use RMAN to connect to your target database. 2005.Solutions for Practice 4-3: Recover Control Files (continued) Additional information: 3 4) You have lost all your control files and will need to recover them from the control file autobackup.1.Production With the Partitioning.0. [oracle@edrsr10p1 oracle]$ rman Recovery Manager: Release 10.Pn With the Partitioning. Exit from your SQL*Plus session.2. Connected to: Oracle Database 10g Enterprise Edition Release 10.2. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.1. All rights reserved.

ctl Finished restore at 28-MAR-06 6. Restore the control file from the autobackup. Recover the database by issuing the RECOVER DATABASE command. database mounted released channel: ORA_DISK_1 7. RMAN> alter database mount. RMAN> restore controlfile from autobackup. r O cl a RMAN> recover database. RMAN> set dbid 1090770270.ctl output filename=/u01/app/oracle/oradata/orcl/control02. Set the database identifier.ctl output filename=/u01/app/oracle/oradata/orcl/control03. Starting recover at 28-MAR-06 Starting implicit crosscheck backup at 28-MAR-06 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=156 devtype=DISK Crosschecked 11 objects In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-28 . Starting restore at 28-MAR-06 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=156 devtype=DISK recovery area destination: /u01/app/oracle/flash_recovery_area database name (or database unique name) used for search: ORCL channel ORA_DISK_1: autobackup found in the recovery area channel ORA_DISK_1: autobackup found: /u01/app/oracle/flash_recovery_area/ORCL/p channel ORA_DISK_1: control file restore from autobackup complete output filename=/u01/app/oracle/oradata/orcl/control01. You recorded the database identifier in Practice 2-1. executing command: SET DBID 5. Mount the database.Solutions for Practice 4-3: Recover Control Files (continued) Fixed Size Variable Size Database Buffers Redo Buffers 1218992 109053520 171966464 2973696 bytes bytes bytes bytes 4. Note: Your database identifier will be a different value from that shown in the solution.

elapsed time: 00:00:02 In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-29 ... cataloging done List of Cataloged Files ======================= File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2006_0 3_28/o1_mfc File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2006_0 3_28/o1_mfc File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2006_0 3_28/o1_mfc File Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2006_0 3_27/o1_mfp using channel ORA_DISK_1 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=155 devtype=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Secure Backup r O cl a starting media recovery archive log thread 1 sequence 116 is already on disk as file /u01/app/oracle/flc archive log thread 1 sequence 117 is already on disk as file /u01/app/oracle/flc archive log thread 1 sequence 118 is already on disk as file /u01/app/oracle/flc archive log thread 1 sequence 119 is already on disk as file /u01/app/oracle/org archive log filename=/u01/app/oracle/flash_recovery_area/ORCL/archivel og/2006_06 archive log filename=/u01/app/oracle/flash_recovery_area/ORCL/archivel og/2006_07 archive log filename=/u01/app/oracle/flash_recovery_area/ORCL/archivel og/2006_08 archive log filename=/u01/app/oracle/oradata/orcl/redo01.Solutions for Practice 4-3: Recover Control Files (continued) Finished implicit crosscheck backup at 28-MAR-06 Starting implicit crosscheck copy at 28-MAR-06 using channel ORA_DISK_1 Crosschecked 5 objects Finished implicit crosscheck copy at 28-MAR-06 searching for all files in the recovery area cataloging files.log thread=1 sequence=9 media recovery complete.

Back up the current online redo log file and back up all the archived redo log files. Starting backup at 10-APR-06 current log archived allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=159 devtype=DISK channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=15 recid=53 stamp=587378250 input archive log thread=1 sequence=16 recid=54 stamp=587379659 input archive log thread=1 sequence=17 recid=55 stamp=587379860 input archive log thread=1 sequence=18 recid=56 stamp=587379970 input archive log thread=1 sequence=19 recid=57 stamp=587380091 input archive log thread=1 sequence=20 recid=58 stamp=587380115 input archive log thread=1 sequence=21 recid=59 stamp=587380409 input archive log thread=1 sequence=22 recid=65 stamp=587386310 input archive log thread=1 sequence=23 recid=66 stamp=587386310 input archive log thread=1 sequence=24 recid=67 stamp=587386311 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. using target database control file instead of recovery catalog sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT RMAN> backup archivelog all. database opened 9.Solutions for Practice 4-3: Recover Control Files (continued) Finished recover at 28-MAR-06 8. RMAN> alter database open resetlogs. elapsed time: 00:00:26 channel ORA_DISK_1: starting archive log backupset r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-30 . RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT'. Open the database with the RESETLOGS option.

dbf input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.dbf 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.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01. RMAN> backup database.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01. Starting backup at 10-APR-06 released channel: ORA_SBT_TAPE_1 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01. elapsed time: 00:01:25 Finished backup at 10-APR-06 Starting Control File and SPFILE Autobackup at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/autobackup /2006_04_10/o1_E r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-31 .Solutions for Practice 4-3: Recover Control Files (continued) channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=1 recid=68 stamp=587391539 input archive log thread=1 sequence=2 recid=69 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 Starting Control File and SPFILE Autobackup at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/autobackup /2006_04_10/o1_E Finished Control File and SPFILE Autobackup at 10-APR-06 10. Create a whole database backup.

Solutions for Practice 4-3: Recover Control Files (continued) Finished Control File and SPFILE Autobackup at 10-APR-06 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-32 .

-----. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-33 . r O 2. Answer: 1.-----------------. Answer: 1. RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 Report of obsolete backups and copies Type Key Completion Time Filename/Handle -------------------.Solutions for Practice 4-4: Delete Obsolete Backups 1) Use Recovery Manager to view obsolete backups. RMAN> report obsolete.------------------Archive Log 19 15-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 20 16-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 21 20-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 22 20-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 23 20-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 24 21-MAR-06 /u01/app/oracle/flash_recovery_ac Datafile Copy 4 21-MAR-06 /u01/app/oracle/flash_recovery_af Backup Set 5 21-MAR-06 Backup Piece 5 21-MAR-06 /u01/app/oracle/flash_recovery_ap Backup Set 7 22-MAR-06 Backup Piece 7 22-MAR-06 /u01/app/oracle/flash_recovery_ap Backup Set 9 22-MAR-06 Backup Piece 10 22-MAR-06 /u01/app/oracle/flash_recovery_ap 2) Use Enterprise Manager Database Control to delete obsolete backups. Note: Your results may vary from the following output. Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups. In your RMAN session. Invoke Enterprise Manager and log in as sys/oracle as SYSDBA. issue the REPORT OBSOLETE command to determine whether you have any obsolete backups.

Click Delete All Obsolete to remove obsolete backups. RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 no obsolete backups found r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-34 . In your RMAN session. You receive the “Job submission succeeded” message. 3) You can also use RMAN to verify that your obsolete backups were deleted. You can click View Job to monitor the job. RMAN> report obsolete. return to the Database Home page. 4. execute the REPORT OBSOLETE command. Access the Manage Current Backups page again to view the backup sets and image copies that were retained. 5. Review the information on the Delete All Obsolete: Specify Job Parameters page and click Submit Job. 6. After it completes successfully. Answer: 1.Solutions for Practice 4-4: Delete Obsolete Backups (continued) 3.

you use Oracle Flashback features to recover from errors in your database.Practice Solutions for Lesson 5 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-35 .

3. Scroll to the Flash Recovery section. 7. Supply the Host and Operating System credentials if they are not filled in by default. Click the Maintenance tab.flashback logging can be used for fast database point-in-time recovery” and click Apply.Solutions for Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database. Start Enterprise Manager and connect as SYS/ORACLE as SYSDBA. 6. Click OK. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-36 . Click Yes to restart the database instance. You must restart the database instance to enable Flashback Database. 4. Select “Enable Flashback Database . Select Recovery Settings in the Backup/Recovery Settings section. 2. The Confirmation message is displayed. 5. Answer: 1.

Solutions for Practice 5-1: Enable Flashback Database (continued)

8. The “Restart Database: Confirmation” page is displayed. Click Yes. 9. The “Restart Database:Activity Information” page is displayed. Wait a few minutes and click Refresh. 10. Log in to Enterprise Manager as SYS/ORACLE as SYSDBA. 2) Use the ALTER DATABASE command to enable supplemental logging. Answer: 1. In a terminal window, log in to SQL*Plus as SYSDBA.

[oracle@edrsr10p1 oracle]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 18 09:10:07 2006 Copyright (c) 1982, 2005, Oracle.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options

2. Execute the ALTER DATABASE command to enable supplemental logging.

ra O

SQL> ALTER DATABASE add supplemental log data; Database altered.

le c

te In

na r

l&

O

I A

s U

O e

ly n

All rights reserved.

Oracle Database 10g: Backup and Recovery B-37

Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table

Restore points are a way to “bookmark” database points in time. Set a restore point to 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 Go. 3. Select the HR.LOCATIONS table and click Edit.

4. Select the Options subtab.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-38

Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued) 5. Select Yes in the Enable Row Movement menu. Click Apply.

6. The Update Message is displayed indicating that the change has been made to the HR.LOCATIONS table. 7. Click the Database tab to return to the home page. 2) Create a normal restore point. Answer: 1. Select the Maintenance tab. 2. Select Manage Restore Points in the Backup/Recovery section. 3. Click Create on the Manage Restore Points page.

4. Enter Before_LOC_Update in the Restore Point Name field. Ensure that “Normal Restore Point” is selected. Click OK.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-39

Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued)

5. Your restore point has been created.

3) Use SQL*Plus to query the POSTAL_CODE column in the HR.LOCATIONS table. Answer: 1. Log in to SQL*Plus as SYSDBA.

2. Execute the lab_05_02_03_02.sql script to query the POSTAL_CODE column of the HR.LOCATIONS table.

r O

cl a
SQL> SQL> 2 3

In e

rn te

l& a

O

I A

s U

O e

ly n

@lab_05_02_03_02 SELECT unique (postal_code) FROM hr.locations /

POSTAL_CODE -----------10934 Oracle Database 10g: Backup and Recovery B-40

Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued)
YSW 9T2 2901 26192 M5V 2L7 01307-002 … 1730 3095 99236 80925 23 rows selected.

4) Execute the lab_05_02_04_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table so that all postal codes are set to 11111. Answer: 1. Execute the lab_05_02_04_01.sql script.
SQL> SQL> 2 3 @lab_05_02_04_01 UPDATE hr.locations SET postal_code = 11111 /

23 rows updated.

5) Execute the lab_05_02_05_01.sql script to query the POSTAL_CODE column in the HR.LOCATIONS table again. Answer: 1. Execute the lab_05_02_05_01.sql script.
SQL> SQL> 2 3 @lab_05_02_05_01 SELECT unique (postal_code) FROM hr.locations /

r O

6) Restore the POSTAL_CODE column values using the restore point. Answer: 1. Return to your Enterprise Manager session.

cl a

POSTAL_CODE -----------11111

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-41

Click “Perform Object Level Recovery. 4. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-42 . Click Perform Recovery.Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued) 2. 3. Click the database instance link to return to the Maintenance page. 5. Click Next. select Tables in the Object Type menu. In the “Object Level Recovery” section.” r O 6. Select “Flashback to a known SCN” and paste the SCN that you copied in step 2. Copy the SCN value in the Creation SCN field to the buffer.

8. Click Search.LOCATIONS table. Enter HR in the Schema Name field and LOCATIONS in the Table field. Click Add Tables to add the HR.Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued) 7. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-43 .

Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued) 9. Select the HR.LOCATIONS table and click OK.

10. The HR.LOCATIONS table is added to the “Tables to Flashback” field. Click Next.

11. Accept the default of “Cascade: Flashback the selected tables and all dependent tables” on the Dependency Options page. Click Next.

r O

12. On the “Perform Object Level Recovery: Review” page, confirm the information. Click Submit.

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-44

Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued)

13. The Confirmation page is displayed. Click OK to return to the Maintenance page.

7) Return to your SQL*Plus session. Execute the lab_05_02_07_01.sql script to query the POSTAL_CODE column in HR.LOCATIONS again to be sure the correct values have been restored. Answer: 1. Execute the lab_05_02_07_01.sql script.
SQL> SQL> 2 3 @lab_05_02_07_01 SELECT unique (postal_code) FROM hr.locations /

r O

cl a

POSTAL_CODE -----------10934 YSW 9T2 … 99236 80925

In e

rn te

l& a

O

I A

s U

O e

ly n

23 rows selected.

Oracle Database 10g: Backup and Recovery B-45

Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query
1) Execute the lab_05_03_01_01.sql script to query the HR.LOCATIONS table for location ID 1400. Answer: 1. In SQL*Plus, execute the lab_05_03_01_01.sql script.
SQL> SQL> 2 3 4 @lab_05_03_01_01 SELECT * FROM hr.locations WHERE location_id = 1400 /

LOCATION_ID STREET_ADDRESS POSTAL_CODE ----------- ---------------------------------------- ----------CITY STATE_PROVINCE CO ------------------------------ ------------------------- 1400 2014 Jabberwocky Rd 26192 Southlake Texas US

2) Execute the lab_05_03_02_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table, simulating user error. Answer: 1. Invoke SQL*Plus and execute the lab_05_03_02_01.sql script.
SQL> SQL> 2 3 4 @lab_05_03_02_01 UPDATE hr.locations SET postal_code = postal_code + 100 WHERE location_id = 1400 /

1 row updated.

r O

cl a

SQL> commit 2 /

Commit complete.

In e

rn te

l& a

O

I A

s U

O e

ly n

3) Execute the lab_05_03_03_01.sql script to query the POSTAL_CODE column in HR.LOCATIONS and view the change.

Oracle Database 10g: Backup and Recovery B-46

Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) Answer: 1. Execute the lab_05_03_03_01.sql script.
SQL> SQL> 2 3 4 @lab_05_03_03_01 SELECT * FROM hr.locations WHERE location_id = 1400 /

LOCATION_ID STREET_ADDRESS POSTAL_CODE ----------- ---------------------------------------- ----------CITY STATE_PROVINCE CO ------------------------------ ------------------------- 1400 2014 Jabberwocky Rd 26292 Southlake Texas US

4) Execute the lab_05_03_04_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table, simulating user error. Answer: 1. Execute the lab_05_03_04_01.sql script.
SQL> SQL> 2 3 4 @lab_05_03_04_01 UPDATE hr.locations SET postal_code = postal_code + 100 WHERE location_id = 1400 /

1 row updated. SQL> commit 2 /

Commit complete.

5) Use Enterprise Manager to perform Flashback Versions Query to correct the user errors.

r O

Answer:

1. Navigate to the Administration page. 2. Select Tables in the Database Objects section.

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-47

Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 3. Enter HR in the Schema Name field and LOCATIONS in the Table field. Click Go. 4. Select the HR.LOCATIONS table. Select Flashback Versions Query in the Actions menu. Click Go.

5. Choose all the columns by selecting each in the Available Columns list and clicking Move to move it to the Selected Columns list.

r O

6. Enter “where location_id = 1400” in the “Bind the Row Value” field. Click Next.

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-48

Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 7. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-49 . Select the oldest change to the table and click Next.

Click OK. 11. SQL> SQL> 2 3 @lab_05_03_06_01 SELECT * FROM hr. Answer: 1. Execute the lab_05_03_06_01. Query the HR.” Click Next. Review the information. 6) Return to your SQL*Plus session.LOCATIONS table. 9.Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 8.locations WHERE location_id = 1400 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-50 .LOCATIONS table to confirm the Flashback operation. Click Submit. 10.sql script to query the HR. Confirm the flashback information. Accept the default of “Cascade: Flashback the selected tables and all dependent tables. The Confirmation page is displayed. Click Next.

---------------------------------------.------------------------.1400 2014 Jabberwocky Rd 26192 Southlake Texas US r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-51 .Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 4 / LOCATION_ID STREET_ADDRESS POSTAL_CODE ----------.----------CITY STATE_PROVINCE CO -----------------------------.

3. Click Create to create a new restore point. Navigate to the Maintenance page. Verify that Flashback Database is enabled. Answer: 1. 2. 2) Use Enterprise Manager to create a Guaranteed Restore Point. Select “Guaranteed Restore Point. 3. 2. Select Recovery Settings in the Backup/Recovery Settings section. Select Manage Restore Points in the Backup/Recovery section. Scroll to the Flash Recovery section.Solutions for Practice 5-4: Use Flashback Database 1) Use Enterprise Manager to verify that Flashback Database is enabled. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-52 . Click the Database Instance link to return to the Maintenance page. Enter “Before_Truncate” in the Restore Point Name field.” Click OK. Answer: 1.

sql script to determine the number of rows in the HR.JOB_HISTORY table. Record the number of rows: ___________ Answer: 1. Execute the lab_05_04_03_01. r O cl a SQL> SQL> 2 3 In e @lab_05_04_03_01 SELECT count(*) FROM hr.JOB_HISTORY table.Solutions for Practice 5-4: Use Flashback Database (continued) 4.sql script to determine the number of rows in the HR. The Restore Point is created.job_history / rn te l& a O I A s U O e ly n COUNT(*) ---------10 Oracle Database 10g: Backup and Recovery B-53 . 3) Execute the lab_05_04_03_01.

3.JOB_HISTORY table.Solutions for Practice 5-4: Use Flashback Database (continued) 4) Execute the lab_05_04_04_01.job_history / COUNT(*) ---------0 6) Use Flashback Database to restore the HR. 4.” r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-54 .JOB_HISTORY table rows. Answer: 1. Execute the lab_05_04_05_01.sql script. 5) Execute the lab_05_04_05_01. Return to your Enterprise Manager window. Answer: 1.sql script. Navigate to the Maintenance page. Click “Recover Whole Database To.sql script to determine the number of rows in the HR.JOB_HISTORY table. SQL> @lab_05_04_04_01 SQL> truncate table hr. Execute the lab_05_04_04_01. Answer: 1. 2. SQL> SQL> 2 3 @lab_05_04_05_01 SELECT count(*) FROM hr. Select the BEFORE_TRUNCATE restore point.sql script to truncate the HR.job_history 2 / Table truncated. Select Manage Restore Points in the Backup/Recovery section.

Solutions for Practice 5-4: Use Flashback Database (continued) 5. Click Yes. 7. Click Refresh. Enter Database login. The database is shut down. Click Continue. Enter the host credential information. 9. 8. Click Login. Click Perform Recovery. Enter Host Credentials. 6. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-55 .

” 11. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-56 . Select “Recover to a prior point in time. 13. Select Restore Point and click the Flashlight icon.” 12. Click Select.Solutions for Practice 5-4: Use Flashback Database (continued) 10. Click “Perform Whole Database Recovery. Select the BEFORE_TRUNCATE restore point.

15. Click Next. Click Next. Select Yes. The Restore Point field is populated.Solutions for Practice 5-4: Use Flashback Database (continued) 14. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-57 .

18. Click Submit. Execute the lab_05_04_07_02. You can scroll through the output to view the details of the operation. Review the information.Solutions for Practice 5-4: Use Flashback Database (continued) 16. Click OK. Execute the lab_05_04_07_02. The “Processing: Perform Whole Database Recovery” page is displayed. 17. r O cl a SQL> @query_job_hist SQL> SELECT count(*) 2 FROM hr. Invoke SQL*Plus and log in as SYS/ORACLE as SYSDBA. Click “Open Database” to open the database. 19.JOB_HISTORY table again to be sure the data has been restored. The “The database has been opened successfully” message is displayed. 7) Return to your SQL*Plus session. The operation is complete. 2.sql script to query the HR. Answer: 1.job_history 3 / COUNT(*) ---------10 In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-58 .sql script.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-59 .Practice Solutions for Lesson 6 In this practice. you create a duplicate database.

dat init.ora 2) Use Oracle Net Manager to create an entry called AUXDB in the tnsnames.ora lkORCL orapworcl spfileorcl. Specify a password of oracle and 10 for the number of entries. 4. [oracle@edrsr10p1 oracle]$ cd $ORACLE_HOME/dbs [oracle@edrsr10p1 dbs]$ orapwd file=orapwaux password=oracle entries=10 [oracle@edrsr10p1 dbs]$ ls hc_orcl. Change to the $ORACLE_HOME/dbs directory and use the orapwd utility to create a password file named orapwaux. Open a terminal window and enter netmgr at the operating system prompt. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-60 . Answer: 1. Expand Local and Service Naming. [oracle@edrsr10p1 oracle]$ netmgr 2.f initdw. 1.Solutions for Practice 6-1: Create a Duplicate Database 1) Create an Oracle password file for your auxiliary instance. 3. The Oracle Net Manager window appears. you use RMAN to create a duplicate database on the same host as your database.ora file.ora orapwaux snapcf_orcl. Select Service Naming and click the green plus sign to create a new Net service name. Answer: In this practice.

Click Next.Solutions for Practice 6-1: Create a Duplicate Database (continued) 5. 6. Click Next. Select TCP/IP (default) as the protocol. Enter the host name of your PC in the Host Name field. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-61 . Accept the default of 1521 for the port number. Enter auxdb in the Net Service Name field and click Next. 7.

2. Click File and Exit to exit from Oracle Net Manager. 10. r O 11. Oracle Database 10g: Backup and Recovery B-62 cl a In e rn te l& a O I A s U O e ly n .com in the Service Name field.ora file in the /u01/app/oracle/product/10. You can view your updated tnsnames. 12.0/db_1/network/admin directory.oracle. Click Next. Select File and Save Network Configuration to save the changes you made. 9. Click Finish. Enter aux.Solutions for Practice 6-1: Create a Duplicate Database (continued) 8.

2.Production With the Partitioning. Edit the initAUX. OLAP and Data Mining options SQL> create pfile='$HOME/auxinstance/initAUX. 2005.Solutions for Practice 6-1: Create a Duplicate Database (continued) AUXDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = edrsr10p1. ‘/u01/app/oracle/oradata/aux’ LOG_FILE_NAME_CONVERT=‘/u01/app/oracle/oradata/orcl’.ctl'.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = aux. ‘/u01/app/oracle/oradata/aux’ Remove the lines at the beginning of the file that begin with orcl.'/u01/app/oracle/oradata/aux/control02. [oracle@edrsr10p1 oracle]$ cd $HOME/auxinstance [oracle@edrsr10p1 auxinstance]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.us.oracle.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.oracle.__.ora' from spfile. File created.1.c tl'.ctl' db_name='aux' user_dump_dest='/u01/app/oracle/admin/aux/udump' r O cl a Add the following parameters: DB_FILE_NAME_CONVERT=‘/u01/app/oracle/oradata/orcl’.ora from your server parameter file in the $HOME/auxinstance directory.'/u01/ app/oracle/oradata/aux/control03. Answer: 1.1.0 .0. All rights reserved. Oracle Database 10g: Backup and Recovery B-63 In e rn te l& a O I A s U O e ly n .Production on Wed Mar 29 10:51:53 2006 Copyright (c) 1982. 2.com) ) 3) Create an initialization parameter file for the auxiliary instance. Connected to: Oracle Database 10g Enterprise Edition Release 10. Oracle. Create a text initialization parameter file named initAUX.0 .

ora file.ora' ORACLE instance started.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' 4) Start the auxiliary instance in NOMOUNT mode using the initAUX. 3. 2005. SQL> startup nomount pfile='$HOME/auxinstance/initAUX.1. Answer: 1. SQL> create spfile from pfile='$HOME/auxinstance/initAUX. All rights reserved. to this line: *.ora'. #. Set the ORACLE_SID environment variable to aux. Oracle. [oracle@edrsr10p1 oracle]$ ORACLE_SID=aux [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID aux 2. Create a server parameter file with the default name of spfileaux. [oracle@edrsr10p1 oracle]$ sqlplus / as sysdba SQL*Plus: Release 10. cl a File created.Production on Wed Mar 29 11:38:53 2006 Copyright (c) 1982. Answer: Oracle Database 10g: Backup and Recovery B-64 . Connected to an idle instance.0. Total System Global Area Fixed Size Variable Size Database Buffers Redo Buffers 285212672 1218992 92276304 188743680 2973696 bytes bytes bytes bytes bytes 5) Create a server parameter file (SPFILE).ora from the text initialization parameter file. Answer: 1.Solutions for Practice 6-1: Create a Duplicate Database (continued) Add the comment character.0 . Exit from SQL*Plus. Invoke SQL*Plus and connect as SYSDBA. In e rn te l& a O I A s U O e ly n 6) Verify that your target database (orcl database) is mounted or open.2. r O 2. Start the instance in NOMOUNT mode using the initialization parameter file you created in step 2.

2005. Connect to the target database. s U O e ly n Oracle Database 10g: Backup and Recovery B-65 . Exit from SQL*Plus. RMAN> connect auxiliary sys/oracle connected to auxiliary database: AUX (not mounted) RMAN> connect target sys/oracle@orcl connected to target database: ORCL (DBID=1090770270) 8) Create the duplicate database by executing the DUPLICATE command.0. [oracle@edrsr10p1 oracle]$ ORACLE_SID=aux [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID aux [oracle@edrsr10p1 oracle]$ rman Recovery Manager: Release 10. SQL> select open_mode from v$database. Invoke RMAN and connect as SYSDBA.0 .Solutions for Practice 6-1: Create a Duplicate Database (continued) 1. RMAN> run 2> { cl a In e rn te l& a O I A All rights reserved. Set your ORACLE_SID to orcl. OPEN_MODE ---------READ WRITE 4. Answer: 1. Log in to SQL*Plus as SYSDBA. Answer: r O 1. [oracle@edrsr10p1 oracle]$ ORACLE_SID=orcl [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID orcl [oracle@edrsr10p1 oracle]$ 2.1. 7) Start RMAN with a connection to the target database (orcl) and the auxiliary instance. Set your ORACLE_SID to aux. 3. Query V$DATABASE to determine whether your database is open.2. Oracle. Create a RUN block to allocate the auxiliary channel and execute the DUPLICATE command.Production on Thu Mar 30 07:34:06 2006 Copyright (c) 1982.

Solutions for Practice 6-1: Create a Duplicate Database (continued) 3> allocate auxiliary channel aux1 device type disk.dbf". set newname for datafile 5 to "/u01/app/oracle/oradata/aux/example01. set newname for datafile 2 to "/u01/app/oracle/oradata/aux/undotbs01.dbf".dbf". restore check readonly clone database .dbf". 5> } allocated channel: aux1 channel aux1: sid=156 devtype=DISK Starting Duplicate Db at 30-MAR-06 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=154 devtype=DISK using channel ORA_AUX_SBT_TAPE_1 contents of Memory Script: { set until scn 4236965. set newname for datafile 4 to "/u01/app/oracle/oradata/aux/users01. } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 30-MAR-06 using channel ORA_AUX_DISK_1 using channel ORA_AUX_SBT_TAPE_1 channel aux1: restoring datafile 00001 input datafile copy recid=23 stamp=586270526 filename=/u01/app/oracle/flash_recf destination for restore of datafile 00001: /u01/app/oracle/oradata/aux/system01f channel ORA_AUX_DISK_1: restoring datafile 00002 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-66 .dbf". 4> duplicate target database to aux. set newname for datafile 3 to "/u01/app/oracle/oradata/aux/sysaux01. set newname for datafile 1 to "/u01/app/oracle/oradata/aux/system01.

log' ) SIZE 50 M REUSE.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.Solutions for Practice 6-1: Create a Duplicate Database (continued) input datafile copy recid=20 stamp=586270521 filename=/u01/app/oracle/flash_recf destination for restore of datafile 00002: /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. GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02.log' ) SIZE 50 M REUSE.dbf channel ORA_AUX_DISK_1: copied datafile copy of datafile 00005 output filename=/u01/app/oracle/oradata/aux/example01.dbf channel ORA_AUX_DISK_1: restoring datafile 00005 input datafile copy recid=21 stamp=586270521 filename=/u01/app/oracle/flash_recf destination for restore of datafile 00005: /u01/app/oracle/oradata/aux/example0f channel aux1: copied datafile copy of datafile 00004 output filename=/u01/app/oracle/oradata/aux/users01.dbf Finished restore at 30-MAR-06 sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/aux/redo01.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/aux/system01.dbf channel aux1: restoring datafile 00004 input datafile copy recid=19 stamp=586270517 filename=/u01/app/oracle/flash_recf destination for restore of datafile 00004: /u01/app/oracle/oradata/aux/users01. GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03.f channel ORA_AUX_DISK_1: copied datafile copy of datafile 00003 output filename=/u01/app/oracle/oradata/aux/sysaux01.dbf' CHARACTER SET AL32UTF8 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-67 .

} executing Memory Script released channel: ORA_AUX_DISK_1 released channel: ORA_AUX_SBT_TAPE_1 datafile 2 switched to datafile copy input datafile copy recid=1 stamp=586438014 filename=/u01/app/oracle/oradata/auf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=586438014 filename=/u01/app/oracle/oradata/auf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=586438014 filename=/u01/app/oracle/oradata/auf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=586438014 filename=/u01/app/oracle/oradata/auf contents of Memory Script: { set until scn 4236965. recover clone database delete archivelog .f destination for restore of datafile 00005: /u01/app/oracle/oradata/aux/example0f channel aux1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCp channel aux1: restored backup piece 1 In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-68 . } executing Memory Script executing command: SET until clause r O cl a Starting recover at 30-MAR-06 channel aux1: starting incremental datafile backupset restore channel aux1: specifying datafile(s) to restore from backup set destination for restore of datafile 00001: /u01/app/oracle/oradata/aux/system01f destination for restore of datafile 00002: /u01/app/oracle/oradata/aux/undotbs0f destination for restore of datafile 00003: /u01/app/oracle/oradata/aux/sysaux01f destination for restore of datafile 00004: /u01/app/oracle/oradata/aux/users01.Solutions for Practice 6-1: Create a Duplicate Database (continued) contents of Memory Script: { switch clone datafile all.

GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02. elapsed time: 00:00:05 Finished recover at 10-APR-06 contents of Memory Script: { shutdown clone.Solutions for Practice 6-1: Create a Duplicate Database (continued) piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/ 2006_03_28/o1_m4 channel aux1: restore complete.log' ) SIZE 50 M REUSE. GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03. } executing Memory Script database dismounted Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area 285212672 bytes r O cl a Fixed Size 1218992 bytes Variable Size 92276304 bytes Database Buffers 188743680 bytes Redo Buffers 2973696 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/aux/redo01. startup clone nomount .log' ) SIZE 50 M REUSE DATAFILE In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-69 . elapsed time: 00:00:16 starting media recovery archive log thread 1 sequence 1 is already on disk as file /u01/app/oracle/flasc archive log thread 1 sequence 2 is already on disk as file /u01/app/oracle/flasc archive log filename=/u01/app/oracle/flash_recovery_area/ORCL/archivel og/2006_01 archive log filename=/u01/app/oracle/flash_recovery_area/ORCL/archivel og/2006_02 media recovery complete.log' ) SIZE 50 M REUSE.

dbf recid=4 stamp=9 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/example02.dbf in control fe cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/undotbs01. catalog clone datafilecopy "/u01/app/oracle/oradata/aux/example02. switch clone tempfile all.dbf". } executing Memory Script executing command: SET NEWNAME renamed temporary file 1 to /u01/app/oracle/oradata/aux/temp01.dbf".dbf recid=2 stamp=59 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/users01.dbf".dbf recid=3 stamp=589 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/example01.Solutions for Practice 6-1: Create a Duplicate Database (continued) '/u01/app/oracle/oradata/aux/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/aux/temp01. catalog clone datafilecopy "/u01/app/oracle/oradata/aux/example01. catalog clone datafilecopy "/u01/app/oracle/oradata/aux/sysaux01. catalog clone datafilecopy "/u01/app/oracle/oradata/aux/users01.dbf". switch clone datafile all. catalog clone datafilecopy "/u01/app/oracle/oradata/aux/undotbs01.dbf".dbf recid=5 stamp=9 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-70 .dbf recid=1 stamp=8 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/sysaux01.dbf".

REGIONS table. 2. shut down the aux instance. Log in to SQL*Plus as SYSDBA and execute a query against the HR. After the DUPLICATE DATABASE operation completes.Solutions for Practice 6-1: Create a Duplicate Database (continued) datafile 2 switched to datafile copy input datafile copy recid=1 stamp=587391888 filename=/u01/app/oracle/oradata/auf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=587391889 filename=/u01/app/oracle/oradata/auf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=587391889 filename=/u01/app/oracle/oradata/auf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=587391889 filename=/u01/app/oracle/oradata/auf datafile 6 switched to datafile copy input datafile copy recid=5 stamp=587391889 filename=/u01/app/oracle/oradata/auf contents of Memory Script: { Alter clone database open resetlogs. Verify that ORACLE_SID is set to aux. Answer: 1. 9) Use SQL*Plus to log in to your AUX database and execute a query against the HR.REGIONS table. SQL> shutdown immediate Oracle Database 10g: Backup and Recovery B-71 cl a In e REGION_NAME ------------------------Europe Americas Asia Middle East and Africa rn te l& a O I A s U O e ly n . SQL> select * from hr. Connect as SYSDBA and execute the SHUTDOWN IMMEDIATE command. } executing Memory Script database opened Finished Duplicate Db at 10-APR-06 2. REGION_ID ---------1 2 3 4 r O 10) Now that you have completed the test recovery by creating a duplicate database.regions. Answer: 1. exit from RMAN.

[oracle@edrsr10p1 oracle]$ ORACLE_SID=orcl [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID orcl r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-72 . At the operating prompt. ORACLE instance shut down.Solutions for Practice 6-1: Create a Duplicate Database (continued) Database closed. Database dismounted. enter ORACLE_SID=orcl to change your ORACLE_SID. Answer: 1. Exit from SQL*Plus. 11) Change your ORACLE_SID to orcl in preparation for later practices. SQL> 2.

you use tablespace point-in-time recovery to recover from unwanted changes to your database.Practice Solutions for Lesson 7 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-73 .

Oracle. In a terminal window. r O cl a Connected to: Oracle Database 10g Enterprise Edition Release 10.sh script to export the HR schema.. 12 April. [oracle@edrsr10p1 labs]$ .0.0 ."COUNTRIES" 6.. Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 448 KB Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE 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 Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE Processing object type SCHEMA_EXPORT/VIEW/VIEW Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/TRIGGER Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS .0 . change to the labs directory and execute the lab_07_01_01_01.Production on Wednesday. All rights reserved.0. OLAP and Data Mining options tarting "SYSTEM".085 KB 25 rows In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-74 .Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery 1) Execute the lab_07_01_01_01.sh Export: Release 10.dmp sr Estimate in progress using BLOCKS method.Produn With the Partitioning.sh script to export the HR schema.1.1. 2005. .2. exported "HR"./lab_07_01_01_01.2."SYS_EXPORT_SCHEMA_01": system/******** dumpfile=hrexp. Answer: 1. 2006 13:03:27 Copyright (c) 2003.

.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) .sql script to create the HRTEST tablespace and the HRTEST user. ."DEPARTMENTS" 6. . . exported "HR". exported "HR". exported "HR"."REGIONS" 5. In your terminal window. Tablespace created.632 KB 27 rows .sql script to create a new tablespace and a new user in your database."LOCATIONS" 7.289 KB 4 rows Master table "SYSTEM". SQL> @lab_07_01_02_02 SQL> SET TERMOUT ON SQL> CONNECT / AS SYSDBA Connected.76 KB 107 rows . Execute the lab_07_01_02_02."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ********************************************************** ******************** Dump file set for SYSTEM."JOB_HISTORY" 6.2. . log in to SQL*Plus as SYSDBA. Answer: 1."SYS_EXPORT_SCHEMA_01" successfully completed at 13:03:44 2) Execute the lab_07_01_02_02.609 KB 19 rows . 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 Oracle Database 10g: Backup and Recovery B-75 r O cl a In e rn te l& a O I A s U O e ly n .0/db_1/rdbms/log/hrexp. exported "HR"."JOBS" 6. 2.dmp Job "SYSTEM". .585 KB 10 rows .dbf' SIZE 10M 3 AUTOEXTEND ON NEXT 500K MAXSIZE UNLIMITED LOGGING 4 EXTENT MANAGEMENT LOCAL 5 SEGMENT SPACE MANAGEMENT AUTO.710 KB 23 rows . exported "HR". exported "HR"."EMPLOYEES" 15.SYS_EXPORT_SCHEMA_01 is: /u01/app/oracle/product/10. SQL> REM ***** Tablespace for the HR import ***** SQL> CREATE SMALLFILE TABLESPACE HRTEST 2 DATAFILE '/u01/app/oracle/oradata/orcl/hrtest01.

REGIONS.Produn With the Partitioning. Answer: 1.1."DEPARTMENTS" 6. 2006 7:08:42 Copyright (c) 2003. User created.2. Note: The import should complete successfully.Production on Friday. All rights reserved.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 6 7 8 QUOTA UNLIMITED ON hrtest ACCOUNT UNLOCK . and LOCATIONS tables. execute the lab_07_01_03_01. imported "HRTEST". [oracle@edrsr10p1 labs]$ . SQL> GRANT connect.0 . 14 April.2. r O cl a Connected to: Oracle Database 10g Enterprise Edition Release 10. OLAP and Data Mining options Master table "SYSTEM". ./lab_07_01_03_01.sh script to populate the new tablespace with a copy of the data from the HR schema. 3) Execute the lab_07_01_03_01. In your terminal window at the operating system prompt.0 . You will receive error messages because the import excludes the COUNTRIES."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM".0.1. These messages can be ignored.sh script.0. resource 2 TO hrtest. Grant succeeded.sh Import: Release 10.632 KB 27 rows In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-76 . Oracle. 2005.dmp par Processing object type SCHEMA_EXPORT/USER ORA-31684: Object type USER:"HRTEST" already exists Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA ."SYS_IMPORT_FULL_01": system/******** dumpfile=hrexp.

2. Answer: 1."JOB_HISTORY" 6."SYS_IMPORT_FULL_01" completed with 3 error(s) at 07:08:54 4) Create a backup of your database using RMAN. . Starting backup at 14-APR-06 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=127 devtype=DISK channel ORA_DISK_1: starting full datafile backupset In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-77 . imported "HRTEST"."EMP_DETAILS_VIEW" created with compilatios Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT ORA-39083: Object type REF_CONSTRAINT failed to create with error: ORA-00942: table or view does not exist Failing sql is: ALTER TABLE "HRTEST". imported "HRTEST"."EMPLOYEES" 15.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) ."DEPARTMENTS" ADD CONSTRAINT "DEPT_LOC_FK" FOREIGN KEY ("LE Processing object type SCHEMA_EXPORT/TABLE/TRIGGER Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYSTEM". Invoke RMAN and connect to your target database."JOBS" 6. .76 KB 107 rows . . Execute the BACKUP DATABASE command. imported "HRTEST". r O cl a RMAN> backup database.609 KB 19 rows .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 Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE Processing object type SCHEMA_EXPORT/VIEW/VIEW ORA-39082: Object type VIEW:"HRTEST".

dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01. r O Answer: 1. [oracle@edrsr10p1 labs]$ date Fri Apr 14 13:07:57 PDT 2006 cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-78 .Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01. Query the CURRENT_SCN column in V$DATABASE and record the current SCN. CURRENT_SCN ----------4725352 6) Record the current time.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=00007 name=/u01/app/oracle/oradata/orcl/hrtest01. elapsed time: 00:01:35 Finished backup at 14-APR-06 Starting Control File and SPFILE Autobackup at 14-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/autobackup /2006_04_14/o1_E Finished Control File and SPFILE Autobackup at 14-APR-06 5) Record the current SCN: ____________ Answer: 1. Invoke SQL*Plus as SYSDBA.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02. Execute the date command at the operating system prompt.dbf channel ORA_DISK_1: starting piece 1 at 14-APR-06 channel ORA_DISK_1: finished piece 1 at 14-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/ 2006_04_14/o1_mE channel ORA_DISK_1: backup set complete.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01. 2. SQL> select current_scn from V$database.

Make note of the highest salary that is displayed: ________ Answer: 1.---------Hunold 11250 Ernst 7500 Austin 6000 Pataballa 6000 Lorentz 5250 rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-79 . SQL> select employee_id. Highest salary: _____________ Answer: 1.employees set salary = salary * 1. last_name.---------Hunold 9000 Ernst 6000 Austin 4800 Pataballa 4800 Lorentz 4200 EMPLOYEE_ID ----------103 104 105 106 107 8) Execute the lab_07_01_08_01.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 7) Execute the lab_07_01_07_01.sql script.EMPLOYEES table and view information about employees in department 60.25 where department_id = 60 / 5 rows updated. SQL> SQL> 2 3 4 @lab_07_01_08_01 update hrtest.sql script. salary 2 from hrtest. SQL> SQL> 2 3 4 @lab_07_01_07_01 select employee_id. last_name. Execute the lab_07_01_07_01. salary from employees where department_id = 60 / LAST_NAME SALARY ------------------------.employees 3 where department_id = 60 4 / EMPLOYEE_ID ----------103 104 105 106 107 r O cl a In e LAST_NAME SALARY ------------------------. Execute the lab_07_01_08_01.sql script to update the salaries for the employees in department 60 and note the highest salary displayed.sql script to query the HRTEST.

Answer: The answer presents the solution using Enterprise Manager Database Control. 1. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-80 . obj1_name.sql script. Execute the lab_07_01_09_01. reason FROM SYS. obj1_type. Accept the default selection “Recover to current time or a previous point-in-time. 2. Execute the lab_07_01_09_01.sql script to determine whether there are any dependencies that will prevent the TSPITR operation. ts2_name. obj2_owner. 3. SQL> SQL> 2 3 4 5 6 7 8 9 @lab_07_01_09_01 SELECT obj1_owner. Select Perform Recovery in the Backup/Recovery section. Select Tablespaces in the Object Level Recovery section. 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’.TS_PITR_CHECK WHERE (TS1_NAME IN ('HRTEST') AND TS2_NAME NOT IN ('HRTEST')) OR (TS1_NAME NOT IN ('HRTEST') AND TS2_NAME IN ('HRTEST')) / no rows selected “No rows selected” indicates that there are no dependencies to any tablespaces outside of the recovery set. If you want to use RMAN command line. 4. ts1_name.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 9) You now want to perform TSPITR for the HRTEST tablespace to return it to the state prior to the updates. Invoke Enterprise Manager Database Control and log in as SYS/ORACLE as SYSDBA. constraint_name. Answer: 1. obj2_name. so you can proceed with the tablespace point-in-time recovery. The page refreshes. 10) You can use Enterprise Manager Database Control or RMAN command line to perform tablespace point-in-time recovery. obj2_type. Select the Maintenance page.” Click Perform Object Level Recovery.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-81 . Click Next.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 5. Select “Recover to a prior point-in-time” and specify the SCN you recorded earlier.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-82 .Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 6. Specify the auxiliary instance location of /u01/app/oracle/oradata/tspitr. Click Add to select the tablespace. Select the HRTEST tablespace. 7. Click Select.

Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 8. Select the HRTEST tablespace and click Next.

9. Accept “No. Restore the files to the default location.” On the Perform Object Level Recovery: Rename page. Click Next.

10. Review the information and click Submit.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-83

Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued)

11. The “Processing: Perform Object Level Recovery” page is displayed. 12. After the recovery completes, the “Perform Recovery: Result” page is displayed. You can review the TSPITR operation by scrolling through the output window.

13. Click OK.

r O

11) Verify that the HRTEST tablespace is online. Answer: 1. In Enterprise Manager Database Control, navigate to the Administration page.

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-84

Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 2. Select Tablespaces and view the status of the HRTEST tablespace.

12) Verify that the SALARY columns in HRTEST.EMPLOYEES for the employees in department 60 contain the correct values. Answer: 1. Invoke SQL*Plus and execute the lab_07_01_12_01.sql script.
SQL> SQL> 2 3 4 @lab_07_01_12_01 select employee_id, last_name, salary from hrtest.employees where department_id = 60 / LAST_NAME SALARY ------------------------- ---------Hunold 9000 Ernst 6000 Austin 4800 Pataballa 4800 Lorentz 4200

EMPLOYEE_ID ----------103 104 105 106 107

2. The highest salary value should be back to the original value you recorded in step 7. 13) Execute the lab_07_01_13_02.sql script to add a constraint to the HRTEST.DEPARTMENTS table. Answer: 1. Invoke SQL*Plus and connect as SYSDBA. 2. Execute the lab_07_01_13_02.sql script.

r O

cl a

SQL> @lab_07_01_13_02 SQL> connect / as sysdba Connected. SQL> GRANT references (location_id) on hr.locations to hrtest 2 /

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-85

Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued)
Grant succeeded. SQL> connect hrtest/hrtest Connected. SQL> ALTER TABLE hrtest.departments 2 ADD CONSTRAINT dept_loc_id_fk FOREIGN KEY (location_id) 3 REFERENCES hr.locations (location_id) 4 / Table altered.

14) Assume you need to perform TSPITR on the HRTEST tablespace again. Execute the lab_07_01_14_02.sql query to determine whether there are any dependencies outside the recovery set. Answer: 1. Invoke SQL*Plus and connect as SYSDBA. 2. Execute the lab_07_01_14_02.sql script.
SQL> @lab_07_01_14_02 SQL> set echo on 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') 6 AND TS2_NAME NOT IN ('HRTEST')) 7 OR (TS1_NAME NOT IN ('HRTEST') 8 AND TS2_NAME IN ('HRTEST')) 9 / OBJ1_OWNER OBJ1_NAME OBJ1_TYPE TS1_NAME --------------------------------------------------------OBJ2_OWNER OBJ2_NAME OBJ2_TYPE TS2_NAME ------------------------------ -------------------------CONSTRAINT_NAME REASON -----------------------------HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_LOC_ID_FK constraint between tables not contained in recovery set

r O

cl a

HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_MGR_FK constraint between tables not contained in recovery set HR HRTEST LOCATIONS TABLE DEPARTMENTS TABLE EXAMPLE HRTEST

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-86

Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued)
DEPT_ID_PK constraint between tables not contained in recovery set HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_NAME_NN constraint between tables not contained in recovery set

15) If you wanted to complete the tablespace point-in-time recovery for the HRTEST tablespace now, what would you need to do? Note: You will not perform another tablespace point-in-recovery in this practice. Answer: You would need to disable the DEPT_LOC_ID_FK constraint that was added to your HRTEST.DEPARTMENTS table or you would need to add the tablespace that contains the HR.LOCATIONS table to your recovery set.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-87

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-88 .Practice Solutions for Lesson 8 In this practice. you create a recovery catalog in your instructor’s database and register your database in the recovery catalog.

1) Connect to the recovery catalog database (instructor’s database) with the appropriate recovery catalog owner name (if you are using PC01. 2005. Oracle.1. Create the recovery catalog in your assigned tablespace. Answer: [oracle@edrsr10p1 oracle]$ rman target / catalog rcuser10/rcuser10@rcdb Recovery Manager: Release 10. connect as RCUSER01) using RMAN.1.0 . All rights reserved.0.2. (If you are using PC01. 2) Using RMAN. 2005. connect to your target database and the recovery catalog database.0 .2. The users are named RCUSER01 – RCUSER12. The tablespaces are named RCTS01 – RCTS12. Oracle Database 10g: Backup and Recovery B-89 . What happens? Why? cl a connected to target database: ORCL (DBID=1090770270) connected to recovery catalog database RMAN> In e rn te l& a O I A s U O e ly n All rights reserved. Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database connected to recovery catalog database RMAN> create catalog recovery catalog created RMAN> exit Recovery Manager complete.Production on Thu Mar 16 13:58:52 2006 Copyright (c) 1982.) The service name is RCDB.0. r O 3) Using RMAN. your assigned tablespace is RCTS01. Your assigned username and password may differ from this example.The tablespace for the recovery catalog and the recovery catalog owner have been created in the instructor database. Answer: This example uses RCUSER10 as the username and password. execute the command to resynchronize the control file and recovery catalog. Oracle.Production on Thu Mar 16 14:22:04 2006 Copyright (c) 1982. [oracle@edrsr10p1 oracle]$ rman catalog rcuser10/rcuser10@rcdb Recovery Manager: Release 10.

1. database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN> 2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-90 . Using Enterprise Manager: Select Recovery Catalog Settings on the Maintenance Page. so the resync command fails. RMAN> resync catalog. Answer: Use RMAN command-line OR Enterprise Manager Database Control. You can use RMAN commandline or Enterprise Manager for this step. RMAN-00571: ========================================================== = RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ========================================================== = RMAN-03002: failure of resync command at 03/16/2006 14:28:21 RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target datg 4) Register the target database in the recovery catalog.Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database (continued) Answer: The target database is not yet registered in the recovery catalog. Select Add Recovery Catalog on the Recovery Catalog Settings page. Using RMAN: RMAN> register database.

In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-91 . Click Next. you are returned to the Recovery Catalog Settings page. Select Use Recovery Catalog and click OK. r O cl a Review the information on the Add Recovery Catalog: Review page and click Finish. After processing completes.Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database (continued) The Add Recovery Catalog: Database page is displayed. enter the information requested for the recovery catalog database. The Processing: Configure Catalog page is displayed. On this page.

the Recovery Catalog Settings page is displayed indicating that the database was successfully registered with the recovery catalog.Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database (continued) The Processing: Register Database page is displayed. After the processing completes. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-92 .

0.2.Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database (continued) 5) Create an RMAN script named whole_backup to make a whole database backup. Using RMAN. Create the whole_backup script using the CREATE SCRIPT command. 2005. connect to your target database and the recovery catalog.0 . ra O RMAN> CREATE SCRIPT whole_backup 2> { 3> BACKUP DATABASE.Production on Mon Mar 20 11:59:00 2006 Copyright (c) 1982. 4> } created script whole_backup le c te In rn l& a O I A s U O e ly n All rights reserved. connected to target database: ORCL (DBID=1090770270) connected to recovery catalog database 2. Oracle Database 10g: Backup and Recovery B-93 . Answer: 1. [oracle@edrsr10p1 oracle]$ rman target / catalog rcuser10/rcuser10@rcdb Recovery Manager: Release 10.1. Do not execute the whole_backup script at this time. Oracle.

RMAN> PRINT SCRIPT whole_backup. Connect to your target database and the recovery catalog. } RMAN> 7) In preparation for later practices. RMAN> unregister database. 2. use RMAN to unregister your database from the recovery catalog. Answer: 1.Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database (continued) 6) Use the PRINT command to query the recovery catalog and verify the creation of your whole_backup script. printing stored script: whole_backup {BACKUP DATABASE. Execute the UNREGISTER DATABASE command. database name is "ORCL" and DBID is 1090770270 Do you really want to unregister the database (enter YES or NO)? yes database unregistered from the recovery catalog r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-94 .

you monitor the progress of your RMAN backup jobs. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-95 .Practice Solutions for Lesson 9 In this practice.

-----------------. Execute the DELETE OBSOLETE command. RMAN> delete obsolete. Answer: 1. using target database control file instead of recovery catalog RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=133 devtype=DISK allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=158 devtype=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Secure Backup Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle -------------------. Invoke RMAN and connect to your target database. 2.-----.------------------Backup Set 80 14-APR-06 Backup Piece 81 14-APR-06 /u01/app/oracle/flash_recovery_ap Archive Log 76 14-APR-06 /u01/app/oracle/flash_recovery_ac … Backup Set 101 14-APR-06 Backup Piece 102 14-APR-06 /u01/app/oracle/flash_recovery_ap Do you really want to delete the above objects (enter YES or NO)? yes eleted backup piece backup piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/ 2006_04_8 deleted archive log archive log filename=/u01/app/oracle/flash_recovery_area/ORCL/archivel og/2006_08 … Deleted 18 objects r O cl a In e rn te l& a O I A s U O e ly n RMAN> Oracle Database 10g: Backup and Recovery B-96 .Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups 1) Invoke RMAN and delete all obsolete backups.

Change to the labs directory. If the backup is progressing normally. Answer: 1.sql script. Execute the lab_09_01_04_01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/hrtest01. Answer: 1.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02. In your RMAN session.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.--------------.-------------131 17-APR-06 0 cl In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-97 .--------.dbf channel ORA_DISK_1: starting piece 1 at 17-APR-06 4) Use your SQL*Plus session to monitor the progress of the whole database backup by querying the V$SESSION_LONGOPS view. Invoke SQL*Plus and connect as SYSDBA. You will use this second session to monitor a database backup. By using this view you can determine whether the backup is progressing normally or hanging.start_time.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01. begin a whole database backup. ra O SQL> SQL> 2 3 @lab_09_01_04_01 SELECT sid. the TIME_REMAINING column should be decreasing.elapsed_seconds.sql script to query V$SESSION_LONGOPS. time_remaining FROM v$session_longops / SID START_TIM ELAPSED_SECONDS TIME_REMAINING ---------. RMAN> backup database.Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups (continued) 2) Open a second terminal window. Starting backup at 17-APR-06 released channel: ORA_SBT_TAPE_1 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01. Execute the RMAN BACKUP DATABASE command. Execute the lab_09_01_04_01. 3) Return to your first terminal window.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.

--------------.--------. Execute the lab_09_01_04_01. SQL> / SID START_TIM ELAPSED_SECONDS TIME_REMAINING ---------.Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups (continued) 133 17-APR-06 133 17-APR-06 9 9 58 2.sql script again. You should notice that the value in the TIME_REMAINING column is decreasing.-------------131 17-APR-06 0 133 17-APR-06 17 46 133 17-APR-06 17 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-98 .

Navigate to the Maintenance page. 4. Click Submit Job. The job is submitted.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs You can easily monitor RMAN jobs in Enterprise Manager. Click View Job to view the progress of the Delete All Obsolete job. 3. Answer: 1. Select Manage Current Backups. 5. 2. On the Manage Current Backups page. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-99 . click Delete All Obsolete. 2) Delete obsolete backups. 1) Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA.

You can view additional information by clicking the links in the Logs section. 3. Answer: 1. Select Whole Database in the Customized Backup section. Click the Database tab to return to the home page.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 6. 3) Start a whole database backup. 2. Select Schedule Backup in the Backup/Recovery section. 7. Navigate to the Maintenance page. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-100 . Click Schedule Customized Backup.

Select Full Backup in the Backup Type section. select Disk. Deselect “Also back up all archived logs on disk” in the Advanced section. Click Next. Click Next. Accept the default values on the “Schedule Customized Backup: Schedule” page. Select “Delete obsolete backups” in the Advanced section. 5. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-101 .Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 4. 6. Click Next. On the “Schedule Customized Backup: Settings” page. Select Online Backup in the Backup Mode section.

Click View Job. 9.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 7. Click the links in the Logs section to view additional information. 8. Information about the job is displayed. Click Submit Job. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-102 .

You can view detailed information about each job step. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-103 . Click the “Job Run” link to return to the Job page.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 10. 11. Click the Database tab to return to the home page.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-104 .Practice Solutions for Lesson 10 There are no practices for Lesson 10.

• Connect to the EM Database Console application using your browser. • Install the Oracle Secure Backup software. • Test connectivity to the tape drive. • Configure virtual test devices. THEY ARE NOT SUPPORTED FOR PRODUCTION USE.Practice Solutions for Lesson 11 In this practice. • Configure preauthorization for this user. THE VIRTUAL TEST DEVICES USED IN THIS LAB ARE FOR TRAINING PURPOSES ONLY. • View information about the configured devices. you perform the following tasks: • Create your Oracle Secure Backup home directory. • Insert four volumes into the tape library. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-105 . • Register your administrative server with EM. • Define a new Oracle Secure Backup user.

Answer: Note: The output has been slightly formatted to reduce the number of space lines.. r O cl a .Solutions for Practice 11-1: Install Oracle Secure Backup In this practice. SPARC) administrative server. RHEL 3. solaris64 (Solaris 2..1. This program loads Oracle Secure Backup software from the CD-ROM to a filesystem directory of your choosing.. This CD-ROM contains Oracle Secure Backup version 10... linux32 (RH 2. [root@edrsr4p1 backup]# /stage/osb/osb_10_1cdrom/setup Welcome to Oracle's setup program for Oracle Secure Backup. Unless specified otherwise during this practice...8 and later. SuSE 9) administrative server.. media server.. Start the installation of Oracle Secure Backup from the staging directory. you configure only the local machine as an administrative server with no attached devices. Begin with the setup program... you should log in as the oracle user to your terminal emulator session.060420. Answer: [oracle@edrsr4p1 oracle]$ su Password: oracle <<password not echoed >> [root@edrsr4p1 oracle]# mkdir -p /usr/local/oracle/backup [root@edrsr4p1 oracle]# cd /usr/local/oracle/backup [root@edrsr4p1 backup]# 2) Continue as the root user.. RHEL 4.1. media server... Please wait a moment while I learn about this host... Use the following information to install the software: • The Oracle Secure Backup software is staged on your server in the /stage/osb/osb_10_1cdrom directory. you perform the following tasks: • Create your Oracle Secure Backup home directory. 1) Log in as the root user and create /usr/local/oracle/backup as your Oracle Secure Backup home directory. • Your Oracle Secure Backup home directory is /usr/local/oracle/backup. client In e rn te l& a O I A s U O e ly n - Oracle Database 10g: Backup and Recovery B-106 ... • During installation. done. • Install the Oracle Secure Backup software.You may load any of the following Oracle Secure Backup packages: 1. SuSE 8. client 2.. Change to that directory.

... enter 'all' [1]: 1 .... client.. media server... done.) For most questions... Would you like to continue Oracle Secure Backup installation with 'installob' now? (The Oracle Secure Backup Installation Guide contains complete information about installob. (Install Oracle the CD-ROM from which you Backup onto one or more UNIX.Loading of Oracle Secure Backup software from CD-ROM is complete.. To load all packages.. Oracle Secure Backup's UNIX installation program....(continued) Solutions for Practice 11-1: Install Oracle Secure Backup Enter a space-separated list of packages you'd like to load... by preparing a network description file In e rn te l& a O I A s U O e ly n customize Oracle Secure Backup [yes]? no ....- r O cl a You can choose to install Oracle Secure Backup in one of two ways: (a) interactively... or (b) in batch mode......Loading Oracle Secure Backup installation tools... done..) Please answer 'yes' or 'no' [yes]: yes - Welcome to installob.. a default answer appears enclosed in square brackets. ..- - - - - - - Oracle Database 10g: Backup and Recovery B-107 . It installs Oracle Secure Linux.. or other supported network.. Please wait a few seconds while I learn about this machine. by answering questions asked by this program........ Press Enter to select this answer.... You may unmount and remove the CD-ROM. Have you already reviewed and install/obparameters for your installation [yes]? no Would you like to do this now . done.... Loading linux32 administrative server.... open-source systems on your Secure Backup for Windows using loaded this software.

conf checking Oracle Secure Backup's configuration file (/etc/obconfig) setting Oracle Secure Backup directory to /usr/local/oracle/backup in /etc/obconfig setting local database directory to /usr/etc/ob in /etc/obconfig setting temp directory to /usr/tmp in /etc/obconfig Oracle Database 10g: Backup and Recovery B-108 r O cl a In e rn te l& a O I A s U O e ly n .so. Oracle Secure Backup's Web server has been loaded. Installing Oracle Secure Backup on edrsr4p1 (Linux version 2. Which installation method would you like to use (a or b) [a]? a - Oracle Secure Backup is not yet installed on this machine. please refer to the Oracle Secure Backup Installation Guide.4.EL) You must now enter a password for the Oracle Secure Backup 'admin' user. You can install this host one of three ways: (a) administrative server (the host will also be able to act as a media server or client) (b) media server (the host will also be able to act as a client) (c) client If you are not sure which way to install. containing a mixture of alphabetic and numeric characters. Use batch mode to install Oracle Secure Backup on any number of hosts. (a.21-20. Please enter the admin password: oracle <<not echoed>> Re-type password for verification: oracle <<not echoed>> generating links for admin installation with Web server updating /etc/ld.b or c) [a]? a Beginning the installation. but is not yet configured. Oracle suggests you choose a password of at least 8 characters in length. This will take just a minute and will produce several lines of informational output.(continued) Solutions for Practice 11-1: Install Oracle Secure Backup Use interactive mode to install Oracle Secure Backup on a small number of hosts.

d/qrserviced creating /etc/rc.(continued) Solutions for Practice 11-1: Install Oracle Secure Backup setting administrative directory to /usr/local/oracle/backup/admin in /etc/obconfig protecting the Oracle Secure Backup directory removing /etc/rc.d/init.d/init. [root@edrsr4p1 backup]# exit exit [oracle@edrsr4p1 oracle}$ r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-109 .d/observiced activating observiced via chkconfig initializing the administrative domain creating default oracle user Is edrsr4p1 connected to any tape libraries that you'd like to use with Oracle Secure Backup [no]? no Is edrsr4p1 connected to any tape drives that you'd like to use with Oracle Secure Backup [no]? no - Would you like to install Oracle Secure Backup on any other machine [yes]? no Installation summary: Installation Host Mode Name admin OS Name Driver OS Move Reboot Installed? Required? Required? no no edrsr4p1 Linux no Oracle Secure Backup is now ready for your use.

sh edrsr4p1 ************************************************ Creating a library ************************************************ Info: added "mediaserver" role to host edrsr4p1.sh script to configure the vt tape drive for the library: Answer: [oracle@edrsr4p1 labs]$ ./lab_11_02_01. “Warning: auto-login failed – login token has expired”./lab_11_02_01. you do not have to enter username and password. 1) In a terminal window. you perform the following tasks: • Configure a virtual test library and a virtual test drive. Oracle Database 10g: Backup and Recovery B-110 . It means that you have to enter the login username and password as shown above./lab_11_02_02.Solutions for Practice 11-2: Configure Devices for Oracle Secure Backup In this practice. ignore it.) Answer: r O Note: If you receive the following.1. [oracle@edrsr4p1 labs]$ 2) In the /home/oracle/labs directory.sh edrsr4p1 ************************************************ Creating a tape drive in the library ************************************************ [oracle@edrsr4p1 labs]$ 3) Start the obtool as the admin user with the oracle password. If you are within the time period of your login token. execute the . Answer: [oracle@edrsr4p1 oracle]$ cd /home/oracle/labs [oracle@edrsr4p1 labs]$ . navigate to the /home/oracle/labs directory and execute the . (Hint: Use the lsdev command. cl a [oracle@edrsr4p1 labs]$ obtool Oracle Secure Backup 10. • View information about the configured devices and the default media family via the obtool interface./lab_11_02_02. and view the currently configured devices.0 login: admin Password:oracle <<Password not echoed >> ob> lsdev library vlib in service drive 1 vt in service In e rn te l& a O I A s U O e ly n 4) View the RMAN-DEFAULT media family.sh script to configure the vlib tape library directly attached to your administrative server.

Solutions for Practice 11-2: Configure Devices for Oracle Secure Backup (continued) (Hint: Use the lsmf --long command.) Answer: ob> lsmf --long RMAN-DEFAULT: Keep volume set: Appendable: Volume ID used: Comment: ob> quit [oracle@edrsr4p1 oracle]$ content manages reuse yes unique to this media family Default RMAN backup media family r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-111 . . and use the quit command to exit.

At the bottom of the page. [oracle@edrsr4p1 labs]$ /usr/local/oracle/backup/bin/hostinfo edrsr4p1. Unless specified otherwise. 2. cl a In e rn te l& a O I A s U O e ly n 2) In Enterprise Manager. and as SYSDBA to your Database Control console and SQL*Plus sessions. and then click Login. Solutions for Practice 11-3: Register the Administrative Server 1) With your browser. You can use either the name of your PC or its IP address. you perform the following tasks: • Connect to the EM Database Console application using your browser. Oracle Database 10g: Backup and Recovery B-112 . http://<machine name>:1158/em. connect to Enterprise Manager Database Control using the IP address or machine name for your host. Because this is the first time you are connecting to EM Database Control as the SYS user. oracle as Password.oracle. Answer: 1.us. • Register your administrative server with EM. Open your browser application.com 3. you should log in as the oracle user to your terminal emulator session. Enter the URL. click the “I agree” button. • Insert four volumes into the virtual test library. r O 4. On the Database Login page. the Oracle Database 10g Licensing Information page is displayed. enter SYS as User Name.In this practice. register your administrative server. • Test connectivity to the virtual test drive. select SYSDBA from the Connect As drop-down list. You can retrieve the host name for your computer by calling the <OSB_Home>/bin/hostinfo script.

if the Password Manager offers to remember the password. make sure that admin is set in the Username field. After clicking OK. Select the “Save as Preferred Credential” check box. enter /usr/local/oracle/backup in the Oracle Secure Backup Home field. Then.) 4. 2. On the Add Administrative Server page. click the Maintenance tab. enter oracle for both the Username and Password fields.Solutions for Practice 11-3: Register the Administrative Server (continued) Answer: 1. 3. (Click No. (An unlabeled tape is synonymous with a blank tape within Oracle Secure Backup. enter oracle in the Password field. Then. 3) Use Enterprise Manager to insert four volumes into the vlib test library. On your Database home page. click the “Oracle Secure Backup Device and Media” link in the Oracle Secure Backup section. On the Maintenance tabbed page. click the Manage link corresponding to the Devices field. click the OK button. On the Administrative Server page. and then click the OK button. the Administrative Server page is displayed. On the Host Credentials page.) r O Answer: 1. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-113 .

the vlib virtual test library should be automatically selected. select the “Insert Volume” value. enter 1-4 in Storage Element. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-114 . click Go. and for Destination. In the Actions drop-down list. 3. On the Device Action: insertvol page. Then. On the Devices page. make sure that the “This is an unlabeled tape” option is selected for Source.Solutions for Practice 11-3: Register the Administrative Server (continued) 2.

Solutions for Practice 11-3: Register the Administrative Server (continued) 4. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-115 . When returned to the Devices page. The Processing page appears for a short period of time. click the plus sign (+) to the left of vlib to see your device. Scroll down to the bottom of the page and click OK. r O 5.

2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-116 .Solutions for Practice 11-3: Register the Administrative Server (continued) 4) Before taking any backups. An informational message regarding the accessibility of the selected device is displayed. test the virtual tape drive access. On the Devices page. Answer: 1. and click Go. you want to make sure you can access your tape drives. Select “Verify Connectivity” from the list of Actions.

Solutions for Practice 11-3: Register the Administrative Server (continued) r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-117 .

If you are already in Enterprise Manager. such as clicking the Administrative Server link in the upper-left part of the Devices page. UNIX name: oracle. Unless specified otherwise. set the value to “yes”. If you receive the warning “Website Certified by an Unknown Authority”. you can use shortcuts. UNIX group: dba and NDMP server user: no. Then if you rightclick the “File System Backup and Restore” link (at the bottom of the page) and select the “Open Link in New Window” or “Open Link in New Tab” option. You are now redirected to the Oracle Secure Backup Web tool application.” Answer: 1. you should log on as the oracle user to your terminal emulator session and as SYSDBA to your EM Database Control Console session. click the Maintenance tab.In this practice. • Configure preauthorization for this user. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-118 . you perform the following tasks: • Define a new Oracle Secure Backup user. one for Enterprise Manager and the other for the Oracle Secure Backup Web tool. 2. On your Database home page. On the Oracle Secure Backup Login page. enter admin as User Name. oracle as Password. so set the value to “no. User class: oracle. Note: If you have an NDMP server. Password: oracle. and click Login. an NDMP server is not available. Solutions for Practice 11-4: Configure Oracle Secure Backup User 3. 4. but inside the regular classrooms. 1) Use the Oracle Secure Backup Web tool to create the oracle Oracle Secure Backup user with the following values: User oracle. you can have two windows open. click the “File System Backup and Restore” link in the Oracle Secure Backup section. accept this certificate permanently and click OK in any security pop-up window. On the Maintenance tabbed page.

click the Configure tab. Click Apply. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-119 . and NDMP server user: no. On the Oracle Secure Backup home page.Solutions for Practice 11-4: Configure Oracle Secure Backup User (continued) 5. enter or select the following values: User: oracle. UNIX group: dba. Password: oracle. 7. On the Configure page. User class: oracle. 8. 6. UNIX name: oracle. click the Users link in the Basic section. On the New Users page. Click the Add button.

Windows domain name: *. 2) Configure the oracle Oracle Secure Backup user as a preauthorized RMAN and command-line user with the following values: Hosts: all hosts. View the success message.Solutions for Practice 11-4: Configure Oracle Secure Backup User (continued) 9. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-120 . and Attributes: cmdline and rman. Click the Preauthorized Access button. OS username: *. r O Answer: 1. Best Practice Tip: Limit preauthorized access to selected hosts. The oracle user is created and the page is in edit mode.

OS username: *. 3. View the success message. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-121 . and Attributes: cmdline and rman. Windows domain name: *. Click Add. select or enter the following values: Hosts: all hosts.Solutions for Practice 11-4: Configure Oracle Secure Backup User (continued) 2. On the Preauthorized Access page.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-122 . • Perform a backup of your Oracle database with the Oracle-Suggested Backup strategy.Practice Solutions for Lesson 12 In this practice. you perform the following tasks: • Create a database backup storage selector for your database.

Database altered.2. Unless specified otherwise.0 . SQL> startup mount ORACLE instance started. and as SYSDBA to your Database Control Console and SQL*Plus sessions. All rights reserved. enable archiving. you perform the following tasks: • In SQL*Plus. 2005. Database dismounted. Answer: $ sqlplus /nolog SQL*Plus: Release 10. No Archive Mode Disabled USE_DB_RECOVERY_FILE_DEST 9 11 r O cl a Total System Global Area 285212672 Fixed Size 1218992 Variable Size 100664912 Database Buffers 180355-72 Redo Buffers 2973696 Database mounted. create a database backup storage selector for your Oracle database. SQL> alter database archivelog. shut down the database.Solutions for Practice 12-1: Create a Database Backup Storage Selector In this practice. you should log on as the oracle user to your terminal emulator session. verify that the database is in ARCHIVELOG mode. Oracle.Production on Wed May 10 13:51:01 2006 Copyright (c) 1982. If your database is in ARCHIVELOG mode. Oracle Database 10g: Backup and Recovery B-123 . ORACLE instance shut down. verify that the database is in ARCHIVELOG mode. In e rn te l& a O I A s U O e ly n bytes bytes bytes bytes bytes SQL> alter database open. • In Enterprise Manager. Database altered. SQL> connect / as sysdba Connected. 1) First.0.1. SQL> archive log list Database log mode Automatic archival Archive destination Oldest online log sequence Current log sequence SQL> shutdown immediate Database closed. If not. continue with the next step. and then restart the database. • In Enterprise Manager. perform a test backup to verify that the Oracle Secure Backup configuration is correct.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-124 . Under Host Credentials. Select “Save as Preferred Credential. On your Database home page. enter oracle as Username and Password. 3. On the Backup Settings page. If these fields are already filled in. Password: oracle. create a backup selector for your database with the following specifications: • • • Tape Drives: 1 Host Credentials Username: oracle.Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) SQL> archive log list Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence SQL> Archive Mode Enabled USE_DB_RECOVERY_FILE_DEST 9 11 11 2) In Enterprise Manager. 4. Under Backup/Recovery Settings. click Backup Settings. Full. and Incremental Answer: 1. and “Save as Preferred Credential” Database Backup Types: Archive log. Auto Backup. click the Maintenance tab.” and click OK. make sure the supplied values are correct. enter 1 for Tape Drives in the Tape Settings section. 2.

Auto Backup. click Add to configure a Backup Storage Selector for your database. Then. On the Backup Storage Selectors page. Full. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-125 . make sure the supplied values are correct. On the Add Backup Storage Selector page. On the Administrative Server Login page.” select all check boxes (for Archive Logs. 7. Enter oracle/oracle for the host username and password. If these fields are already filled in. Reenter the Backup Settings page and click Configure in the Oracle Secure Backup section. make sure that your Administration Server is selected from the list. and Incremental database backup types). 6. click OK. r O 8. under the heading “For These Types of Backups. Select “Save as Preferred Credential” and click OK.Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) 5.

Oracle Database 10g: Backup and Recovery B-126 . Your Backup Storage Selector has been created and is now displayed. Click Return.Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) 9. r O cl a In e rn te l& a O I A s U O e ly n You return to the Backup Settings page.

Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) 3) Test your tape backup. and then click “Test Tape Backup” in the Tape Settings section in the middle of the page. On the Backup Settings page. r O 3. 2. Answer: 1. scroll down to see that the administrative server is set. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-127 . The progress window appears. When your tape drive test is successful. Make sure that your Host Credentials are correct. click the Database Instance link to return to the Maintenance page.

Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-128 .

click the Maintenance link.Solutions for Practice 12-2: Perform Oracle-Suggested Backup In Enterprise Manager. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-129 . make sure your Host Credentials are set correctly. select “Both Disk and Tape” and click Next. Then click the Schedule Oracle-Suggested Backup button 4. 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: 1. On the Database home page. 1) In Enterprise Manager. Unless specified otherwise. 3. 2. you should log on as the oracle user to your terminal emulator session. click the Schedule Backup link. perform Oracle-Suggested Backup. On the Schedule Backup page. and as SYSDBA to your Database Control Console and SQL*Plus sessions. On the Maintenance page. On the “Schedule Oracle-Suggested Backup: Destination” page.

Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 5. Oracle Database 10g: Backup and Recovery B-130 . select “Archivelogs and the Incremental Backup”. select the daily backup to run within 5 minutes of your current date and time. On the “Schedule Oracle-Suggested Backup: Setup” page. On the “Schedule Oracle-Suggested Backup: Schedule” page. and then click Next. r O cl a In e rn te l& a O I A s U O e ly n 6. enter 1 for Tape Drives and click Next.

and then the backup will be written to tape.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) This specification first initiates a disk backup to the Flash Recovery Area. On the “Schedule Oracle-Suggested Backup: Review” page. 7. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-131 . review both the Settings and RMAN Scripts and click Submit Job.

You should see that the job has been successfully submitted. Oracle Database 10g: Backup and Recovery B-132 cl a In e rn te l& a O I A s U O e ly n . If this is your first scheduled backup. you should see a full backup (otherwise an incremental one) first to the Flash Recovery Area. as well as the job execution. and then to tape. r O 2) Review your backup job. Review the RMAN command.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 8.

review how the RMAN command allocates the disk and tape devices. due to different timing and previous tasks. Click the Backup link under the Logs section.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) Answer: 1. The Job Execution page is displayed. In the Output log. The content of this screenshot may be different from yours. click View Job. 2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-133 . At your specified backup time.

cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-134 . If you are interested only in a summary of the backup activities. Scroll down to review the execution of these commands. This screenshot shows you the switch from disk to tape. you can select: EM Maintenance > Backup Reports. Scroll down to see the Result area.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 3. r O 4.

Click the oracle’s Home icon on your desktop. Answer: 1. to reinforce this practice topic.” 3) Optionally. r O 3.html viewlet in the /home/oracle/solutions/viewlets directory. 2. Navigate to the /home/oracle/solutions/viewlets directory. you can view the Oracle_Suggested_Strategy_viewlet_swf. Double-click the Oracle_Suggested_Strategy_viewlet_swf. but it should show both DISK and SBT_TAPE under “Output Devices.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) Your screenshot will look different. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-135 .html file and view the presentation.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-136 . When you have finished viewing the presentation.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 4. close your Web browser window.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-137 . you perform the following tasks: • Create a dataset for a file-system backup.Practice Solutions for Lesson 13 In this practice. • Schedule a backup of the dataset.

enter admin as User Name and oracle as Password. access Enterprise Manager as SYDBA and the Oracle Secure Backup Web tool as admin user. Answer: 1. Both use oracle as password. 6. Note: Do not back up the local root directory. 5. From your Database home page.” accept this certificate permanently and click OK in any security pop-up window. You are now redirected to the Oracle Secure Backup Web tool application. If you receive the warning “Website Certified by an Unknown Authority. On the Maintenance tabbed page. click the Maintenance tab. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-138 . 1) Create a new dataset called mylabs that you will use to back up your $HOME/labs directory. On the Oracle Secure Backup Web tool home page. 7. 2. 4. click the Backup tab. 3. On the Datasets page. click the Datasets link in the Settings section. click Add.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup Use the Oracle Secure Backup Web tool. click the File System Backup and Restore link in the Oracle Secure Backup section. and click Login. On the Backup page. The dataset should be of the form: include host <hostname> { include path /home/oracle/labs } Make sure that you replace <hostname> with the machine name of your student computer. which can be accessed from Enterprise Manager for the tasks in this practice session. On the Oracle Secure Backup Login page. Unless specified otherwise.

Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 8. After this is done. or delete these lines. Oracle Database 10g: Backup and Recovery B-139 . place comment signs (#) before the relevant lines. To not back up the local root directory. set the Name field to mylabs. On the New Datasets page. and replace the given template with the following: include host <hostname> { include path /home/oracle/labs } Make sure that you replace <hostname> with the machine name of your student computer. click Save. r O cl a In e rn te l& a O I A s U O e ly n 9.

you see that there were no errors. On the Dataset Errors page. On the Backup: Backup Now > Options page.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 10. If there are any errors. On the Backup: Datasets page. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-140 . On the Backup Now page. 3. 11. 1. 2) Create a backup with your mylabs dataset. Verify that the dataset was created successfully. then click Close. The backup should run immediately. and click Check Dataset. Answer: 2. resolve them. select mylabs. select the mylabs dataset and click OK. click the Add button. click Backup Now on the bottom of the page. On the Datasets page.

r O 3) View Oracle Secure Backup job information. 2. select the mylabs dataset and click Go to submit the job to the scheduler.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 4. Answer: 1. Review the result. On the Manage page. Click the Manage tab. 5. Query the Manage: Jobs page for the previously created and executed job. When returned to the Backup Now page. Oracle Database 10g: Backup and Recovery B-141 cl a In e rn te l& a O I A s U O e ly n . Oracle Secure Backup submits the backup request and assigns a job number. click Jobs.

then hold the [Ctrl] key and select dataset and Oracle backup.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 3. or Pending jobs by selecting those options. Click Apply. Click the Manage link to return to the Manage page. The updated display now shows the recent dataset backup as well as the previous RMAN backup jobs. On the Jobs page. Complete. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-142 . 4. restrict the display to only Active. In the Types box. select backup.

html viewlet in the /home/oracle/solutions/viewlets directory. When you have finished viewing the presentation. Click the oracle’s Home icon on your desktop. Answer: 1. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-143 . you can view the Scheduling_filesystem_backups_viewlet_swf. 3. Double-click the Scheduling_filesystem_backups_viewlet_swf. 2. Navigate to the /home/oracle/solutions/viewlets directory. close your Web browser window. to reinforce this practice topic.html file and view the presentation.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 4) Optionally.

Practice Solutions for Lesson 14
In this practice, you perform the following tasks: • Delete the contents of your labs directory. • Restore the missing lab files. • Verify that the files are recovered.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-144

In this practice, you first delete your lab files and then restore them from the backup created in the previous practice. Unless specified otherwise, you should log on as the oracle user to your terminal emulator session, and as SYSDBA to your Database Control Console session. For tasks 2 to 5, log in as admin user (with the oracle password) into the Oracle Secure Backup Web tool, which can be accessed from Enterprise Manager. 1) From your terminal emulator session, remove all the files located in your $HOME/labs directory. Answer:
[oracle@edrsr4p1 labs]$ ls /home/oracle/labs
lab_04_01_02_01.sh lab_04_02_02_01.sh lab_04_03_02_01.sh lab_05_02_03_02.sql lab_05_02_04_01.sql lab_05_02_05_01.sql lab_05_02_07_01.sql lab_05_03_01_01.sql lab_05_03_02_01.sql lab_05_03_03_01.sql lab_05_03_04_01.sql lab_05_03_06_01.sql lab_05_04_01_01.sql lab_05_04_03_01.sql lab_05_04_04_01.sql lab_05_04_07_02.sql lab_07_01_01_01.sh lab_07_01_02_02.sql lab_07_01_03_01.sh lab_07_01_07_01.sql lab_07_01_08_01.sql lab_07_01_09_01.sql lab_07_01_12_01.sql lab_07_01_13_02.sql lab_07_01_14_02.sql lab_09_01_04_01.sql lab_11_02_01_in.sh lab_11_02_01_out.sh lab_11_02_01.sh lab_11_02_02_in.sh lab_11_02_02_out.sh lab_11_02_02.sh

Solutions for Practice 14-1: Restore File-System Data with Oracle Secure Backup

[oracle@edrsr4p1 labs]$ mkdir /home/oracle/solutions/labs_save [oracle@edrsr4p1 labs]$ cp /home/oracle/labs/* /home/oracle/solutions/labs_save [oracle@edrsr4p1 labs]$ rm -f /home/oracle/labs/* [oracle@edrsr4p1 labs]$ ls /home/oracle/labs [oracle@edrsr4p1 labs]$

2) Restore your $HOME/labs directory contents by selecting the appropriate backup from the Oracle Secure Backup catalog. Use the Browse Host button to locate the desired backup. Answer: 1. In the Oracle Secure Backup Web tool, click the Restore tab. 2. On the Restore page, click Backup Catalog.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-145

Solutions for Practice 14-1: Restore File-System Data with Oracle Secure Backup (continued) 3. On the Backup Catalog page, select your <Host Name> and latest, then click Browse Host.

4. On the Browse Host page, click the link labeled home to view its contents.

5. Continue drilling down until you reach the labs directory. Select this directory, and then click Add.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-146

Solutions for Practice 14-1: Restore File-System Data with Oracle Secure Backup (continued) 6. On the New Restore page, accept the default settings and click OK.

7. On the Backup Catalog page, click “Show restore list and browse options” to view the items to be restored and the selection options for that data.

8. After viewing the information, click Go to submit the restore request to the scheduler.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-147

Solutions for Practice 14-1: Restore File-System Data with Oracle Secure Backup (continued)

9. A message is displayed at the top of the screen to verify that the request was submitted and to show the name of the created restore job.

3) Monitor the progress of the restore request. Answer: 1. Click the Manage tab. 2. On the Manage page, click Jobs.

3. On the Jobs page, select Active, Complete, and Pending for the Viewing options, and then select restore from the Types list. Click Apply.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

4. Review the displayed job and verify that your restore job was successful.
Oracle Database 10g: Backup and Recovery B-148

sh lab_05_02_03_02. verify that your lab files are present.sql lab_07_01_09_01.sql lab_05_04_03_01.sh lab_11_02_01.sql lab_05_03_03_01.sh lab_11_02_02_in.sql lab_05_03_06_01.sql lab_09_01_04_01.sh s U O e ly n Oracle Database 10g: Backup and Recovery B-149 .sh lab_04_03_02_01.sh lab_11_02_02.sql lab_05_02_07_01. Answer: [oracle@edrsr4p1 labs]$ ls lab_04_01_02_01.sql lab_07_01_14_02.Solutions for Practice 14-1: Restore File-System Data with Oracle Secure Backup (continued) 4) In a terminal window.sql lab_05_04_04_01.sql lab_05_04_07_02.sh lab_04_02_02_01.sql lab_05_02_04_01.sql lab_05_03_02_01.sh lab_11_02_01_out.sql lab_05_03_01_01.sql lab_07_01_13_02.sql lab_07_01_01_01.sh lab_11_02_02_out.sql lab_05_02_05_01.sql lab_07_01_08_01.sh lab_07_01_02_02.sql lab_11_02_01_in.sql lab_07_01_03_01.sql lab_05_03_04_01.sh lab_07_01_07_01.sql [oracle@edrsr4p1 labs]$ r O cl a In e rn te l& a O I A lab_07_01_12_01.sql lab_05_04_01_01.

Practice Solutions for Lesson 15 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-150 . • Recover a tablespace from an encrypted backup. you perform the following tasks: • Create an encrypted backup.

you perform the following tasks: • Schedule a customized tape backup of the whole database.Solutions for Practice 15-1: Create an Encrypted Backup In this practice. you should log in as SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. 1) In Enterprise Manager. Unless specified otherwise. click the “Schedule Backup” link in the Backup/Recovery section. • After the backup operation completes. On the Maintenance tabbed page. Start the backup immediately. verify that the backup was encrypted. On your Database home page. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-151 . Accept “Whole Database” under the Customized Backup section and click Schedule Customized Backup. 3. If you completed the task to perform an Oracle Suggested backup. Answer: 1. schedule a customized tape backup of the whole database with the following specifications: full online backup with archive logs to tape. then you see the following information: r O 4. 2. • Edit the RMAN script to encrypt the backup using a password. click the Maintenance tab.

online backup with archive logs and click Next.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 5. r O 6. Select the Tape setting and click Next. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-152 . Retain the default values of the backup options: full.

The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY. r O Answer: 1. On the “Schedule Customized Backup: Review” page. and then click Next. click Edit RMAN Script. 2) Edit the RMAN script and include the command to encrypt the backup. specifying demo as the password. Then submit the backup job. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-153 .Solutions for Practice 15-1: Create an Encrypted Backup (continued) 7. Make sure the Start Immediately option is selected.

Solutions for Practice 15-1: Create an Encrypted Backup (continued) 2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-154 . 3) Check the backup job status. at the top of the RMAN script. Click View Job. Answer: 1. and then click Submit Job. Enter SET ENCRYPTION ON IDENTIFIED BY demo ONLY. and no other encryption keys will exist for this backup. Verify that the RMAN SET ENCRYPTION command is successfully executed. Note: Specifying “ONLY” in the command means decryption will require the demo password.

Notice the successful execution of the RMAN SET ENCRYPTION command. Click the Backup link in the Name column of the table under the Logs section.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-155 . 3.

Answer: r O 1. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-156 . to reinforce this practice topic. Click the oracle’s Home icon on your desktop. 5) Optionally. Answer: Refresh the browser page until the backup completes.html viewlet the /home/oracle/solutions/viewlets directory. 2. you can view the Backup_Encryption_viewlet_swf. Navigate to the /home/oracle/solutions/viewlets directory.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 4) Verify the successful completion of your backup.

close your Web browser window.html file and view the presentation. When you have finished viewing the presentation.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 3. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-157 . Double-click the Backup_Encryption_viewlet_swf.

On the Maintenance tabbed page. click the Maintenance tab. Answer: 1. ensure that your Host Credentials are correct. click the “Perform Recovery” link in the Backup/Recovery section. you perform the following tasks: • Perform a tablespace recovery using the encrypted backup. On your Database home page. you should log in as SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup In this practice. and click Perform Object Level Recovery. 3. 2. • Troubleshoot the recovery process. 1) In Enterprise Manager. Select Tablespaces from the Object Type list. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-158 . • Edit the RMAN script to decrypt the backup. 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. Unless specified otherwise.

Click Add. Retain the default values for point-in-time recovery and click Next. 5.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 4. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-159 .

7. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-160 . Restore the files to the default location” option and click Next. r O 8. Accept the “No. Click Next.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 6. and click the Select button. Select the EXAMPLE tablespace.

Review your recovery request and click Submit. Why? Answer: 1.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 9. 2) The recovery operation fails. RMAN could not decrypt the backup because it needs the password. Notice the “ORA-19913: unable to decrypt backup” error. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-161 . Scroll down the output window on the Perform Recovery: Result window.

On the Maintenance tabbed page. Select Tablespaces from the Object Type list and click Perform Object Level Recovery. 2. Answer: 1. Oracle Database 10g: Backup and Recovery B-162 cl a In e rn te l& a O I A s U O e ly n . click the “Perform Recovery” link in the Backup/Recovery section. r O 4) Perform an object-level recovery of the EXAMPLE tablespace to the current time or a previous point in time. What do you notice on the Perform Recovery page? Notice that there is a tablespace offline and its datafile needs media recovery. Click OK. Restore the files to the default location. 3) Troubleshoot the recovery process. This is due to the failed tablespace recovery attempt. What do you notice on the Perform Recovery page? Answer: 1.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 2.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-163 . 3. make sure that the EXAMPLE tablespace is displayed.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 2. Retain the default values for point-in-time recovery and click Next. On the “Perform Object Level Recovery: Tablespaces” page. and click Next.

Restore the files to the default location” option and click Next. 5) Edit the RMAN script on the “Perform Object Level Recovery: Review” page. Include the command to decrypt the backup. The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY. Retain the “No.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 4. specifying demo as the password. Answer: r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-164 . Then submit the backup job.

Notice that the SET DECRYPTION command was executed. Answer: 1. Enter SET DECRYPTION IDENTIFIED BY demo.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 1. 6) View the Perform Recovery: Result page. at the top of the RMAN script. Notice the successful execution of your SET DECRYPTION command. 2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-165 . and then click Submit. Click Edit RMAN Script.

Notice that the recovery completed successfully and the EXAMPLE tablespace was brought back online. click OK.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 2. When you finished reviewing the results. r O 3. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-166 .

• Back up the Oracle Secure Backup catalog.Practice Solutions for Lesson 16 In this practice. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-167 . you perform the following tasks: • View Oracle Secure Backup information.

3. 2. To access the Oracle Secure Backup Web tool.In this practice. 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. Select your host name and click Browse Host. Click the path link under Browse Host thrice. Click Backup Catalog. Click the Restore tab. and defaults and policies. On your Database home page. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-168 . Answer: 1. 4. Click File System Backup and Restore. volumes and their content. jobs and job transcripts. Solutions for Practice 16-1: View Oracle Secure Backup Information 5. r O 6. click the Maintenance tab. use admin as username and oracle as password. Unless specified otherwise. you should log in as the SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. you view Oracle Secure Backup information: the catalog.

which you backed up during a previous practice session. 2. click the Manage tab. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-169 .Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 7. Click Volumes. Click until you see the files. In the Oracle Secure Backup Web tool. Note: The content of your /home/oracle/labs directory is different during class. 2) View the volumes and their content. Answer: 1.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-170 . 3) View a category of jobs—for example. In the Oracle Secure Backup Web tool. Include a review of a job transcript. Answer: 1. Then click Close.Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 3. click the Home tab. The content of your Backup Sections will be different from this screenshot. Review the List Section Properties. 4. completed ones. Select one of the volumes and click List Backup Sections.

Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) Most likely. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-171 . Click the Completed Jobs link. 3. 2. It should be 0%. Select the archivelog backup job and click Show Transcript. you will not have any failed jobs to research. Scroll to the end of the job transcript and view the error rate. so look at completed ones. r O 4.

4) View the configuration of your security policies. click the security Policy. click the Defaults and Policies link in the Advanced section. On the Configure: Defaults and Policies page. 3. 2. On your Database home page. What is the value of the “Login token duration” policy? Answer: 1. On the Configure page. 4. Click Close. Click the Configure tab.Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 5. click the Maintenance tab. cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-172 . r O 5. Click the File System Backup and Restore.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-173 .Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 6. What is the value of the “Login token duration” policy? The default value is 15 minutes. you need to repeat your Oracle Secure Backup login. which means after 15 minutes of inactivity.

using the commands listed here: mkds --dir catalog_backup mkds --input catback."). • Submit the backup request to the scheduler. include host <hostname> { include path /etc/obconfig include path /usr/etc/ob/xcr include path /usr/local/oracle/backup/admin } .ds When prompted for input. you used the Oracle Secure Backup Web tool for a file-system backup. Terminate with an EOF or a line containing just a dot (".ds Input the new dataset contents. • Identify the volume that contains the backup data. and then submit the backup request. Use the following command: mkmf --vidunique --writewindow 7days --retain 28days --noappend OSB_catalogs Answer: $ obtool –-user admin –-password oracle ob> mkmf --vidunique --writewindow 7days --retain 28days -noappend OSB_catalogs 2) Create a backup set for the catalog data. • Create a backup request. • Verify that the backup completed successfully. Now use the obtool utility with admin as username and oracle as password. Previously.ds Oracle Database 10g: Backup and Recovery B-174 cl a ob> mkds --dir catalog_backup ob> mkds --input catback. you perform the following tasks using obtool: • Create a dataset for the <OSB_HOME>/admin directory. Apply your changes [yes]? ob> In e rn te l& a O I A s U O e ly n .Solutions for Practice 16-2: Back Up the Oracle Secure Backup Catalog In this practice. 1) Create a media family to be used when backing up the Oracle Secure Backup catalog files. where <hostname> is the host name of your assigned computer: include include include include host path path path <hostname> { /etc/obconfig /usr/etc/ob/xcr /usr/local/oracle/backup/admin } Answer: r O 3) Create a backup request for this dataset. supply the following dataset directives. To create the backup request using the following obtool command: backup –l full –p 1 –r vt –g --dataset catback.

Answer: ob> lsjob --long admin/3 admin/3: Type: dataset catback.ds. 3462496 kb remaining.ds ob> backup --go Info: backup request 1 (dataset catback. content manages reuse * in 3: unlabeled. job id is admin/3.Solutions for Practice 16-2: Back Up the Oracle Secure Backup Catalog (continued) What does this command do? Answer: This command performs a full backup (-l full) of the files defined by the dataset description catback.ds) submitted. The backup is restricted to only the vt tape drive.ds Level: full Family: OSB_catalogs Scheduled time: none State: completed successfully at 2006/05/19. Answer: ob> lsvol --drive vt r O cl a ob> lsvol --drive vt Inventory of library vlib: * in 1: volume RMAN-DEFAULT-000002. lastse 2 In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-175 . The backup is executed as the privileged root user (-g) and is given the highest priority (-p 1). barcode 6a2ac70ec944102b98500065b9621d0 * in 4: unlabeled. (--dataset). so the volume that contains the backup can be easily located. barcode 6a156878c944102b98500065b9621 d0. barcode 6a409e76c944102b98500065b9621d0 in dte: volume VOL000001. ob> backup –l full –p 1 –r vt –g --dataset catback. ob> 4) Use the information from the message returned in the previous step to verify that the backup completed successfully. 3463296 kb remaining. All the files described are backed up regardless of when the last backup was taken or what files have changed. barcode 69ed75c0c944102b985 00065b9621d0. (State should show “completed successfully”).21:51 Priority: 1 Privileged op: yes Run on host: (administrative server) Attempts: 1 ob> 5) Identify the volume that contains the backup.

Solutions for Practice 16-2: Back Up the Oracle Secure Backup Catalog (continued) *: in use list ob> ob> exit r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-176 .

Oracle Secure Backup Additional Installation Topics Copyright © 2006. All rights reserved. r O cl a In e rn te l& a O I A s U O e ly n . Oracle.

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . should assist you to: • Install Oracle Secure Backup on Windows • Locate and describe the Oracle Secure Backup installed files • Additional installation topics: – Specifying installation parameters – Client Installation: Example – Media Server Installation: Example • Uninstall Oracle Secure Backup Copyright © 2006.2 . together with the relevant lesson. All rights reserved. Oracle.Topics This appendix.

Windows Installation: Overview Stop drivers Run setup. Note: Every installation of Oracle Secure Backup on Windows is a client installation. Oracle. and how to configure firewalls. the GNU SMTP implementation is replaced with one developed by Oracle.3 . the Oracle Secure Backup Setup Wizard copies all Oracle Secure Backup files to the local host and generates Windows Registry entries. and can additionally be a media server or administrative server installation. During the installation process. see documentation for platform-specific details. Oracle Secure Backup supports configuring the administrative domain on a host running the Windows operating system. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . such as: on Windows: disable drivers on Windows-based media servers. Windows Installation: Overview Before beginning your installation. To support running an administrative server on Windows.exe Answer customer information dialogs Select the type of host from the Oracle Secure Backup Setup screen Install Answer service startup dialogs Answer service login dialogs Copyright © 2006. All rights reserved.

This is necessary because Windows does not allow two device drivers to simultaneously claim the same device. 4. Select Disable to disable the medium changer driver. 10. Expand the branch for Medium Changers (if any). From Control Panel. Expand the branch for Tape Drives. Click the Device Manager button. The Device Manager window appears. Click the Hardware tab. 8. Repeat steps 5 and 6 for each tape library or tape drive that you intend to use with Oracle Secure Backup. 9. click System. 7. 3. All rights reserved. 5. you should stop any currently running drivers that are controlling existing tape drives and libraries that you plan to use with Oracle Secure Backup. 6. To stop Windows drivers. Right-click the icon that represents your tape drive. Stopping Tape Device Drivers Before you start an Oracle Secure Backup host installation on your Windows machine. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . Installed drivers for tape drives appear. A pop-up menu appears. Select Disable to disable the tape drive driver. A pop-up menu appears.Stopping Tape Device Drivers Copyright © 2006. perform the following steps: 1. Right-click the icon that represents your tape library. Oracle. 2.4 .

Repeat steps 9 and 10 for each tape library or tape drive that you intend to use with Oracle Secure Backup. Reboot your host.Stopping Tape Device Drivers (continued) 11. 12. If not disabled. the Windows drivers will preempt the Oracle Secure Backup device driver (ob) on the next reboot. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . Windows drivers claim devices to be used by Oracle Secure Backup.5 .

All rights reserved.” option removes the X from the Media Server icon and installs the media server software. click the pull-down menu of the Media Server icon. Click Next to continue.exe program from the directory into which you originally downloaded the software.6 . r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . The options that are displayed are shown in the slide. Choose the program features to configure: a. Run the setup. The Readme Information dialog box is displayed. 8. Your choices are: . Oracle Secure Backup Setup 1. The InstallShield Wizard is displayed. Enter the name of your company in the Organization box. To configure the Windows host as a media server. 6.Oracle Secure Backup Setup Copyright © 2006. Click Next to continue.Only for me (user) 7. Select a target user for the application. 4. The Customer Information dialog box is displayed. Click Next to continue. Selecting the “This feature will be installed on local hard drive.Anyone who uses this computer (all users) . 5. Enter your name in the User Name box. 2. Oracle. 3.

selecting this option removes the X from the Administrative Host icon and installs the administrative server software. 11. Click Install to start copying files. If you plan to perform Oracle database backups and restores. Click Finish to continue. 10. click the pull-down menu of the Administrative Host icon and select “This feature will be installed on local hard drive. Click Next to continue. Doing so creates an Oracle Secure Backup user called oracle (with the rights and privileges of the oracle class) whose purpose is to facilitate RMAN backup and restores of Oracle databases. To configure the Windows host as an administrative server.Oracle Secure Backup Setup (continued) b. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . The “Ready to Install the Program” window is displayed. c. A progress bar appears.7 . 9. repeat this process for Create “oracle” user. the InstallShield Completed screen is displayed. When the files are copied.” Again.

All rights reserved. 12. Oracle. Select a mode in which to start the Oracle Secure Backup service.8 .Service Startup Dialogs Continued: Copyright © 2006. Note: On the Windows operating system. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . .Disabled: The Oracle Secure Backup service is disabled. Your choices are: . the only daemon that runs as a Windows service is the Oracle Secure Backup service (observiced). Click Next to continue. 13. Service Startup Dialogs The Service Startup dialog box is displayed.Manual: The Oracle Secure Backup service must be started manually by a user who is a member of the Administrators group. .Automatic: The Oracle Secure Backup service starts automatically when you reboot your host.

16. The required privileges are listed in the Oracle Secure Backup Service Logon dialog box.9 . Repeat this installation process for each Windows host in your administrative domain.Service Login Dialog Box Continued: Copyright © 2006. ensure that the account you select has enough backup and restore privileges. click “This Account” and enter the Windows user account name and password. 14. . r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . Service Login Dialog Box The Service Login dialog box appears. All rights reserved. click System Account. 15.If you plan to run the Oracle Secure Backup service daemon (and associated subordinate daemons) with the privilege set associated with an existing Windows user account. Select one of the following options: . Oracle.If you plan to run the Oracle Secure Backup service daemon (and associated subordinate daemons) with full privileges. Click Finish to complete the installation. If you choose this option.

each host on which Oracle Secure Backup is installed contains a configuration file. In addition to containing the Oracle Secure Backup directory. The configuration file is called obconfig. an administrative server configured on a Linux host will have additional directories created. These directories contain the following types of files: • admin: Administrative and configuration data for the administrative domain. However.Oracle Secure Backup Installed Files <OSB_Home> directory admin • • • • config history log state • • • • • apache conf htdocs images logs modules bin device help samples Administrative server Copyright © 2006. also the backup catalog • apache: Apache Web server files (used by Web tool) • bin: Executables or links to executables • device: Data on the tape drives and libraries that are supported by the Oracle Secure Backup device driver r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . and it is called obconfig in the /etc directory on UNIX and Linux systems. Configuration file Oracle Secure Backup Installed Files The Oracle Secure Backup home directory is created on every host where you install Oracle Secure Backup.txt in the db subdirectory where you install Oracle Secure Backup on Windows. All rights reserved. The illustration in the slide shows the installed directories that are common to an administrative server on any operating system. although the contents of the directory vary depending on the roles you assigned to the host.10 . Oracle.

etc.<operating_system>/: Device drivers for operating_system • etc/: Links that point to the <OSB_root>/. For example. 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: • .* or . For example. the directory for Sun Solaris is .solaris.<operating_system>/: Shared library for the SBT interface for operating_system.* directory.solaris. • man/: Man pages for Oracle Secure Backup components • man/man1: Man pages for Oracle Secure Backup executables • man/man8: Man pages for daemons and maintenance tools • tools.hostid: Information used for identifying this host • /usr/etc/ob/xcr/: Transcripts for jobs that ran on this host • /usr/tmp/: Log files for observiced and obndmpd and temporary files • . r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .lib.drv.wrapper: Shell program that selects an executable from a .Oracle Secure Backup Installed Files (continued) • help: Help files (provides data for the help command in obtool) • samples: Sample tools for writing scripts or programs that interact with Oracle Secure Backup Note: The directory structure under the <OSB_Home> directory is the same for both Windows and UNIX systems.wrapper script for each Oracle Secure Backup utility. This script is an architecture-specific executable selection tool for Oracle Secure Backup.<operating_system>/: Executables for operating_system.bin. • .etc.bin. the directory for Sun Solaris is .<operating_system>/: Daemons and utility programs for operating_ system • install/: Installation scripts • lib/: Link to the architecture-independent shared library for the SBT interface • . where operating_system is a derivative of the operating system name. where operating_system is a derivative of the operating system name. • .bin.11 . Symbolic links and the architecture-independent . On a Windows host.<operating_system>/: Maintenance tools • /usr/etc/ob/.wrapper shell program enable hosts to contain executables for multiple computer architectures.lib. based on the computer architecture of the host executing the command.

drv. Oracle Secure Backup Installed Files (continued) The slide illustrates the directories created for a media server or client. The bin and device subdirectories are created on every machine.bin. regardless of the operating system used.Oracle Secure Backup Installed Files <OSB_Home> directory /usr/local/oracle/backup .<operating_system>/ man/ /usr/etc/ob/. the following files and directories are installed in addition to the bin and device subdirectories: • Media server: .<OS> help bin device Media server <OSB_Home> directory /usr/local/oracle/backup help bin Client device Copyright © 2006.<operating_system>/ etc/ .12 . Oracle.<operating_system>/ .wrapper r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .drv.hostid /usr/etc/ob/xcr/ /usr/tmp/ . All rights reserved. For a UNIX or Linux host.etc. The other directories shown in the slide are created for machines that use the Windows operating system.

hostid /usr/etc/ob/xcr/ /usr/tmp/ .etc.<operating_system>/ man/ /usr/etc/ob/.13 .<operating_system>/ etc/ .Oracle Secure Backup Installed Files (continued) • Client: .bin.wrapper r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .

The configuration file is called obconfig.Installed Files for Host Role: Administrative Server <OSB_Home> directory admin • • • • config history log state • • • • • apache conf htdocs images logs modules bin device help samples Configuration file Copyright © 2006. The illustration in the slide shows the installed directories that are common to an administrative server on any operating system. These directories contain the following types of files: • admin: Administrative and configuration data for the administrative domain. However. Oracle. Installed Files for Host Role: Administrative Server The Oracle Secure Backup home directory is created on every host where you install Oracle Secure Backup. also the backup catalog • apache: Apache Web server files (used by Web tool) • bin: Executables or links to executables • device: Data on the tape drives and libraries that are supported by the Oracle Secure Backup device driver r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .txt in the db subdirectory where you install Oracle Secure Backup on Windows. All rights reserved.14 . although the contents of the directory vary depending on the roles you assigned to the host. each host on which Oracle Secure Backup is installed contains a configuration file. In addition to containing the Oracle Secure Backup directory. and it is called obconfig in the /etc directory on UNIX and Linux systems. an administrative server configured on a Linux host will have additional directories created.

lib.<operating_system>/: Shared library for the SBT interface for operating_system.solaris.lib. For example. Symbolic links and the architecture-independent .bin. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . where operating_system is a derivative of the operating system name. 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: • . where operating_system is a derivative of the operating system name.etc. On a Windows host.* or .drv.15 .wrapper script for each Oracle Secure Backup utility. For example. the directory for Sun Solaris is .<operating_system>/: Daemons and utility programs for operating_ system • install/: Installation scripts • lib/: Link to the architecture-independent shared library for the SBT interface • .* directory.<operating_system>/: Maintenance tools • /usr/etc/ob/.bin.wrapper shell program enable hosts to contain executables for multiple computer architectures.hostid: Information used for identifying this host • /usr/etc/ob/xcr/: Transcripts for jobs that ran on this host • /usr/tmp/: Log files for observiced and obndmpd and temporary files • . • man/: Man pages for Oracle Secure Backup components • man/man1: Man pages for Oracle Secure Backup executables • man/man8: Man pages for daemons and maintenance tools • tools. based on the computer architecture of the host executing the command.bin.<operating_system>/: Device drivers for operating_system • etc/: Links that point to the <OSB_root>/. • . This script is an architecture-specific executable selection tool for Oracle Secure Backup. • .etc.<operating_system>/: Executables for operating_system.solaris.wrapper: Shell program that selects an executable from a . the directory for Sun Solaris is .Installed Files for Host Role: Administrative Server (continued) Oracle Secure Backup Installed Files • help: Help files (provides data for the help command in obtool) • samples: Sample tools for writing scripts or programs that interact with Oracle Secure Backup Note: The directory structure under the <OSB_Home> directory is the same for both Windows and UNIX systems.

For a UNIX or Linux host.etc. Oracle.Installed Files for Host Role: Media Server <OSB_Home> directory /usr/local/oracle/backup .drv. regardless of the operating system used. All rights reserved. The bin and device subdirectories are created on every machine.<operating_system>/ man/ /usr/etc/ob/.16 .<OS> help bin device Copyright © 2006. the following files and directories are installed in addition to the bin and device subdirectories: • Media server: .wrapper r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .drv.<operating_system>/ . Installed Files for Host Role: Media Server The slide illustrates the directories created for a media server or client. The other directories shown in the slide are created for machines that use the Windows operating system.<operating_system>/ etc/ .hostid /usr/etc/ob/xcr/ /usr/tmp/ .bin.

hostid /usr/etc/ob/xcr/ /usr/tmp/ .17 .bin. All rights reserved.etc.Installed Files for Host Role: Client <OSB_Home> directory /usr/local/oracle/backup help bin device Copyright © 2006. Oracle.<operating_system>/ man/ /usr/etc/ob/. regardless of the operating system used. • Client: .<operating_system>/ etc/ . The bin and device subdirectories are created on every machine. Installed Files for Host Role: Client The slide illustrates the directories created for a media server or client.wrapper r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . The other directories shown in the slide are created for machines that use the Windows operating system.

customized obparameters: yes … # # # # # # # # # # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ D e f a u l t " o r a c l e " u s e r c r e a t i o n _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ After the installation is successful and the administrative domain has been initialized. Oracle. Specifying Installation Parameters Oracle Secure Backup provides an obparameters file to help users customize their installations. this option allows you to automatically create an Oracle Secure Backup user "oracle" which belongs to the "oracle" class and is pre-authorized to perform Oracle backup & restore operations.Specifying Installation Parameters # Once you've customized this obparameters file. Currently. you can alter the behavior of Oracle Secure Backup by modifying the following options in this file: • customized obparameters: Indicates you no longer want to be prompted to review this file during installation • start daemons at boot: Indicates whether you want to automatically start Oracle Secure Backup each time you boot the system • identity certificate key size: 1024: Configures the level of security associated with the host identity certificates issued by the administrative service daemon • create pre-authorized oracle user: Instructs Oracle Secure Backup to create the oracle Oracle Secure Backup user and configure it as a preauthorized user • default UNIX user and default UNIX group: Is used to specify the UNIX or Linux groups and usernames to which the oracle Oracle Secure Backup user will be mapped • <OS type> ob dir: Identifies the name of the Oracle Secure Backup directory for each platform type in your network. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . The obparameters file is located in the install subdirectory of your Oracle Secure Backup home directory. you can set directories for Solaris. For a Linux installation.18 . change the # following line to 'yes' to make installob less chatty. Linux. AIX. create pre-authorized oracle user: yes Copyright © 2006. All rights reserved. and Solaris64. HP-UX. The default value is the <OSB_Home> directory.

then the installation software creates a libobk.0 root.0 root. 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. 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 modify the location of the created links. along with the default permissions.sh .0 root. The default values are: <OS type> links: /usr/bin • /etc /lib • ask about ob dir: Indicates whether or not Oracle Secure Backup should remind the user during installation that a directory other than the recommended one has been chosen for the software default protection: Is used to specify the file and directory permissions to be set after the installation is complete.0 root. it cannot be shared among multiple machines via NFS (or any other remote file system). Here is a partial listing: root.*/* ./admin/config/* . A list of the files and directories./admin/* . This directory must be private to each machine. on some systems. The link text points to the actual libobk. You can specify the behavior for each type of supporting operating system.lib.linux32. For example. • <OS type> links: Indicates whether or not Oracle Secure Backup should create symbolic links./. which is a subdirectory of your <OSB_Home> directory.bin.*/obtar run obopenssl: Indicates whether or not the Oracle Secure Backup installation tool should prompt you to run obopenssl and create the certificates for the Apache Web server. By default. Oracle Secure Backup uses the /usr/tmp directory on each host for the storage of transient files during installation./samples/*.0 root. Three link names must be specified: the name of the directory in which to create the “bin” links.0 755 700 700 700 755 4755 .19 . for example). and the name of the directory in which to create the “lib” link (for library files). The default value is /usr/etc/ob. the name of the directory in which to create the “etc” link (for daemons)./. Oracle Secure Backup requires that the temp directory be able to contain lockable files. • <OS type> temp dir: Is used to alter the location of the temp area. The default value is yes.Specifying Installation Parameters (continued) • <OS type> db dir: Is used to alter the directory in which Oracle Secure Backup retains host-specific information. are listed. Note: If the obparameters file specifies a lib directory for the operating system type of the current installation.so link in this directory.so file that resides in the operating system–specific lib directory (./admin . it may be more appropriate to place links in /bin instead of /usr/bin. • r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .bin. or in /usr/etc instead of /etc.

. Thus. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C ...20 . All rights reserved..20) packaging Oracle Secure Backup distribution for copy to client_z copying Oracle Secure Backup distribution to client_z copying Oracle Secure Backup installation tools to client_z completing installation on remote host .. a client installation is performed automatically.. no choice is provided regarding the new machine’s role. You need to specify the name of the machine and answer some basic questions. Oracle. Looking for an acceptable temporary work area on client_z.. This is because the installob script determined that the target machine could not be configured as an administrative or media server. The work area on client_z to be used for temporary install files is /tmp.done. Oracle Secure Backup installed successfully onto client_z Copyright © 2006. Client Installation: Example Assume in the example shown in the slide that you have just installed Oracle Secure Backup on the administrative server. OK to proceed [yes]? yes Installing Oracle Secure Backup onto client_z (HP-UX version 10. the complete output is not shown in the slide. as shown. and you now want to install Oracle Secure Backup on a client named “client_z. I'm ready to install Oracle Secure Backup on client_z as a client. you choose yes. For formatting reasons. Making sure target file system has enough space..” When the installob script gives you the possibility to install Oracle Secure Backup on another machine. Note: In this particular example.Client Installation: Example Would you like to install Oracle Secure Backup on any other machine [yes]? yes Enter the name of a host onto which you'd like to install Oracle Secure Backup: client_z Just a moment while I learn about client_z.

(c) a client Which would you like (one of a b c. Before you can configure the tape drive. Note: The procedure for configuring tape libraries or Fibre Channel devices is the same as the process for configuring SCSI tape drives. (b) a media server or. you can use the cat /proc/scsi/scsi command to obtain the necessary information. In addition to obtaining SCSI device information. In the example. Note: For formatting reasons. The setup program automatically installs Oracle Secure Backup on the remote host and prompts for information about the devices attached to the new media server. q to quit) [c]? b Oracle Secure Backup's Web Server Interface software has been loaded. Logical unit number [0]: # cat /proc/scsi/scsi SCSI bus address [0]: Attached devices: SCSI target ID [4]: 2 Host: scsi0 Channel: 00 SCSI lun 0-7 [0]: Id: 02 Lun: 00 Is the information you entered correct [yes]? Vendor: IBM Model: … : 4772 OK to proceed [yes]? Type: Sequential-Access… Oracle Secure Backup successfully onto media_x Copyright © 2006. … Does media_x have any SCSI tape libraries that you'd like to use with Oracle Secure Backup [no]? yes How many Oracle Secure Backup tape drives are attached to media_x [1]? Please describe each tape drive by answering the following questions. you specify that you want this new machine to be a media server. Media Server Installation: Example This example demonstrates a media server installation. This is a number between 0 and 31 and is used to create unique file names for the devices connected to the media server—for example. it is assumed that the media server has only one SCSI tape drive attached.Media Server Installation: Example 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. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .21 . /dev/obt1. Then. you need to obtain some physical SCSI information about the device. and so on. First. the complete output is not shown in the slide. All rights reserved. specify the host name of the machine that you want to add as a media server. /dev/obt0. you must also assign an Oracle Secure Backup logical unit number. For example. on a Linux platform. Oracle.

All rights reserved.Verifying Your Installation Some examples: • View Oracle Secure Backup processes in Linux: ps -e | grep ob • Use obtool commands to view Oracle Secure Backup users and default media family: ob> lsuser ob> lsmf --long Copyright © 2006. execute the following: $ obtool Oracle Secure Backup 10.1.0 login: admin Password: oracle << Password not echoed >> ob> lsuser admin admin oracle oracle 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 r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . Verifying Your Installation In the slide are some examples of how you can verify your installation.22 . To start the obtool utility. Oracle.

• Use the uninstallob script. Oracle. You must be logged in as the root user on UNIX or Linux systems to uninstall Oracle Secure Backup completely. – Call script from the parent directory of the Oracle Secure Backup home directory. – You must be logged in as the root user. For this reason. • Choose whether you want to save or remove the: – Oracle Secure Backup directory – Administrative directory Copyright © 2006. If you are not logged in as root when you uninstall the software. you can use the following command: # /bin/ps -ef |grep ob You can then use kill -9 <pid> commands to kill each process in the list associated with Oracle Secure Backup.23 . If you uninstall Oracle Secure Backup from the local machine. Uninstalling Oracle Secure Backup You can uninstall Oracle Secure Backup from a client or the administrative server. If you uninstall Oracle Secure Backup from an administrative server. All rights reserved. Oracle Secure Backup–related processes such as the HTTP processes for Oracle Secure Backup Web tool should be shut down before beginning the uninstallation process. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . you should call the uninstallob script from the parent directory of the Oracle Secure Backup home directory. This enables you to safely uninstall and reinstall the product without deleting your administrative server data. the uninstallob script removes the Oracle Secure Backup home directory when the script completes. you may not have the privileges needed to delete files and shut down the Oracle Secure Backup daemons. To identify processes for Oracle Secure Backup. you are given the option of retaining the administrative directory and its contents. • Close all sessions of Web tool.Uninstalling Oracle Secure Backup • Have all users log out of Oracle Secure Backup applications.

then run the uninstallob script again until you see the following message: Oracle Secure Backup has been successfully removed from <host>. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .24 .Uninstalling Oracle Secure Backup (continued) If you encounter errors when uninstalling the Oracle Secure Backup software. or if the uninstallob script fails to completely remove all the files for Oracle Secure Backup (assuming you did not choose to save any files). correct the problem causing the error if possible.

Oracle. All rights reserved.Summary This appendix provided assistance with the following topics: • Install Oracle Secure Backup on Windows • Locate and describe the Oracle Secure Backup installed files • Additional installation topics: – Specify installation parameters – Install Client: Example – Install Media Server: Example • Verify your UNIX installation • Uninstall Oracle Secure Backup Copyright © 2006.25 . r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C .

r O cl a In e rn te l& a O I A s U O e ly n .

________ D Glossary ________ r O cl a In e rn te l& a O I A s U O e ly n .

Advanced Intelligent Tape. One administrative server can service all clients on your network. A device must have at least one attachment. This host stores configuration information and the catalog files for client hosts. Defines the way in which Oracle Secure Backup authenticates itself to the NDMP server. There must be one and only one administrative server for each administrative domain at your site. which starts and monitors backups within the administrative domain. and often has multiple attachments. The administrative server runs the scheduling daemon. you should use the negotiated default setting. a magnetic tape and drive system used for computer data storage and archiving Important indicator of the performance of the disk and drive that corresponds to the number of magnetic bits per unit area A public-domain Web server used by the Oracle Secure Backup Web interface tool. or an NAS device name. application programming interface An attachment describes a data path between a host and a storage device. Most often.Term administrative domain administrative server AIT Areal Density Apache Web server API attachment authentication type r O cl a In e rn te l& a Definition A group of machines on your network that you manage as a common unit to perform backup and restore operations. Typically. one for each host that can directly access it. an attachment comprises the identity of a host plus a UNIX device special file name. A host where you install Oracle Secure Backup. a Windows device name. Your choices are: • Default • None • Negotiated • Text • Md5 O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-2 .

The smallest amount of information in a binary digital system that can be used to represent two states of information such as YES or NO. Basically it is the list of files that are backed up in one operation. A portion of a backup image file that exists on a single tape. For example. Each backup section is uniquely identified by a backup ID. A backup operation that is scheduled to run at a specific time. An integer identifier that uniquely identifies a backup image section The product of an Oracle Secure Backup backup operation. The level that defines the comprehensiveness of the backup operation. The first block of a backup image. One or more backup pieces make up a backup set. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-3 .Auxiliary Storage/ External Storage/ Bit backup description file backup ID backup image backup image label backup image section backup job backup level backup operation backup piece r O backup piece expiration time cl a In e rn te l& a Secondary Storage. One backup image can contain multiple sections. A binary file written in a proprietary format by RMAN for storing backup data. It lists host names and directories that you want to back up. A process by which data is copied from primary media to secondary media. This expiration date is determined when the backup piece is created. All addressable data storage that is not currently in the computer’s main storage or memory. A text file you create that is used with command-line interface backup operations. and corresponds to its creation time plus its expire duration. The time the job is scheduled to run can be either immediately or some time in the future. a level 2 backup operation backs up all data changed since the previous level 1 or level 2 backup. A backup image can contain one or more media families and volume sets. It contains the backup image’s file and section numbers and owner.

Oracle Secure Backup fails with an error. Because higher blocking factors usually result in better performance. or a combination of letters and numbers as in ASCII code. Also referred to as archive sections. See backup image section. processor instructions. Backup Solutions Program A collection of wires through which data is transmitted from one part of a computer to another Eight bits of information that can represent 256 different states—for example. See Database Backup Storage Selector. Oracle Secure Backup writes 64 K blocks to tape (blocking factor 128). you can try a blocking factor larger than obtar’s default. Some tape libraries have an automated means to read barcodes. which Oracle Secure Backup supports. If you pick a value larger than is supported by the operating system of the server. Certificate Authority A hierarchical collection of files that contains all the information used to define your Oracle Secure Backup administrative domain configuration O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-4 . The backup schedule contains the names of each such dataset and the name of the media family to use. numbers.backup schedule backup sections backup set Backup Storage Selectors backup trigger backup window barcode BDF blocking factor BSP bus byte r O CA catalog cl a In e rn te l& a A description of when and how often Oracle Secure Backup is to back up one or more datasets. A calendar-based time at which a particular scheduled backup becomes eligible to run Defines a time range within which Oracle Secure Backup executes scheduled backup jobs A symbol code that is physically applied to volumes for identification purposes. A collection of Oracle Database data backed up by RMAN. Specifies how many 512-byte blocks to include in each block of data written to each tape drive. See backup description file. By default.

a new file access protocol designed to take advantage of standard memory-to-memory interconnect technologies See Direct Access Recovery. Defines a set of rights that are granted to an Oracle Backup user command-line interface Any machine to be backed up by Oracle Secure Backup. and the Oracle Secure Backup software. those parts of a wide-area network in which the mass storage devices are connected locally Digital audio tape. which accesses the database. which manages the underlying media. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-5 . starting with 1. observided) and others are started and stopped as required (for example. Secondary storage device within a tape library usually referred to by a number. including administrative servers and media servers. A process on UNIX and Linux that runs in the background and performs an OSB task for an application. They act as a glue layer between RMAN. Some daemons run continually (for example. also referred to as a host CIFS is a protocol. each DTE is sequentially numbered. obrobtd). command descriptor block See Common Internet File System.catalog CDB CIFS class CLI client Common Internet File System daemon DAFS DAR data transfer element (DTE) dataset description file DAS DAT Data Mover daemon Database Backup Storage Selector r O cl a In e rn te l& a An index of the contents of a tape. Direct Attached Storage. This is equivalent to a service on a Windows host. A file that contains the names of the hosts and paths that you want Oracle Secure Backup to back up. a type of 4-mm tape An operating system process that writes the data to tape These objects are configured to represent backup and restore parameters that describe an Oracle database. used by Windows clients to access data on this Network Appliance filer. Direct Access File System. In libraries that contain multiple drives.

a type of 4-mm tape A set of configuration data that explains how Oracle Secure Backup runs in an administrative domain A tape drive or library identified by a userdefined device name A routine or set of routines that implements the device-specific aspects of generic I/O operations. also referred to as local Digital Linear Tape technology. The DNS host name is the host name of the computer (does not include the domain). Any system attached to the Internet or any large network conforms to a more rigorous naming convention as part of the Domain Name System (DNS). or keyboard. The operating system handles the device-independent aspects of the I/O operation but calls routines provided by the driver for the device in question to implement the device-specific functions. must have a driver program. Most devices have their drivers installed when the device or product that uses it is installed.dataset DDS defaults and policies device device driver Direct Access Recovery (DAR) direct-attached DLT DMA DNS hostname r O cl a In e rn te l& a A textual description employing a lightweight language that tells Oracle Secure Backup what files to back up Digital data storage. a form of magnetic tape and drive system used for computer data storage and archiving data management agent Every UNIX system (also known as a host) has a host name. An optional capability of NDMP that addresses the need to quickly restore a single file from a stream of backup data that might contain millions of individual files. Located on the same host or server. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-6 . whether it is connected to a network or not. every host name is composed of a host name and domain name. whether it is a printer. DAR relies on file history information generated at the NAS device during a backup operation. which is a symbolic name used to reference a particular system. In DNS. Every device. disk drive.

(an external enclosure that houses a printed circuit board (PCB) and multiple drive receptacles) and a Fibre Channel host bus adapter (HBA). A high performance interface designed to bring speed and flexibility to multiple diskdrive storage systems.024 x 1. an interface standard for connecting computers to mass storage devices such as disk drives and tape libraries fiber distributed data interface A set of ANSI protocols for sending digital data over fiber optic cable. FDDI networks are token-passing networks. Within the Internet. This label contains the volume ID of the next volume in the set A unit of storage equal to 1. A Fibre Channel configuration consists of a backplane. All devices sharing a common part of the IP address are said to be in the same domain. and support data rates of up to 100 Mbps (100 million bits per second). domains are defined by the IP address.024 x gigabytes or just over 1 billion gigabytes The time the volume set is first written + the write window duration + the retention duration A media family configuration setting that determines when volumes are eligible to be overwritten The amount of time after a backup piece is created during which Oracle Secure Backup cannot overwrite the data Fibre Channel. FDDI networks are typically used as backbones for wide-area networks.domain EOD EOV exabyte expiration date expiration policy expire duration FC FDDI Fiber Distributed Data Interface Fibre Channel r O cl a In e rn te l& a A group of machines and devices on a network that are administered as a unit with common rules and procedures. The backplane allows O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-7 .024 x 1. End-of data (EOD) label used to mark the end of Oracle Secure Backup operations on tape End-of-volume (EOV) label used to mark the end of a volume within a backup image.

the set of rules for exchanging files (text. supplies power to the drives. abbreviated as G or GB. and controls the input and output of data on all drives within the system. Files are backed up whether or not they have changed since the last backup.024 megabytes A term describing various technologies for implementing Ethernet networking at a nominal speed of one gigabit per second graphical user interface Host bus adapter. a media server. an interface card that plugs into the computer’s bus and connects it to the network An addressable machine in a computer network A class of actions performed by a host.file system dataset filer firewall full backup GBIC gigabyte Gigabit Ethernet (GbE) GUI HBA host host role HTTP r O cl a In e rn te l& a direct connection to the drives (no cable). IP and a wide range of other protocols to meet the needs of the data center. sound. equal to 1. an interface module which converts the light stream from a fibre channel cable into electronic signals for use by a network interface card A unit of storage. video. or a client. graphic images. allows concurrent communications among workstations. Fibre Channel. mainframes. a one and two gigabit interconnect technology. A collection of files backed up by Oracle Secure Backup An appliance attached to a computer network that is used for data storage A system designed to prevent unauthorized access to or from a private network An operation that backs up all the files selected on a client. and other multimedia files) on the World Wide Web O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-8 . servers. data storage systems. Hypertext Transfer Protocol (HTTP). GigaBit Interface Converter. You can have an administrative server. and other peripherals using SCSI.

Used in tape libraries to move volumes into and out of the library without opening the door. iSCSI enables data blocks to be read from or sent at high speed to a storage device such as a disk or tape drive. where N is the level of comprehensiveness of the backup operation The Indexed Sequential Access Method (ISAM) is a method for managing how a computer accesses records and files stored on a hard disk. Pronounced “eye-scuzzy. Some libraries do have a media access port. While storing data sequentially in a data file. Just a Bunch of Disks. but some require manual action by the operator to open the door and remove a tape from a slot in the library.HTTPS import-export element (IEE) incremental backup ISAM iSCSI JBOD job summary r O job transcript cl a In e rn te l& a Hypertext Transfer Protocol Secure (HTTPS) is a communications protocol designed to transfer encrypted information between computers over the World Wide Web. The combination of the data file and its associated index file is called a “database. HTTPS is HTTP using a Secure Socket Layer (SSL). a term used for a storage enclosure that is supplied with preintegrated disk drives A text file report produced by Oracle Secure Backup that describes the status of selected file system backup and restore jobs A file that contains the standard output from a particular backup job O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-9 . It is sometimes called a mail slot.” ISAM is implemented as a C function library. Not all libraries have a discrete import-export element.” an acronym for Small Computer System Interface protocol over IP network instead of a direct SCSI compatible cable. ISAM provides direct access to specific records through an index. and is physically present only on certain libraries. A process that captures data that was changed since the level N backup operation.

A machine with one or more attached tape drives or tape libraries. which means that users will have multiple sources of product and media See logical unit number. Linear Tape-Open technology. A library with multiple media servers connected to it See Network Attached Storage. overwrite. abbreviated as K or KB. Valid values are read-only. Backup data is sent to and restored from volumes loaded in these devices.576 bytes media management vendor The mode indicates the way in which the scheduling system can use a volume physically loaded into a tape drive. IBM. equal to 1. equal to 1.048.kilobyte label LAN library lights out backup logical unit number LTO LUN magazine media family media server medium transport element (MTE) megabyte MMV mount mode r O NAS multi-hosted tape library cl a In e rn te l& a A unit of storage. and not-mounted. an “open format” technology. write/append.024 bytes Data that Oracle Secure Backup uses to identify a volume or a backup image local area network See tape library. Each media family identifies the amount of time that data can be written to a tape. Moves a volume from a storage element to another element within a tape library A unit of storage abbreviated as M or MB.024 x 1. A collection of tapes or volumes A classification of backup media that share the same volume identification sequence.024 or 1. developed jointly by HP. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-10 . An automated backup that does not require user interaction and typically is performed outside of normal working hours An internal mapping identifier used by Oracle Secure Backup for a specific device. LUNs make it possible for a number of devices to share a single SCSI ID. A media family can contain one or more volume sets and volumes. and Seagate. and the amount of time the tape can remain in storage before it can be overwritten.

Layered atop TCP and the Berkeley socket model. The name of a backup method supported by the NDMP Data Service running on a host. One of three types of NDMP services. most commonly NFS and CIFS. A text file that describes your network configuration and is used to push software across the network to designated machines during installation A hard disk physically attached to a server and accessible over a network A client/server application that enables all network users to access shared files stored on computers of different types. network messages. NFS provides access to shared files through an interface called the Virtual File System (VFS) that runs on top of TCP/IP.NDMP NDMP backup type NDMP Data Service Network Attached Storage network description file network drive Network File System r O cl a In e rn te l& a The Network Data Management Protocol (NDMP) is a network applications protocol facilitating data backup and restore. Wintel platforms. NDMP is commonly used by NAS devices (also known as filers) to facilitate backup and restore operations without having to install the backup agent (Oracle Backup. for example) on the appliance. NDMP defines a set of related service models. The server exposes the file systems to its clients through one or more standard protocols. open systems. The data service interfaces with the primary storage device (such as a NAS device) and interacts with the volume or file system that is being either backed up or restored. Backup types are defined by each Data Service provider. A computer on your network that hosts file systems. and closed operating system appliances. Users can manipulate shared files as if they were O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-11 . The protocol provides a uniform means to back up and restore data within and between diverse kinds of storage servers. and finite state automations that implement them. The NAS appliance communicates with the backup software using NDMP.

NFS nibble NT File System NTFS object OCFS offsite backup operator operator assistance request Oracle Secure Backup scheduler r O cl a In e rn te l& a stored locally on the user’s own hard disk. Oracle Cluster File System A backup that is equivalent to a full (level 0) backup except that Oracle Secure Backup keeps a record of this backup in such a manner that it does not affect the full or incremental backup schedule. A person who runs backup operations. manages schedules. With NFS. The NFS standards are publicly available and widely used. such as transaction logs to help restore from disk failures. A unit of information equal to 4 bits (or half a byte) One of the file systems for the Windows operating system. NTFS has features to improve reliability. and as servers while providing remote users access to local shared files. and policy objects that hold attributes and names. such as mounting a different volume during a backup A daemon that automatically starts backup jobs on the specified day and time O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-12 . Internal names are named with a UUID. See NT File System. A data storage type used to store Oracle Secure Backup catalog data. class. external names are user assigned. See Network File System. swaps tapes. This is useful when you want to create a backup image for offsite storage without disturbing your schedule of incremental backups. computers connected to a network operate as clients while accessing remote files. There are user. and checks for any errors A request from Oracle Secure Backup that asks for the operator to perform a task.

the viewer cannot see the code. and Windows users. which of the server’s network interfaces should be used to transmit data to be backed up or restored. It works by sending a packet to the specified address and waiting for a reply. A backup piece that exists in the Oracle Secure Backup catalog but not in the RMAN catalog Operating system file privileges that allow different users to read. You can use ping hosts to troubleshoot network connections. which allows Oracle Secure Backup to maintain a consistent user identity across the various hosts. It also allows Oracle Secure Backup to express a finer granularity of user rights than are possible with existing user definitions. A utility to determine whether a specific IP address is accessible. a network can have both Ethernet and FDDI connections between a pair of hosts. or execute files A unit of storage equal to 1. or just over a million gigabytes Hypertext Preprocessor (PHP) is an open source. PHP can perform the same tasks as a CGI program and is compatible with many different kinds of databases. PHP is embedded within tags. Stands for Packet Internet Grouper. server-side HTML scripting language used to create dynamic Web pages. Linux. A network can have multiple physical connections between a client and the server performing a backup or restore on behalf of that client. you can specify. Using PNI. Because PHP is executed on the server. Real Application Clusters O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-13 .024 terabytes. See Preferred Network Interface. distinct from the name spaces of existing UNIX. write.Oracle Secure Backup user orphan permissions petabyte PHP ping PNI Preferred Network Interface r O RAC cl a In e rn te l& a A user definition. so the author can move between HTML and PHP instead of using large amounts of code. For example. on a client-by-client basis.

Connection to the SCSI bus is achieved through a host adapter and a peripheral controller. A parallel I/O bus and protocol that permits the connection of a variety of peripherals to host computers with independence within a class of devices (such as disk drives and backup devices).RAID recycling policies recycling volumes restore operation restore operator list retention duration RMAN RMAN preauthorization SAIT SAN SBT schedule SCSI r O cl a In e rn te l& a Originally. is performed. an acronym for Redundant Array of Inexpensive Disks to reflect the data accessibility and cost advantages that properly implemented arrays could provide. a Small Form Factor ½″ tape cartridge See Storage Area Network. Super Advanced Intelligent Tape. See expiration policy. RMAN communicates with Oracle Secure Backup through the SBT interface. interface between RMAN and storage media. The acronym has evolved to mean Redundant Array of Independent Disks emphasizing the technique’s potential data availability advantages over conventional disk storage systems. This list is defined in the obconfig file on the administrative server. System backup to tape. This allows for the use of Oracle Secure Backup without going through the normal Oracle Secure Backup login requirements. Linux has a four- O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-14 . Overwriting data on volumes generated by Oracle Secure Backup Copies files from the tapes in a backup device to the file system on a designated host A list of operators to whom restore data requests are e-mailed. Recovery Manager Used to determine the Oracle Secure Backup user under which a specific RMAN operation.” an acronym for Small Computer System Interface. See expiration policy. A user-defined time period for executing backup operations Pronounced “scuzzy. such as backup or restore.

and Adleman). SSL uses the public-and-private key encryption system from RSA (a public key algorithm. 0 to 15 for 16-bit and 0 to 31 for 32 bit systems.SCSI lun number SCSI target ID SDLT/SuperDLT section number Secure Sockets Layer (SSL) r O sequence number cl a In e rn te l& a level hierarchical addressing scheme for SCSI devices: • SCSI adapter number [host] • Channel number [bus] • ID number [target] • Logical unit number [lun] Each SCSI bus can have multiple SCSI devices connected to it. The unique address of a SCSI device. A number that is recorded in the volume label to indicate the order of volumes in a volume set O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-15 . which are commonly known as SCSI devices. the host bus adapter is called the “initiator” and takes up one SCSI target ID number (typically 7). SCSI target IDs range from 0 to 7 for 8-bit. In SCSI parlance. The initiator talks to targets. and 32-bit up to 32 IDs. Each SCSI device can contain multiple Logical Unit Numbers (LUNs). There must be a minimum of one target and one initiator on the bus. 16-bit up to sixteen IDs. 8-bit SCSI can have up to eight IDs. The value used to identify a logical unit of a SCSI device. a variant of DLT technology that makes it possible to store upwards of 100 GB on a single cartridge and can transfer data at speeds of up to 10 megabytes per second A number that is recorded in the volume label to indicate the order of the parts of a backup image that spans multiple volumes An application layer protocol created by Netscape for managing the security of message transmissions in a network. which also includes the use of a digital certificate. there may be up to eight logical units for each SCSI device address. named after its inventors: Rivest. In the SCSI-2 specification. These logical units are numbered from 0 through 7. Shamir. Super Digital Linear Tape technology.

A physical location within a tape library where a volume can be stored and retrieved by a tape library’s robotic mechanism See Database Backup Storage Selector. commonly used for backup and archiving. Popular for its ability to store large amounts of data. or machines that contains disks for storing data. or secondary storage. A SAN is designed to assign data backup and restore functions to a secondary network where they can perform their tasks without interfering with the functions and capabilities of the server. A data storage medium consisting of a magnetizable oxide coating on a thin plastic strip. A high-speed subnetwork of shared storage devices.service services daemon single-hosted tape library SNIA storage consolidation SSL Storage Area Network storage element (se) storage selector tape tape file mark r O cl a In e rn te l& a A process on Windows that runs in the background and performs a task for an application. Some services run continually and others are started and stopped as required. and for its portability. a non-profit trade organization. A tape library with only one media server directly attached to it Storage Networking Industry Association. It ensures that tape resources are available and reserves them for the backup job. The observiced daemon. incorporated in December 1997 whose members are dedicated to “ensuring that storage networks become complete and trusted solutions across the IT community” The concept of centralizing and sharing storage resources among many application servers See Secure Sockets Layer (SSL). Tapes are also referred to as removable media. A marker written to tape by Oracle Secure Backup that signals the end of a backup image O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-16 .

A volume can contain one or more backup images. then adding the volume retention period.tape library terabyte TCP/IP trigger URL UUID virtualization volume volume expiration time r O cl a In e rn te l& a An automated tape-handling hardware device that invariably house two or more drives and from 10s to 100s of tapes. equal to 1. Oracle Secure Backup computes this by adding the write window duration. It is the suite of protocols used to connect hosts for transmitting data over networks. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-17 . and an I/O Port for importing and exporting individual tapes under application control. if any. A single unit of media such as an 8-mm tape. abbreviated as T or TB. Tape libraries are designed for continuous.024 gigabytes Transmission Control Protocol/Internet Protocol. or the address of a resource available on the Internet Universal Unique Identifier. unattended operation and allow simultaneous reading and writing to multiple drives. A unit of storage. The date and time on which a volume expires. It is also referred to as a robotic tape device. autochanger. used for tagging objects across a network The pooling of physical storage from multiple network storage devices into what appears to be a single storage device that is managed from a central console. Tape libraries also offer key features such as barcode readers to scan labels on cartridges. A library accepts SCSI commands to move media between storage locations and drives. to the time at which it wrote backup image file number 1 to a volume. or medium changer. A user-defined period in time or sets of times that causes a scheduled backup to run The Uniform Resource Locator.

then adding the volume set retention period A field that is commonly used to hold the barcode identifier for the volume. It contains the volume ID. Volume IDs appear in volume labels and backup image labels. Computers connected to a wide-area network are often connected through public networks. The first block of the first backup image on a volume. Each Oracle Secure Backup volume has an associated field called a volume tag. if the backup image is contained on a multivolume set. Oracle Secure Backup begins each backup image with a label that uniquely identifies the backup image. For example. Wide-area network. A file that contains a unique volume ID to assign when labeling a volume The volumes that comprise a backup image The date and time on which a volume set expires. a WAN consists of two or more local-area networks (LANs). It is another name for the barcode that can be found in the volume label. VOL000001 appears in the volume sequence file.volume ID volume label volume sequence file volume set volume set expiration time volume tag WAN r O cl a In e rn te l& a A label that uniquely identifies the volume and includes the backup image’s file number and additional information. computed by adding the write window duration. or a computer network that spans a relatively large geographical area. and date and time for the volume creation. if any. to the time at which the first backup image file was written to the volume set. They can also be connected through leased lines or satellites. owner name. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-18 . Typically. The largest WAN in existence is the Internet. such as the telephone system.

The format of the WWN is defined by the Institute of Electrical and Electronics Engineers (IEEE). or delete them. reused. append data to them. usually by appending additional backup images. or until it is relabeled. and closes after this specified period has elapsed. The period of time for which a volume set remains open for updates. edit them. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-19 . WWNs consist of 16 hexadecimal digits grouped as 8 pairs. you cannot write to them. or forcibly overwritten.World Wide Names (WWNs) WORM write date write-protect write window r O cl a In e rn te l& a A unique identifier for devices on a storage area network (SAN). a class of optical recording systems that allow recording and adding data but not altering recorded data Defines the period of time. Write Once Read Many times. After the write window closes. Oracle Secure Backup does not allow any further updates to the volume set until it expires. starting from the volume’s first data write operation. The write window opens at the time the volume set is created. unlabeled. It is also referred to as a WWPN (Worldwide Port Name) or WWNN (Worldwide Node Name). Writeprotected files and media can only be read. These are written with colon characters separating each pair. during which updates to the volume are allowed To mark a file or media so that its contents cannot be modified or deleted. similar to a media access control (MAC) address for devices connected via Ethernet.

r O cl a In e rn te l& a O I A s U O e ly n .

Sign up to vote on this title
UsefulNot useful