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 .

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

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 . you configure your database for recoverability.Practice for Lesson 2 In this practice.

3) Set Preferred Credentials in Enterprise Manager. 4) Use Recovery Manager (RMAN) to connect to your target database.Practice 2-1: Configure Your Database 1) Use Enterprise Manager to configure your database in ARCHIVELOG mode. 5) Use the RMAN SHOW ALL command to view the configuration settings in your database and then exit from your RMAN session. 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. Make note of the database identifier (DBID) of your database.

you configure automatic backup of the control file. 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 .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. 6) Use Enterprise Manager Database Control to perform a crosscheck of your backups. 4) Use Enterprise Manager to view information about your backups.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. Specify /u01/app/oracle/oradata/orcl/chg_track.f for the name of the block change tracking file. 2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking. 3) Use Enterprise Manager Database Control to create a whole database backup using the Oracle-suggested backup strategy.

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 .Practice for Lesson 4 In this practice. you use RMAN to perform 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 A-9 . 2) At the operating system prompt.JOBS table. you use RMAN to recover a lost datafile. Notice how you are prompted by Enterprise Manager to recover the lost datafile. 4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace datafile.Practice 4-1: Use RMAN to Recover a Datafile In this practice.JOBS table.REGIONS table. Make note of the number of rows in the HR.REGIONS table. 1) Use SQL*Plus to query the HR. 5) Return to your SQL*Plus session and again attempt to query the HR. This script deletes the EXAMPLE tablespace datafile. execute the lab_04_01_02_01. 3) Use SQL*Plus to query the HR.sh script to simulate a failure in your database.

8) Use Enterprise Manager Database Control to verify the file. 4) Use the RMAN SWITCH TO COPY command to recover the datafile. 5) Query the HR.JOBS table.DEPARTMENTS table.REGIONS table. This script deletes the EXAMPLE tablespace datafile.REGIONS table. 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. execute the lab_04_02_02_01. 2) At the operating system prompt. 6) Using Enterprise Manager Database Control. 1) Use SQL*Plus to query the HR.sh script to simulate a failure in your database. verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area. Make note of the number of rows in the HR.Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile In this practice. 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 .

3) You need some more information about your control files. Use Recovery Manager to recover the control 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 A-11 .Practice 4-3: Recover Control Files In this practice. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file. you recover your control file using an autobackup.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. 2) Simulate a failure in your environment by executing the lab_04_03_02_01. Query V$CONTROLFILE.

3) You can also use RMAN to verify that your obsolete backups were 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 A-12 . 2) Use Enterprise Manager Database Control to delete obsolete backups.Practice 4-4: Delete Obsolete Backups 1) Use Recovery Manager to view obsolete backups.

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 . you use Oracle Flashback features to recover from errors in your database.

Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database. 2) Use the ALTER DATABASE command to enable supplemental logging. 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 .

sql script to update the POSTAL_CODE column in the HR.LOCATIONS table. 4) Execute the lab_05_02_04_01. 3) Use SQL*Plus to query the POSTAL_CODE column in the HR.sql script to query the POSTAL_CODE column in HR.sql script to query the POSTAL_CODE column in the HR. 7) Return to your SQL*Plus session. 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.LOCATIONS again to be sure the correct values have been restored.LOCATIONS table. 5) Execute the lab_05_02_05_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 . 1) You must enable row movement to use restore points. 2) Create a normal restore point. 6) Restore the POSTAL_CODE column values using the restore point. Use Enterprise Manager to enable row movement for the HR.Practice 5-2: Set Restore Points and Perform Flashback Table Restore points are a way to “bookmark” database points in time.LOCATIONS table so that all postal codes are set to 11111.LOCATIONS table again. Execute the lab_05_02_07_01.

sql script to update the POSTAL_CODE column in the HR. 4) Execute the lab_05_03_04_01.sql script to update the POSTAL_CODE column in the HR.Practice 5-3: Use Flashback Query and Flashback Versions Query 1) Execute the lab_05_03_01_01. 2) Execute the lab_05_03_02_01.LOCATIONS table for location ID 1400.LOCATIONS table to confirm the Flashback operation.LOCATIONS table. simulating user error. 3) Execute the lab_05_03_03_01.LOCATIONS and view the change.sql script to query the HR. simulating user error. 6) Return to your SQL*Plus session.sql script to query the POSTAL_CODE column in HR.LOCATIONS table. 5) Use Enterprise Manager to perform Flashback Versions Query to correct the user errors. 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-16 .

Record the number of rows: ___________ 4) Execute the lab_05_04_04_01.JOB_HISTORY 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-17 . 6) Use Flashback Database to restore the HR. 3) Execute the lab_05_04_03_01.sql script to determine the number of rows in the HR.sql script to query the HR.JOB_HISTORY table again to be sure the data has been restored. 5) Execute the lab_05_04_05_01. 7) Return to your SQL*Plus session.JOB_HISTORY table rows.JOB_HISTORY table.sql script to truncate the HR. Execute the lab_05_04_07_02.Practice 5-4: Use Flashback Database 1) Use Enterprise Manager to verify that Flashback Database is enabled.sql script to determine the number of rows in the HR.JOB_HISTORY table. 2) Use Enterprise Manager to create a Guaranteed Restore Point.

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 .Practice for Lesson 6 In this practice. you create a duplicate database.

11) Change your ORACLE_SID to orcl in preparation for later practices.ora file. you use RMAN to create a duplicate database on the same host as your database. 5) Create a server parameter file (SPFILE).Practice 6-1: Create a Duplicate Database In this practice. 8) Create the duplicate database by executing the DUPLICATE command. 9) Use SQL*Plus to log in to your AUX database and execute a query against the HR. 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. 1) Create an Oracle password file for your auxiliary instance. 2) Use Oracle Net Manager to create an entry called AUXDB in the tnsnames. 6) Verify that your target database (orcl database) is mounted or open.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-19 . shut down the aux instance.ora file. 7) Start RMAN with a connection to the target database (orcl) and the auxiliary instance. 3) Create an initialization parameter file for the auxiliary instance.

Practice 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 A-20 . you use tablespace point-in-time recovery to recover from unwanted changes to your database.

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

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.

7) In preparation for later practices.The tablespace for the recovery catalog and the recovery catalog owner have been created in the instructor database. (If you are using PC01.) The service name is RCDB. 6) Use the PRINT command to query the recovery catalog and verify the creation of your whole_backup script. Create the recovery catalog in your assigned tablespace. 5) Create an RMAN script named whole_backup to make a whole database backup. 1) Connect to the recovery catalog database (instructor’s database) with the appropriate recovery catalog owner name (if you are using PC01. What happens? Why? 4) Register the target database in the recovery catalog. connect to your target database and the recovery catalog database. The users are named RCUSER01 – RCUSER12. 2) Using RMAN. use RMAN to unregister your database from the recovery catalog. connect as RCUSER01) using RMAN. execute the command to resynchronize the control file and recovery catalog. Do not execute the whole_backup script at this time. your assigned tablespace is RCTS01. You can use RMAN commandline or Enterprise Manager for this step. 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 . The tablespaces are named RCTS01 – RCTS12. 3) Using RMAN.

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. you monitor the progress of your RMAN backup jobs.

sql script to query V$SESSION_LONGOPS. 3) Return to your first terminal window.Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups 1) Invoke RMAN and delete all obsolete backups. In your RMAN session. You will use this second session to monitor a database backup. 2) Open a second terminal window. Execute the lab_09_01_04_01. Invoke SQL*Plus and connect as SYSDBA. By using this view you can determine whether the backup is progressing normally or hanging. Change to the 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-25 . If the backup is progressing normally. 4) Use your SQL*Plus session to monitor the progress of the whole database backup by querying the V$SESSION_LONGOPS view. begin a whole database backup. the TIME_REMAINING column should be decreasing.

3) Start a whole database 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-26 . 2) Delete obsolete backups. 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.

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.Practice for Lesson 11 In this practice. • View information about the configured devices. • Install the Oracle Secure Backup software. 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 . • Register your administrative server with EM. THEY ARE NOT SUPPORTED FOR PRODUCTION USE. • Test connectivity to the tape drive. • Insert four volumes into the tape library. • Define a new Oracle Secure Backup user. • Connect to the EM Database Console application using your browser. you perform the following tasks: • Create your Oracle Secure Backup home directory. THE VIRTUAL TEST DEVICES USED IN THIS LAB ARE FOR TRAINING PURPOSES ONLY. • Configure virtual test devices.

Unless specified otherwise during this practice. 2) Continue as the root user. • Your Oracle Secure Backup home directory is /usr/local/oracle/backup. • During installation. 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 . Change to that directory.Practice 11-1: Install Oracle Secure Backup In this practice. 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 should log in as the oracle user to your terminal emulator session. you perform the following tasks: • Create your Oracle Secure Backup home directory. Begin with the setup program. you configure only the local machine as an administrative server with no attached devices. Start the installation of Oracle Secure Backup from the staging directory. • 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.

(Hint: Use the lsmf --long command. you perform the following tasks: • Configure a virtual test library and a virtual test drive. execute the .) 4) View the RMAN-DEFAULT media family. to configure the vt tape drive for the library: 3) Start the obtool as the admin user with the oracle password. and view the currently configured devices. to configure the vlib tape library directly attached to your administrative server.Practice 11-2: Configure Devices for Oracle Secure Backup In this practice. 1) In a terminal window. 2) In the /home/oracle/labs directory./lab_11_02_02. (Hint: Use the lsdev command. and use the quit command to exit. • View information about the configured devices and the default media family via the obtool interface./lab_11_02_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-30 .sh script. navigate to the /home/oracle/labs directory and execute the . .sh script.

(An unlabeled tape is synonymous with a blank tape within Oracle Secure Backup. • Register your administrative server with EM. 3) Use Enterprise Manager to insert four volumes into the vlib test library. 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 . you want to make sure you can access your tape drives. 1) With your browser. • Insert four volumes into the virtual test library. you perform the following tasks: • Connect to the EM Database Console application using your browser. connect to Enterprise Manager Database Control using the IP address or machine name for your host. you should log in as the oracle user to your terminal emulator session.) 4) Before taking any backups. and as SYSDBA to your Database Control console and SQL*Plus sessions.In this practice. On the Devices page. 2) In Enterprise Manager. • Test connectivity to the virtual test drive. Unless specified otherwise. register your administrative server. test the virtual tape drive access.

such as clicking the Administrative Server link in the upper-left part of the Devices page. you should log on as the oracle user to your terminal emulator session and as SYSDBA to your EM Database Control Console session. UNIX group: dba and NDMP server user: no. Best Practice Tip: Limit pre-authorized access to selected hosts. • Configure preauthorization for this user.In this practice. but inside the regular classrooms. Password: oracle. so set the value to “no. you can use shortcuts. you perform the following tasks: • Define a new Oracle Secure Backup user. UNIX name: oracle. OS username: *. you can have two windows open. Note: If you have an NDMP server. Windows domain name: *.” 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. 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. one for Enterprise Manager and the other for the Oracle Secure Backup Web tool. 1) Use the Oracle Secure Backup Web tool to create the oracle Oracle Secure Backup user with the following values: User oracle. 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 . User class: oracle. set the value to “yes”. Unless specified otherwise. and Attributes: cmdline and rman. If you are already in Enterprise Manager.

• Perform a backup of your Oracle database with the Oracle-Suggested Backup strategy.Practice for Lesson 12 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-33 . you perform the following tasks: • Create a database backup storage selector for your database.

you perform the following tasks: • In SQL*Plus. Unless specified otherwise. and as SYSDBA to your Database Control Console and SQL*Plus sessions. create a database backup storage selector for your Oracle database. create a backup selector for your database with the following specifications: • • • Tape Drives: 1 Host Credentials Username: oracle. and Incremental 3) Test your tape backup. perform a test backup to verify that the Oracle Secure Backup configuration is correct. • In Enterprise Manager. Auto Backup. If your database is in ARCHIVELOG mode. • In Enterprise Manager. continue with the next step. shut down the database. Password: oracle. and then restart the database. and “Save as Preferred Credential” Database Backup Types: Archive log. 1) First. verify that the database is in ARCHIVELOG mode. verify that the database is in ARCHIVELOG mode.Practice 12-1: Create a Database Backup Storage Selector In this practice. enable archiving. Full. you should log on as the oracle user to your terminal emulator 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-34 . If not. 2) In Enterprise Manager.

you should see a full backup (otherwise an incremental one) first to the Flash Recovery Area. you should log on as the oracle user to your terminal emulator session.html viewlet in the /home/oracle/solutions/viewlets directory. perform Oracle-Suggested Backup. 1) In Enterprise Manager. schedule Oracle-Suggested Backup with the following specifications: • • • • Backup destination: both disk and tape Daily backup of archivelogs and incremental backup Tape Drives: 1 Schedule daily backup within 5 minutes of your current date and time 2) Review your backup job. as well as the job execution. then to tape. 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. Review the RMAN command. to reinforce this practice topic. and as SYSDBA to your Database Control Console and SQL*Plus sessions. Unless specified otherwise. 3) Optionally. If this is your first scheduled backup.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 A-36 . • Schedule a backup of the dataset. you perform the following tasks: • Create a dataset for a file-system backup.Practice for Lesson 13 In this practice.

Query the Manage: Jobs page for the previously created and executed job. 3) View Oracle Secure Backup job information. you can view the Scheduling_filesystem_backups_viewlet_swf. 2) Create a backup with your mylabs dataset. access Enterprise Manager as SYDBA and the Oracle Secure Backup Web tool as admin user. The backup should run immediately. to reinforce this practice topic. Both use oracle as password. which can be accessed from Enterprise Manager for the tasks in this practice session. 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. 1) Create a new dataset called mylabs that you will use to back up your $HOME/labs directory.html viewlet in the /home/oracle/solutions/viewlets directory. 4) Optionally. 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 . Note: Do not back up the local root directory.Practice 13-1: Back Up Your File System with Oracle Secure Backup Use the Oracle Secure Backup Web tool. Unless specified otherwise.

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 . • Restore the missing lab files. • Verify that the files are recovered. you perform the following tasks: • Delete the contents of your labs directory.

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. 2) Restore your $HOME/labs directory contents by selecting the appropriate backup from the Oracle Secure Backup catalog.In this practice. 1) From your terminal emulator session. remove all the files located in your $HOME/labs directory. Unless specified otherwise. which can be accessed from Enterprise Manager. For tasks 2 to 5. 4) In a terminal window. Use the Browse Host button to locate the desired backup. 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. you should log on as the oracle user to your terminal emulator session. log in as admin user (with the oracle password) into the Oracle Secure Backup Web tool. verify that your lab files are present.

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 . • Recover a tablespace from an encrypted backup.Practice for Lesson 15 In this practice. you perform the following tasks: • Create an encrypted backup.

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

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. Include the command to decrypt the backup. 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. 6) View the Perform Recovery: Result page. • Edit the RMAN script to decrypt the backup.Practice 15-2: Recover a Tablespace from an Encrypted Backup In this practice. The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY. Restore the files to the default location. you should log in as SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. 5) Edit the RMAN script on the “Perform Object Level Recovery: Review” page. Why? 3) Troubleshoot the recovery process. Unless specified otherwise. Restore the files to the default location. specifying demo as the password. 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 . you perform the following tasks: • Perform a tablespace recovery using the encrypted backup. 1) In Enterprise Manager.

• Back up the Oracle Secure Backup catalog. you perform the following tasks: • 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-43 .Practice for Lesson 16 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. jobs and job transcripts. 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 . and defaults and policies. 2) View the volumes and their content.In this practice. Use the Oracle Secure Backup Web tool to browse the Oracle Secure Backup catalog to view what you have backed up so far. 4) View the configuration of your security policies. 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. Unless specified otherwise. completed ones. use admin as username and oracle as password. To access the Oracle Secure Backup Web tool. volumes and their content. Include a review of a job transcript. 3) View a category of jobs—for example.

• Verify that the backup completed successfully. you perform the following tasks using obtool: • Create a dataset for the <OSB_HOME>/admin directory.ds 4) Use the information from the message returned in the previous step to verify that the backup completed successfully. 1) Create a media family to be used when backing up the Oracle Secure Backup catalog files. using the commands listed here: mkds --dir catalog_backup mkds --input catback. Now use the obtool utility with admin as username and oracle as password. and then submit the backup request. 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. supply the following dataset directives. 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 . 5) Identify the volume that contains the backup. (State should show “completed successfully”).Practice 16-2: Back Up the Oracle Secure Backup Catalog In this practice. 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. • Create a backup request. • Submit the backup request to the scheduler. • Identify the volume that contains the backup data.ds When prompted for input. you used the Oracle Secure Backup Web tool for a file-system backup. Previously. Use the following command: mkmf --vidunique --writewindow 7days --retain 28days --noappend OSB_catalogs 2) Create a backup set for the catalog data.

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 .

..... 99 Solutions for Practice 11-1: Install Oracle Secure Backup..................................... 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 ..................................................................... 52 Solutions for Practice 6-1: Create a Duplicate Database ....... 89 Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups.......... 38 Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query............. 46 Solutions for Practice 5-4: Use Flashback Database .... 106 Solutions for Practice 11-2: Configure Devices for Oracle Secure Backup.......................................................................................................................................................................................................................... 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 ........ 36 Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table.................................................. 26 Solutions for Practice 4-4: Delete Obsolete Backups ............ 158 Solutions for Practice 16-1: View Oracle Secure Backup Information............... 10 Solutions for Practice 4-1: Use RMAN to Recover a Datafile .... 74 Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database................. 123 Solutions for Practice 12-2: Perform Oracle-Suggested Backup....... 5 Solutions for Practice 3-1: Use RMAN to Create and Manage Backups ............. 112 Solutions for Practice 11-4: Configure Oracle Secure Backup User.................................................................... 145 Solutions for Practice 15-1: Create an Encrypted Backup. 60 Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery.......................................................................... 118 Solutions for Practice 12-1: Create a Database Backup Storage Selector ........ 168 Solutions for Practice 16-2: Back Up the Oracle Secure Backup Catalog ................................. 151 Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup ........................................Table of Contents Solutions for Practice 2-1: Configure Your Database .. 110 Solutions for Practice 11-3: Register the Administrative Server.......................... 33 Solutions for Practice 5-1: Enable Flashback Database ................................. 96 Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs .... 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 ..........

Practice Solutions 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 B-3 .

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 . you configure your database for recoverability.

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

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

2. # default CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET.Production on Tue Mar 7 12:51:53 2006 Copyright (c) 1982. 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 CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%U'. # 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.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 . Answer: RMAN> show all. # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'. Oracle. # default CONFIGURE ENCRYPTION FOR DATABASE OFF. connected to target database: ORCL (DBID=1090770270) RMAN> Make note of the database identifier (DBID) of your database. # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1. All rights reserved. # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1. # default CONFIGURE DEFAULT DEVICE TYPE TO DISK. 5) Use the RMAN SHOW ALL command to view the configuration settings in your database and then exit from your RMAN session.2. 2005. # deft CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET. # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE. # default CONFIGURE CONTROLFILE AUTOBACKUP OFF. CONFIGURE MAXSETSIZE TO UNLIMITED. # default CONFIGURE BACKUP OPTIMIZATION OFF. # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1. # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1.Solutions for Practice 2-1: Configure Your Database (continued) 2. # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'.1. # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'.0 .0.

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.

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. 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.

” 4. Select Maintenance > High Availability > Backup/Recovery Settings > Backup Settings. select the Policy tab. In the Backup Policy section. 2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking.f in the Block Change Tracking File field. select the Policy tab. 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. Answer: 1. You are returned to the Maintenance page. 2. Specify /u01/app/oracle/oradata/orcl/chg_track. 3. On the Backup Settings page. 4. Select Maintenance > High Availability > Backup/Recovery Settings > Backup Settings. select “Automatically backup the control file and server parameter file (SPFILE) with every backup and database structural change. 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-10 . In the Backup Policy section.f for the name of the block change tracking file. Click OK. 2. Select “Enable block change tracking for faster incremental backups” and enter /u01/app/oracle/oradata/orcl/chg_track. select “Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up.” Click OK. On the Backup Settings page.

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

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

Production on Wed Mar 22 10:38:18 2006 Copyright (c) 1982. s U O e ly n Oracle Database 10g: Backup and Recovery B-13 .1. 2005. '/home/oracle/backup2/%U'. Create two backup set copies. 3. One copy should be in the /home/oracle/backup1 directory and one copy should be in the /home/oracle/backup2 directory. Click the link for the backup you took in Question 3 to view detailed information about the backup. [oracle@edrsr10p1 backup1]$ rman target / Recovery Manager: Release 10. 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.2.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) 2. Start RMAN and connect to the target database. connected to target database: ORCL (DBID=1090770270) 2. Oracle.0.rmn RMAN> backup device type disk 2> copies 2 3> tablespace example 4> format '/home/oracle/backup1/%U'. 5) Use RMAN to create a duplexed backup set of the EXAMPLE tablespace. Answer: 1. RMAN> @sol_03_01_05_02. Click the Database Instance link to return to the Maintenance page.0 .

--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 --------------.rmn RMAN> list backup summary. Exit from RMAN.----------.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.-.---------.. Use the RMAN LIST BACKUP SUMMARY command to view a listing of the backup sets and pieces. RMAN> @sol_03_01_05_03. 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. The #Copies column shows the duplexed backup set copies you made.-.-----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. Oracle Database 10g: Backup and Recovery B-14 . using target database control file instead of recovery catalog List of Backups =============== Key TY LV S Device Type #Copies Compressed Tag ------.

Review the information on the Crosscheck All: Specify Job Parameters page and accept the default values. return to the Database Home page.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. 2. 5. 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-15 . 3. 4. You can click View Job to monitor the cross-check job. Click Submit Job. After it completes successfully. Click Crosscheck All. You receive the “Job submission succeeded” message. Log out of Enterprise Manager. Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups.

Practice Solutions 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 B-16 . you use RMAN to perform recovery.

Oracle. Query the HR. Notice how you are prompted by Enterprise Manager to recover the lost datafile. Answer: 1.0 . [oracle@edrsr10p1 labs]$ .0.sh script. 1) Use SQL*Plus to query the HR. you use RMAN to recover a lost datafile.Solutions for Practice 4-1: Use RMAN to Recover a Datafile In this practice.1. 2005.0. REGION_ID ---------1 2 3 4 REGION_NAME ------------------------Europe Americas Asia Middle East and Africa 3. Number of rows: ___________ [oracle@edrsr10p1 oracle]$ sqlplus hr/hr SQL*Plus: Release 10.Production With the Partitioning. change to the labs directory and execute the lab_04_01_02_01. execute the lab_04_01_02_01. All rights reserved.0 ./lab_04_01_02_01. OLAP and Data Mining options SQL> select * from regions.1. Make note of the number of rows in the HR.2. 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.Production on Thu Mar 23 12:51:00 2006 Copyright (c) 1982.2.REGIONS table.REGIONS table and record the number of rows. Exit from your SQL*Plus session. This script deletes the EXAMPLE tablespace datafile.REGIONS table.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 . Answer: 1. Connected to: Oracle Database 10g Enterprise Edition Release 10.sh script to simulate a failure in your database. At the operating system prompt. 2.

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 B-18 . Navigate to the Maintenance page. 3.JOBS table. Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA. 2.dbf' 4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace datafile. Log in to SQL*Plus and connect as the HR user with HR as the password.JOBS table. 4. SQL> select * from jobs. 2.Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 3) Use SQL*Plus to query the HR. Select Perform Recovery on the Maintenance page. Answer: 1. 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. Answer: 1. Click the “Datafiles Need Media Recovery” link.

the Result page is displayed indicating that the recovery operation succeeded. After the recovery operation completes. Restore the files to the default location. The Processing page is displayed. 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-19 . Select the file and click Next. 8. Click Submit.Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 5. On the “Perform Object Level Recovery: Review” page.” Click Next. click Edit RMAN Script to view the script that will be executed. 6. Select “No.

JOBS table. 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 ----------------------------------. 5) Return to your SQL*Plus session and again attempt to query the HR.---------President Administration Vice President Administration Assistant Finance Manager ra O 19 rows selected.JOBS table. Click OK to return to the Maintenance page. 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 . SQL> select * from jobs. Answer: 1. Query the HR.Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 9.

DEPARTMENTS table. you recover a lost datafile by using the Flash Recovery Area for fast recovery. r O 3. 1. Answer: 2.sh EXAMPLE tablespace file deleted [oracle@edrsr10p1 labs]$ 3) Use SQL*Plus to query the HR. 1) Use SQL*Plus to query the HR. Make note of the number of the datafile that is unavailable.REGIONS table. change to the labs directory and execute the lab_04_02_02_01. 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. Exit from your SQL*Plus session.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile In this practice. 2. Answer: 1. Datafile number: ____ 4.DEPARTMENTS table. execute the lab_04_02_02_01. Make note of the number of rows in the HR. 3. Exit from SQL*Plus.sh script./lab_04_02_02_01. This script deletes the EXAMPLE tablespace datafile. [oracle@edrsr10p1 labs]$ . 2) At the operating system prompt. At the operating system prompt. cl a SQL> select * from departments. Log in to SQL*Plus and connect as the HR user with HR as the password. Oracle Database 10g: Backup and Recovery B-21 . Query the HR. Answer: 1.REGIONS table. Log in to SQL*Plus and connect as the HR user with HR as the password.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. Query the HR.sh script to simulate a failure in your database.REGIONS table.

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

RMAN> @sol_04_02_07_02. Create an image copy of the datafile in the original location.rmn RMAN> backup as copy datafile 5 2> format '/u01/app/oracle/oradata/orcl/example01.dbf'. Select the Example tablespace and click View. 1.dbf tag=TAG20060324T13447 channel ORA_DISK_1: datafile copy complete. Log in to RMAN and connect to your target database. 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 . Answer: 7) Make a copy of the datafile in the original location and switch back to it. 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. 2. 2.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. verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area. Click Return to return to the Tablespaces page. Answer: 1. 6) Using Enterprise Manager Database Control. Select Tablespaces on the Administration page. 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-24 . RMAN> sql 'alter database datafile 5 offline'.dbf" 5. datafile 5 switched to datafile copy "/u01/app/oracle/oradata/orcl/example01. sql statement: alter database datafile 5 online 8) Use Enterprise Manager Database Control to verify the file. sql statement: alter database datafile 5 offline 4. 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. Switch to the new copy you made.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. Select Tablespace on the Administration page. Take the datafile offline. Answer: 1. elapsed time: 00:00:02 Finished recover at 24-MAR-06 6. Bring the datafile back online. RMAN> recover datafile 5. RMAN> switch datafile 5 to copy. RMAN> sql 'alter database datafile 5 online'. Recover the datafile. Exit from RMAN.

Click the Database tab to return to your database home page. 4. Note that the datafile is the one you switched to. Select the EXAMPLE tablespace and click 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 B-25 . 3.Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile (continued) 2.

sh script. Answer: 1. 2. change to the labs directory and execute the lab_04_03_02_01. Log in to SQL*Plus as SYSDBA. you recover your control file by using an autobackup. Answer: 1.sh Control files deleted [oracle@edrsr10p1 labs]$ 3) You need some more information about your control files.sh script to delete all your control files.Solutions for Practice 4-3: Recover Control Files In this practice.ctl /u01/app/oracle/oradata/orcl/control03. SQL> SELECT name FROM v$controlfile.ctl /u01/app/oracle/oradata/orcl/control02. Query the V$CONTROLFILE_RECORD_SECTION view. NAME --------------------------------------------/u01/app/oracle/oradata/orcl/control01./lab_04_03_02_01. Answer: 1. 2. Query V$CONTROLFILE. [oracle@edrsr10p1 oracle]$ cd labs [oracle@edrsr10p1 labs]$ . Exit from SQL*Plus. 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. Query the NAME column in V$CONTROLFILE. 1) Use SQL*Plus to view files information for the control files in your database. SQL> SELECT * FROM v$controlfile_record_section. Log in to SQL*Plus as SYSDBA. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file.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 . In your terminal window session.ctl 2) Simulate a failure in your environment by executing the lab_04_03_02_01.

Production on Tue Mar 28 10:23:17 2006 Copyright (c) 1982. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0. Exit from your SQL*Plus session.2. OLAP and Data Mining options [oracle@edrsr10p1 oracle]$ 2.0. RMAN> connect target / connected to target database (not started) RMAN> ra O 3.0 . Use SQL*Plus to shut down your instance.2. Oracle.Pn With the Partitioning. [oracle@edrsr10p1 oracle]$ rman Recovery Manager: Release 10.2. Use Recovery Manager to recover the control files.0. Answer: 1.1. 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. 2005. [oracle@edrsr10p1 oracle]$ sqlplus / as sysdba SQL*Plus: Release 10. Restart the instance in NOMOUNT mode. 2005. Oracle Database 10g: Backup and Recovery B-27 . Use RMAN to connect to your target database.Production With the Partitioning.0 .0 .Production on Tue Mar 28 10:20:26 2006 Copyright (c) 1982.0 . All rights reserved.1. Connected to: Oracle Database 10g Enterprise Edition Release 10.0.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.2.1. OLAP and Data Mining options SQL> shutdown abort ORACLE instance shut down. Oracle.

RMAN> alter database mount. RMAN> restore controlfile from autobackup. database mounted released channel: ORA_DISK_1 7. You recorded the database identifier in Practice 2-1. 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 . Note: Your database identifier will be a different value from that shown in the solution. r O cl a RMAN> recover 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.ctl Finished restore at 28-MAR-06 6. Mount the database. 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. RMAN> set dbid 1090770270. executing command: SET DBID 5.ctl output filename=/u01/app/oracle/oradata/orcl/control03. Recover the database by issuing the RECOVER DATABASE command. Set the database identifier.ctl output filename=/u01/app/oracle/oradata/orcl/control02. Restore the control file from the autobackup.

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. 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. 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 ..

RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT'. 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. 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 . using target database control file instead of recovery catalog sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT RMAN> backup archivelog all. database opened 9. Open the database with the RESETLOGS option. RMAN> alter database open resetlogs.Solutions for Practice 4-3: Recover Control Files (continued) Finished recover at 28-MAR-06 8. Back up the current online redo log file and back up all the archived redo log files.

RMAN> backup database.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.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.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. 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.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02. Create a whole database backup. 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.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=00004 name=/u01/app/oracle/oradata/orcl/users01. 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) 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 .

-----------------. 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. Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups. RMAN> report obsolete. Answer: 1.------------------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.-----. 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 . In your RMAN session. Invoke Enterprise Manager and log in as sys/oracle as SYSDBA. Answer: 1. r O 2. Note: Your results may vary from the following output. issue the REPORT OBSOLETE command to determine whether you have any obsolete backups.

3) You can also use RMAN to verify that your obsolete backups were deleted. In your RMAN session. 4.Solutions for Practice 4-4: Delete Obsolete Backups (continued) 3. Access the Manage Current Backups page again to view the backup sets and image copies that were retained. Answer: 1. 5. After it completes successfully. 6. RMAN> report obsolete. execute the REPORT OBSOLETE command. You can click View Job to monitor the job. Click Delete All Obsolete to remove obsolete backups. You receive the “Job submission succeeded” message. Review the information on the Delete All Obsolete: Specify Job Parameters page and click Submit Job. 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 . return to the Database 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-35 .Practice Solutions for Lesson 5 In this practice. you use Oracle Flashback features to recover from errors in your database.

You must restart the database instance to enable Flashback Database. Click OK. 3. Start Enterprise Manager and connect as SYS/ORACLE as SYSDBA. Supply the Host and Operating System credentials if they are not filled in by default.flashback logging can be used for fast database point-in-time recovery” and click Apply. 5. 7. 6. 2. 4. The Confirmation message is displayed. Select Recovery Settings in the Backup/Recovery Settings section. Select “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 B-36 .Solutions for Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database. Click Yes to restart the database instance. Answer: 1. Scroll to the Flash Recovery section. Click the Maintenance tab.

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

5. 3. 4. Click the database instance link to return to the Maintenance page.Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued) 2.” r O 6. select Tables in the Object Type menu. Click Perform Recovery. Copy the SCN value in the Creation SCN field to the buffer. Click “Perform Object Level Recovery. Select “Flashback to a known SCN” and paste the SCN that you copied in step 2. 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 . In the “Object Level Recovery” section. Click Next.

Enter HR in the Schema Name field and LOCATIONS in the Table field. Click Search.Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table (continued) 7. Click Add Tables to add 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 B-43 .LOCATIONS table. 8.

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

Select the oldest change to the table and click Next. 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 .Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 7.

SQL> SQL> 2 3 @lab_05_03_06_01 SELECT * FROM hr. 11. 9. Click OK. Review the information. The Confirmation page is displayed. Accept the default of “Cascade: Flashback the selected tables and all dependent tables.Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 8. 6) Return to your SQL*Plus session. Answer: 1.LOCATIONS table. Execute the lab_05_03_06_01. Confirm the flashback information. 10. Query the HR.LOCATIONS table to confirm the Flashback operation.sql script to query the HR.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 .” Click Next. Click Submit. Click Next.

---------------------------------------.----------CITY STATE_PROVINCE CO -----------------------------.------------------------.Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query (continued) 4 / LOCATION_ID STREET_ADDRESS POSTAL_CODE ----------.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 .

3. Select “Guaranteed Restore Point. Click the Database Instance link to return to the Maintenance page. 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-52 . 3. 2) Use Enterprise Manager to create a Guaranteed Restore Point. Click Create to create a new restore point. Select Manage Restore Points in the Backup/Recovery section. Scroll to the Flash Recovery section. Verify that Flashback Database is enabled. Select Recovery Settings in the Backup/Recovery Settings section.Solutions for Practice 5-4: Use Flashback Database 1) Use Enterprise Manager to verify that Flashback Database is enabled. Answer: 1. 2. Answer: 1.” Click OK. Navigate to the Maintenance page. Enter “Before_Truncate” in the Restore Point Name field.

sql script to determine the number of rows in the HR.JOB_HISTORY table. r O cl a SQL> SQL> 2 3 In e @lab_05_04_03_01 SELECT count(*) FROM hr.Solutions for Practice 5-4: Use Flashback Database (continued) 4.JOB_HISTORY table.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 . Execute the lab_05_04_03_01. Record the number of rows: ___________ Answer: 1. The Restore Point is created.sql script to determine the number of rows in the HR. 3) Execute the lab_05_04_03_01.

sql script to determine the number of rows in the HR. 3.sql script to truncate the HR. SQL> SQL> 2 3 @lab_05_04_05_01 SELECT count(*) FROM hr.JOB_HISTORY table.Solutions for Practice 5-4: Use Flashback Database (continued) 4) Execute the lab_05_04_04_01.sql script. Answer: 1. Select the BEFORE_TRUNCATE restore point. SQL> @lab_05_04_04_01 SQL> truncate table hr. Execute the lab_05_04_04_01.JOB_HISTORY table.JOB_HISTORY table rows.sql script. 2.job_history / COUNT(*) ---------0 6) Use Flashback Database to restore the HR. 4. Select Manage Restore Points in the Backup/Recovery section. 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-54 . Execute the lab_05_04_05_01. Return to your Enterprise Manager window. 5) Execute the lab_05_04_05_01. Click “Recover Whole Database To.job_history 2 / Table truncated. Answer: 1. Answer: 1.

7. 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-55 .Solutions for Practice 5-4: Use Flashback Database (continued) 5. 6. Enter Host Credentials. Click Refresh. The database is shut down. Click Continue. Click Perform Recovery. Enter Database login. Click Yes. 8. Click Login. Enter the host credential information.

Click “Perform Whole Database Recovery.” 12. 13. 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 the BEFORE_TRUNCATE restore point.Solutions for Practice 5-4: Use Flashback Database (continued) 10. Select “Recover to a prior point in time. Select Restore Point and click the Flashlight icon.” 11. Click Select.

Select Yes.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 . The Restore Point field is populated. 15. Click Next. Click Next.

Solutions for Practice 5-4: Use Flashback Database (continued) 16. Execute the lab_05_04_07_02. The “Processing: Perform Whole Database Recovery” page is displayed. Click “Open Database” to open the database. The operation is complete. Answer: 1. Click Submit. Invoke SQL*Plus and log in as SYS/ORACLE as SYSDBA. 19. You can scroll through the output to view the details of the operation. Execute the lab_05_04_07_02.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 . 7) Return to your SQL*Plus session. Review the information. r O cl a SQL> @query_job_hist SQL> SELECT count(*) 2 FROM hr. 17. 2.JOB_HISTORY table again to be sure the data has been restored.sql script.sql script to query the HR. Click OK. The “The database has been opened successfully” message is displayed. 18.

Practice Solutions 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 B-59 .

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

Click Next. 7.Solutions for Practice 6-1: Create a Duplicate Database (continued) 5. Enter auxdb in the Net Service Name field and click Next. Accept the default of 1521 for the port number. 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 . Enter the host name of your PC in the Host Name field. 6. Select TCP/IP (default) as the protocol. Click Next.

com in the Service Name field. r O 11. 9.2. Click File and Exit to exit from Oracle Net Manager. Click Finish.ora file in the /u01/app/oracle/product/10.oracle.0/db_1/network/admin directory.Solutions for Practice 6-1: Create a Duplicate Database (continued) 8. 10. 12. 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 . Enter aux. Select File and Save Network Configuration to save the changes you made. You can view your updated tnsnames. Click Next.

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

SQL> startup nomount pfile='$HOME/auxinstance/initAUX. Invoke SQL*Plus and connect as SYSDBA. Create a server parameter file with the default name of spfileaux.ora from the text initialization parameter file. 3. All rights reserved. cl a File created. Start the instance in NOMOUNT mode using the initialization parameter file you created in step 2.Solutions for Practice 6-1: Create a Duplicate Database (continued) Add the comment character.ora file.ora' ORACLE instance started.Production on Wed Mar 29 11:38:53 2006 Copyright (c) 1982.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' 4) Start the auxiliary instance in NOMOUNT mode using the initAUX. Answer: 1.2. [oracle@edrsr10p1 oracle]$ sqlplus / as sysdba SQL*Plus: Release 10. #. to this line: *. 2005. r O 2. SQL> create spfile from pfile='$HOME/auxinstance/initAUX.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'.0. Answer: Oracle Database 10g: Backup and Recovery B-64 . Exit from SQL*Plus. Answer: 1.1. [oracle@edrsr10p1 oracle]$ ORACLE_SID=aux [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID aux 2. 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. Connected to an idle instance. Oracle. Set the ORACLE_SID environment variable to aux.

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

dbf".dbf".dbf". 4> duplicate target database to aux. restore check readonly clone database . set newname for datafile 4 to "/u01/app/oracle/oradata/aux/users01. set newname for datafile 3 to "/u01/app/oracle/oradata/aux/sysaux01.dbf".Solutions for Practice 6-1: Create a Duplicate Database (continued) 3> allocate auxiliary channel aux1 device type disk. set newname for datafile 1 to "/u01/app/oracle/oradata/aux/system01. set newname for datafile 5 to "/u01/app/oracle/oradata/aux/example01. set newname for datafile 2 to "/u01/app/oracle/oradata/aux/undotbs01. 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. } 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".

f channel ORA_AUX_DISK_1: copied datafile copy of datafile 00003 output filename=/u01/app/oracle/oradata/aux/sysaux01.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.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. GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03.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 . GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02.log' ) SIZE 50 M REUSE.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.dbf channel ORA_AUX_DISK_1: copied datafile copy of datafile 00005 output filename=/u01/app/oracle/oradata/aux/example01.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/aux/system01.log' ) SIZE 50 M REUSE.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.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.

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. } 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.Solutions for Practice 6-1: Create a Duplicate Database (continued) contents of Memory Script: { switch clone datafile all. recover clone database delete archivelog .

startup clone nomount . GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03.log' ) SIZE 50 M REUSE. 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. GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02.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:05 Finished recover at 10-APR-06 contents of Memory Script: { shutdown clone. } 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.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.

catalog clone datafilecopy "/u01/app/oracle/oradata/aux/example02. catalog clone datafilecopy "/u01/app/oracle/oradata/aux/undotbs01.dbf". catalog clone datafilecopy "/u01/app/oracle/oradata/aux/example01.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 . catalog clone datafilecopy "/u01/app/oracle/oradata/aux/users01.Solutions for Practice 6-1: Create a Duplicate Database (continued) '/u01/app/oracle/oradata/aux/system01. switch clone tempfile all.dbf recid=4 stamp=9 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/example02.dbf".dbf". catalog clone datafilecopy "/u01/app/oracle/oradata/aux/sysaux01.dbf recid=3 stamp=589 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/example01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/aux/temp01. switch clone datafile all.dbf".dbf recid=1 stamp=8 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/sysaux01.dbf recid=2 stamp=59 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/users01.dbf".dbf in control fe cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/undotbs01. } executing Memory Script executing command: SET NEWNAME renamed temporary file 1 to /u01/app/oracle/oradata/aux/temp01.dbf".

After the DUPLICATE DATABASE operation completes.REGIONS table. } executing Memory Script database opened Finished Duplicate Db at 10-APR-06 2. 9) Use SQL*Plus to log in to your AUX database and execute a query against the HR. Answer: 1.REGIONS table. Connect as SYSDBA and execute the SHUTDOWN IMMEDIATE command. Verify that ORACLE_SID is set to aux.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.regions. 2. shut down the aux instance. Log in to SQL*Plus as SYSDBA and execute a query against the HR. SQL> select * from hr. Answer: 1. REGION_ID ---------1 2 3 4 r O 10) Now that you have completed the test recovery by creating a duplicate database. exit from RMAN. 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 .

Solutions for Practice 6-1: Create a Duplicate Database (continued) Database closed. Exit from SQL*Plus. Database dismounted. enter ORACLE_SID=orcl to change your ORACLE_SID. At the operating prompt. SQL> 2. 11) Change your ORACLE_SID to orcl in preparation for later practices. Answer: 1. ORACLE instance shut down. [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 .

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 . you use tablespace point-in-time recovery to recover from unwanted changes to your database.Practice Solutions for Lesson 7 In this practice.

12 April. 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 .. All rights reserved.sh Export: Release 10.Production on Wednesday./lab_07_01_01_01. exported "HR"."SYS_EXPORT_SCHEMA_01": system/******** dumpfile=hrexp..0.0 . . In a terminal window. Answer: 1.dmp sr Estimate in progress using BLOCKS method.1. OLAP and Data Mining options tarting "SYSTEM". 2005.Produn With the Partitioning.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery 1) Execute the lab_07_01_01_01.0.sh script to export the HR schema. Oracle.2.sh script to export the HR schema.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 . change to the labs directory and execute the lab_07_01_01_01."COUNTRIES" 6. [oracle@edrsr10p1 labs]$ . r O cl a Connected to: Oracle Database 10g Enterprise Edition Release 10. 2006 13:03:27 Copyright (c) 2003.2.1.

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

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 . [oracle@edrsr10p1 labs]$ . Answer: 1.Production on Friday.Produn With the Partitioning. OLAP and Data Mining options Master table "SYSTEM". imported "HRTEST". r O cl a Connected to: Oracle Database 10g Enterprise Edition Release 10. These messages can be ignored.1.sh Import: Release 10.0 . In your terminal window at the operating system prompt.sh script to populate the new tablespace with a copy of the data from the HR schema. Grant succeeded.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 6 7 8 QUOTA UNLIMITED ON hrtest ACCOUNT UNLOCK .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 ."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM". and LOCATIONS tables.2. 2005. . Oracle./lab_07_01_03_01."SYS_IMPORT_FULL_01": system/******** dumpfile=hrexp. All rights reserved.sh script. User created. execute the lab_07_01_03_01. REGIONS. SQL> GRANT connect. resource 2 TO hrtest.1."DEPARTMENTS" 6. 3) Execute the lab_07_01_03_01.0 . 2006 7:08:42 Copyright (c) 2003.2.0. Note: The import should complete successfully. 14 April. You will receive error messages because the import excludes the COUNTRIES.0.

"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". Answer: 1. Invoke RMAN and connect to your target database."EMPLOYEES" 15."JOB_HISTORY" 6. ."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".76 KB 107 rows . imported "HRTEST"."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 .609 KB 19 rows ."JOBS" 6. . 2. imported "HRTEST".Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) . r O cl a RMAN> backup database. . Execute the BACKUP DATABASE command. imported "HRTEST".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".

r O Answer: 1. 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=00003 name=/u01/app/oracle/oradata/orcl/sysaux01. 2. Query the CURRENT_SCN column in V$DATABASE and record the current SCN.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01. Execute the date command at the operating system prompt.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/hrtest01. [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 . SQL> select current_scn from V$database.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01. CURRENT_SCN ----------4725352 6) Record the current time.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.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.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=00005 name=/u01/app/oracle/oradata/orcl/example01.

Execute the lab_07_01_08_01.sql script.sql script to update the salaries for the employees in department 60 and note the highest salary displayed. salary 2 from hrtest. SQL> select employee_id.employees set salary = salary * 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 .EMPLOYEES table and view information about employees in department 60. Execute the lab_07_01_07_01. Highest salary: _____________ Answer: 1. last_name.sql script to query the HRTEST.employees 3 where department_id = 60 4 / EMPLOYEE_ID ----------103 104 105 106 107 r O cl a In e LAST_NAME SALARY ------------------------. Make note of the highest salary that is displayed: ________ Answer: 1.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 7) Execute the lab_07_01_07_01.---------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. last_name.sql script. SQL> SQL> 2 3 4 @lab_07_01_08_01 update hrtest.25 where department_id = 60 / 5 rows updated. salary from employees where department_id = 60 / LAST_NAME SALARY ------------------------. SQL> SQL> 2 3 4 @lab_07_01_07_01 select employee_id.

2. Execute the lab_07_01_09_01. reason FROM SYS. obj2_owner. SQL> SQL> 2 3 4 5 6 7 8 9 @lab_07_01_09_01 SELECT obj1_owner. obj1_name. obj1_type. obj2_type. Select Perform Recovery in the Backup/Recovery section. Execute the lab_07_01_09_01. 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-80 . obj2_name.sql script. 1. constraint_name. 4. 10) You can use Enterprise Manager Database Control or RMAN command line to perform tablespace point-in-time recovery.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.” Click Perform Object Level Recovery. so you can proceed with the tablespace point-in-time recovery. Invoke Enterprise Manager Database Control and log in as SYS/ORACLE as SYSDBA. Accept the default selection “Recover to current time or a previous point-in-time. 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’.sql script to determine whether there are any dependencies that will prevent the TSPITR operation. ts1_name. If you want to use RMAN command line. Answer: The answer presents the solution using Enterprise Manager Database Control. Select the Maintenance page. The page refreshes. Select Tablespaces in the Object Level Recovery section. Answer: 1. ts2_name.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.

Select “Recover to a prior point-in-time” and specify the SCN you recorded earlier.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (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-81 . Click Next.

Click Select. Specify the auxiliary instance location of /u01/app/oracle/oradata/tspitr. Click Add to select the tablespace.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 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-82 . Select the HRTEST tablespace. 7.

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

you create a recovery catalog in your instructor’s database and register your database in the recovery catalog.Practice Solutions for Lesson 8 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-88 .

0 . Create the recovery catalog in your assigned tablespace.) The service name is RCDB.1. 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. 2005. Oracle Database 10g: Backup and Recovery B-89 . 2) Using RMAN. Answer: [oracle@edrsr10p1 oracle]$ rman target / catalog rcuser10/rcuser10@rcdb Recovery Manager: Release 10.2. The users are named RCUSER01 – RCUSER12.2. All rights reserved. Oracle. (If you are using PC01.The tablespace for the recovery catalog and the recovery catalog owner have been created in the instructor database. 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.Production on Thu Mar 16 14:22:04 2006 Copyright (c) 1982. execute the command to resynchronize the control file and recovery catalog.0.0 . [oracle@edrsr10p1 oracle]$ rman catalog rcuser10/rcuser10@rcdb Recovery Manager: Release 10. r O 3) Using RMAN. 1) Connect to the recovery catalog database (instructor’s database) with the appropriate recovery catalog owner name (if you are using PC01. Oracle. connect to your target database and the recovery catalog database. your assigned tablespace is RCTS01. 2005. The tablespaces are named RCTS01 – RCTS12. Answer: This example uses RCUSER10 as the username and password.Production on Thu Mar 16 13:58:52 2006 Copyright (c) 1982.0.1. connect as RCUSER01) using RMAN. Your assigned username and password may differ from this example.

Select Add Recovery Catalog on the Recovery Catalog Settings page. database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN> 2. RMAN> resync catalog. so the resync command fails. Answer: Use RMAN command-line OR Enterprise Manager Database Control. Using Enterprise Manager: Select Recovery Catalog Settings on the Maintenance Page. You can use RMAN commandline or Enterprise Manager for this step. 1. 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. 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 RMAN: RMAN> register database.

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

2005.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. 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.1. [oracle@edrsr10p1 oracle]$ rman target / catalog rcuser10/rcuser10@rcdb Recovery Manager: Release 10. Using RMAN.0 .2. Oracle. connected to target database: ORCL (DBID=1090770270) connected to recovery catalog database 2.0. connect to your target database and the recovery catalog. Oracle Database 10g: Backup and Recovery B-93 . Create the whole_backup script using the CREATE SCRIPT command. Do not execute the whole_backup script at this time. Answer: 1.

use RMAN to unregister your database from the recovery catalog. RMAN> unregister database. printing stored script: whole_backup {BACKUP DATABASE.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. 2. 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 . Execute the UNREGISTER DATABASE command. Answer: 1. } RMAN> 7) In preparation for later practices. RMAN> PRINT SCRIPT whole_backup. Connect to your target database and the recovery catalog.

Practice Solutions for Lesson 9 In this practice. 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 .

Invoke RMAN and connect to your target database.------------------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. 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 -------------------.-----------------. Execute the DELETE OBSOLETE command. 2.-----. Answer: 1. RMAN> delete obsolete.

Answer: 1. the TIME_REMAINING column should be decreasing. ra O SQL> SQL> 2 3 @lab_09_01_04_01 SELECT sid. By using this view you can determine whether the backup is progressing normally or hanging.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01. Execute the RMAN BACKUP DATABASE command.-------------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 . Invoke SQL*Plus and connect as SYSDBA.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.sql script to query V$SESSION_LONGOPS. begin a whole database backup.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01. Execute the lab_09_01_04_01.elapsed_seconds.--------------. Execute the lab_09_01_04_01. If the backup is progressing normally.start_time. You will use this second session to monitor a database backup.--------. Change to the labs directory. time_remaining FROM v$session_longops / SID START_TIM ELAPSED_SECONDS TIME_REMAINING ---------.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.sql script.Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups (continued) 2) Open a second terminal window. Answer: 1. 3) Return to your first terminal window.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. In your RMAN session. RMAN> backup database.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/hrtest01. 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.

--------------.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.-------------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 .--------.sql script again. Execute the lab_09_01_04_01. SQL> / SID START_TIM ELAPSED_SECONDS TIME_REMAINING ---------. You should notice that the value in the TIME_REMAINING column is decreasing.

Select Manage Current Backups. 4. On the Manage Current Backups page. Click Submit Job. 1) Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA. The job is submitted. Navigate to the Maintenance page.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs You can easily monitor RMAN jobs in Enterprise Manager. 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-99 . 2) Delete obsolete backups. click Delete All Obsolete. 3. Click View Job to view the progress of the Delete All Obsolete job. Answer: 1.

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-100 . Navigate to the Maintenance page. Select Schedule Backup in the Backup/Recovery section.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 6. Click Schedule Customized Backup. 3. 7. You can view additional information by clicking the links in the Logs section. 2. Select Whole Database in the Customized Backup section. 3) Start a whole database backup. Answer: 1.

Click Next. 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 . 5. Click Next.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 4. On the “Schedule Customized Backup: Settings” page. Deselect “Also back up all archived logs on disk” in the Advanced section. Select Full Backup in the Backup Type section. Accept the default values on the “Schedule Customized Backup: Schedule” page. 6. Select Online Backup in the Backup Mode section. Select “Delete obsolete backups” in the Advanced section. Click Next. select Disk.

Information about the job is displayed. 8. Click View 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 . 9. Click Submit Job.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.

You can view detailed information about each job step. Click the Database tab to return to the home page. Click the “Job Run” link to return to the Job page. 11.Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 10. 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 .

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.

• Install the Oracle Secure Backup software. • Register your administrative server with EM. • Configure virtual test devices.Practice Solutions for Lesson 11 In this practice. THEY ARE NOT SUPPORTED FOR PRODUCTION USE. • Connect to the EM Database Console application using your browser. • View information about the configured devices. 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 . • Insert four volumes into the tape library. • Configure preauthorization for this user. THE VIRTUAL TEST DEVICES USED IN THIS LAB ARE FOR TRAINING PURPOSES ONLY. • Define a new Oracle Secure Backup user. you perform the following tasks: • Create your Oracle Secure Backup home directory. • Test connectivity to the tape drive.

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

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

This will take just a minute and will produce several lines of informational output.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 . 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. but is not yet configured.(continued) Solutions for Practice 11-1: Install Oracle Secure Backup Use interactive mode to install Oracle Secure Backup on a small number of hosts. (a. Which installation method would you like to use (a or b) [a]? a - Oracle Secure Backup is not yet installed on this machine. 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. Oracle Secure Backup's Web server has been loaded.so.21-20. Installing Oracle Secure Backup on edrsr4p1 (Linux version 2. containing a mixture of alphabetic and numeric characters.b or c) [a]? a Beginning the installation.4. please refer to the Oracle Secure Backup Installation Guide.EL) You must now enter a password for the Oracle Secure Backup 'admin' user. Oracle suggests you choose a password of at least 8 characters in length. Use batch mode to install Oracle Secure Backup on any number of hosts.

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.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 .(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/qrserviced creating /etc/rc.

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

) 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 .Solutions for Practice 11-2: Configure Devices for Oracle Secure Backup (continued) (Hint: Use the lsmf --long command. and use the quit command to exit. .

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

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

and for Destination. 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 .Solutions for Practice 11-3: Register the Administrative Server (continued) 2. click Go. enter 1-4 in Storage Element. On the Devices page. 3. In the Actions drop-down list. On the Device Action: insertvol page. select the “Insert Volume” value. make sure that the “This is an unlabeled tape” option is selected for Source. the vlib virtual test library should be automatically selected. Then.

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 .Solutions for Practice 11-3: Register the Administrative Server (continued) 4. click the plus sign (+) to the left of vlib to see your device. The Processing page appears for a short period of time. r O 5. Scroll down to the bottom of the page and click OK. When returned to the Devices page.

Answer: 1. Select “Verify Connectivity” from the list of Actions. 2. and click Go. 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 . An informational message regarding the accessibility of the selected device is displayed. test the virtual tape drive access. On the Devices page. you want to make sure you can access your tape drives.Solutions for Practice 11-3: Register the Administrative Server (continued) 4) Before taking any backups.

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 .

UNIX name: oracle.In this practice. 4. and click Login. If you are already in Enterprise Manager. oracle as Password. you can use shortcuts. an NDMP server is not available. 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 . On your Database home page. click the “File System Backup and Restore” link in the Oracle Secure Backup section. but inside the regular classrooms. You are now redirected to the Oracle Secure Backup Web tool application. On the Oracle Secure Backup Login page. enter admin as User Name. such as clicking the Administrative Server link in the upper-left part of the Devices page. accept this certificate permanently and click OK in any security pop-up window. you perform the following tasks: • Define a new Oracle Secure Backup user. Note: If you have an NDMP server.” Answer: 1. Password: oracle. 1) Use the Oracle Secure Backup Web tool to create the oracle Oracle Secure Backup user with the following values: User oracle. click the Maintenance tab. one for Enterprise Manager and the other for the Oracle Secure Backup Web tool. 2. Unless specified otherwise. 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. Solutions for Practice 11-4: Configure Oracle Secure Backup User 3. On the Maintenance tabbed page. set the value to “yes”. UNIX group: dba and NDMP server user: no. you can have two windows open. • Configure preauthorization for this user. you should log on as the oracle user to your terminal emulator session and as SYSDBA to your EM Database Control Console session. If you receive the warning “Website Certified by an Unknown Authority”. User class: oracle. so set the value to “no.

Password: oracle. On the New Users page. User class: oracle. 8. 6. Click the Add button. On the Configure page.Solutions for Practice 11-4: Configure Oracle Secure Backup User (continued) 5. UNIX name: oracle. and NDMP server user: no. click the Users link in the Basic section. 7. enter or select the following values: User: oracle. UNIX group: dba. click the Configure 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-119 . On the Oracle Secure Backup home page. Click Apply.

View the success message. Windows domain name: *. 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 . r O Answer: 1. and Attributes: cmdline and rman.Solutions for Practice 11-4: Configure Oracle Secure Backup User (continued) 9. Click the Preauthorized Access button. The oracle user is created and the page is in edit mode. 2) Configure the oracle Oracle Secure Backup user as a preauthorized RMAN and command-line user with the following values: Hosts: all hosts. OS username: *. Best Practice Tip: Limit preauthorized access to selected hosts.

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-121 . Windows domain name: *. On the Preauthorized Access page.Solutions for Practice 11-4: Configure Oracle Secure Backup User (continued) 2. OS username: *. select or enter the following values: Hosts: all hosts. and Attributes: cmdline and rman. 3. View the success message.

Practice Solutions for Lesson 12 In this practice. you perform the following tasks: • Create a database backup storage selector for 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 B-122 . • Perform a backup of your Oracle database with the Oracle-Suggested Backup strategy.

Unless specified otherwise. and as SYSDBA to your Database Control Console and SQL*Plus sessions. continue with the next step. Database altered. Database dismounted.2. create a database backup storage selector for your Oracle database. and then restart the database. shut down the database. SQL> archive log list Database log mode Automatic archival Archive destination Oldest online log sequence Current log sequence SQL> shutdown immediate Database closed. • In Enterprise Manager. SQL> alter database archivelog. 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. perform a test backup to verify that the Oracle Secure Backup configuration is correct. enable archiving. Oracle. SQL> startup mount ORACLE instance started. ORACLE instance shut down.0. Oracle Database 10g: Backup and Recovery B-123 .1. If not. All rights reserved. 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. • In Enterprise Manager.0 . 1) First. Database altered. SQL> connect / as sysdba Connected.Production on Wed May 10 13:51:01 2006 Copyright (c) 1982. you should log on as the oracle user to your terminal emulator session. 2005. If your database is in ARCHIVELOG mode. you perform the following tasks: • In SQL*Plus. verify that the database is in ARCHIVELOG mode.Solutions for Practice 12-1: Create a Database Backup Storage Selector In this practice.

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. Auto Backup. 2. Under Backup/Recovery Settings. make sure the supplied values are correct. Full. If these fields are already filled in. click Backup Settings. click the Maintenance tab. enter oracle as Username and Password. Select “Save as Preferred Credential. and Incremental Answer: 1.” and 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-124 . create a backup selector for your database with the following specifications: • • • Tape Drives: 1 Host Credentials Username: oracle. On the Backup Settings page. 3. and “Save as Preferred Credential” Database Backup Types: Archive log. On your Database home page. enter 1 for Tape Drives in the Tape Settings section. Under Host Credentials. Password: oracle. 4.

If these fields are already filled in. r O 8. 7. On the Add Backup Storage Selector page. On the Administrative Server Login page. under the heading “For These Types of Backups. Auto Backup. Reenter the Backup Settings page and click Configure in the Oracle Secure Backup section. make sure the supplied values are correct.Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) 5. Then. 6. make sure that your Administration Server is selected from the list. Full. click OK.” select all check boxes (for Archive Logs. Select “Save as Preferred Credential” and click OK. 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 . Enter oracle/oracle for the host username and password. On the Backup Storage Selectors page. click Add to configure a Backup Storage Selector for your database. and Incremental database backup types).

Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) 9. Click Return. Oracle Database 10g: Backup and Recovery B-126 . Your Backup Storage Selector has been created and is now displayed. 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.

Make sure that your Host Credentials are correct. On the Backup Settings page. r O 3.Solutions for Practice 12-1: Create a Database Backup Storage Selector (continued) 3) Test your tape backup. When your tape drive test is successful. and then click “Test Tape Backup” in the Tape Settings section in the middle of the page. The progress window appears. click the Database Instance link to return to the Maintenance page. 2. 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 . Answer: 1. scroll down to see that the administrative server is set.

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 .

you should log on as the oracle user to your terminal emulator session. make sure your Host Credentials are set correctly. 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. select “Both Disk and Tape” and click Next. On the Database home page. Then click the Schedule Oracle-Suggested Backup button 4. click the Maintenance link. 1) In Enterprise Manager. On the Schedule Backup page. On the “Schedule Oracle-Suggested Backup: Destination” page. On the Maintenance page. click the Schedule Backup link. and as SYSDBA to your Database Control Console and SQL*Plus sessions. 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 . Unless specified otherwise. perform Oracle-Suggested Backup. 2. 3.Solutions for Practice 12-2: Perform Oracle-Suggested Backup In Enterprise Manager.

select “Archivelogs and the Incremental Backup”.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 5. On the “Schedule Oracle-Suggested Backup: Setup” page. select the daily backup to run within 5 minutes of your current date and time. 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. On the “Schedule Oracle-Suggested Backup: Schedule” page. Oracle Database 10g: Backup and Recovery B-130 . and then click Next.

Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) This specification first initiates a disk backup to the Flash Recovery Area. 7. and then the backup will be written to tape. 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 . On the “Schedule Oracle-Suggested Backup: Review” page. review both the Settings and RMAN Scripts and click Submit Job.

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 . r O 2) Review your backup job. You should see that the job has been successfully submitted. you should see a full backup (otherwise an incremental one) first to the Flash Recovery Area.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 8. If this is your first scheduled backup. Review the RMAN command. and then to tape. as well as the job execution.

review how the RMAN command allocates the disk and tape devices. due to different timing and previous tasks. 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 .Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) Answer: 1. The Job Execution page is displayed. 2. click View Job. In the Output log. Click the Backup link under the Logs section. At your specified backup time. The content of this screenshot may be different from yours.

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 .Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 3. This screenshot shows you the switch from disk to tape. you can select: EM Maintenance > Backup Reports. Scroll down to see the Result area. If you are interested only in a summary of the backup activities. Scroll down to review the execution of these commands. r O 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-135 . to reinforce this practice topic.html viewlet in the /home/oracle/solutions/viewlets directory. Double-click the Oracle_Suggested_Strategy_viewlet_swf.html file and view the presentation. but it should show both DISK and SBT_TAPE under “Output Devices. Navigate to the /home/oracle/solutions/viewlets directory. r O 3.” 3) Optionally. 2. you can view the Oracle_Suggested_Strategy_viewlet_swf.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) Your screenshot will look different. Answer: 1. Click the oracle’s Home icon on your desktop.

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. close your Web browser window.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 4.

you perform the following tasks: • Create a dataset for a file-system 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 B-137 .Practice Solutions for Lesson 13 In this practice. • Schedule a backup of the dataset.

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.” accept this certificate permanently and click OK in any security pop-up window. click Add. You are now redirected to the Oracle Secure Backup Web tool application. On the Datasets page. If you receive the warning “Website Certified by an Unknown Authority. On the Backup page. and click Login. click the Backup tab. Unless specified otherwise. 6. click the Datasets link in the Settings section. which can be accessed from Enterprise Manager for the tasks in this practice session. 4. Note: Do not back up the local root 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-138 . From your Database home page. 3.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup Use the Oracle Secure Backup Web tool. click the Maintenance tab. On the Oracle Secure Backup Login page. On the Maintenance tabbed page. Answer: 1. 2. 1) Create a new dataset called mylabs that you will use to back up your $HOME/labs directory. enter admin as User Name and oracle as Password. 5. 7. access Enterprise Manager as SYDBA and the Oracle Secure Backup Web tool as admin user. On the Oracle Secure Backup Web tool home page. click the File System Backup and Restore link in the Oracle Secure Backup section. Both use oracle as password.

Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 8. set the Name field to mylabs. On the New Datasets page. Oracle Database 10g: Backup and Recovery B-139 . After this is done. r O cl a In e rn te l& a O I A s U O e ly n 9. place comment signs (#) before the relevant lines. click Save. or delete these lines. To not back up the local root directory. 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.

select mylabs. 2) Create a backup with your mylabs dataset. The backup should run immediately. Answer: 2. select the mylabs dataset and click OK. click Backup Now on the bottom of the page. On the Backup: Backup Now > Options page. Verify that the dataset was created successfully. you see that there were no errors. On the Backup: Datasets page. click the Add button. On the Datasets page. and click Check 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 B-140 . resolve them. If there are any errors. On the Dataset Errors page.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 10. On the Backup Now page. then click Close. 1. 3. 11.

Oracle Secure Backup submits the backup request and assigns a job number. On the Manage page. click Jobs. Query the Manage: Jobs page for the previously created and executed job. 5. r O 3) View Oracle Secure Backup job information. 2. Click the Manage tab. Answer: 1.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 4. 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 . select the mylabs dataset and click Go to submit the job to the scheduler. Review the result. When returned to the Backup Now page.

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-142 . Click the Manage link to return to the Manage page.Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 3. The updated display now shows the recent dataset backup as well as the previous RMAN backup jobs. restrict the display to only Active. or Pending jobs by selecting those options. select backup. Complete. then hold the [Ctrl] key and select dataset and Oracle backup. On the Jobs page. In the Types box. 4.

Solutions for Practice 13-1: Back Up Your File System with Oracle Secure Backup (continued) 4) Optionally. Click the oracle’s Home icon on your desktop. When you have finished viewing the presentation. Double-click the Scheduling_filesystem_backups_viewlet_swf. to reinforce this practice topic. you can view the Scheduling_filesystem_backups_viewlet_swf.html viewlet in the /home/oracle/solutions/viewlets directory. 3. 2.html file and view the presentation. Answer: 1. 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-143 . Navigate to the /home/oracle/solutions/viewlets directory.

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

• Recover a tablespace from an encrypted backup.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 . you perform the following tasks: • Create an encrypted backup.

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

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 . r O 6. online backup with archive logs and click Next. Retain the default values of the backup options: full.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 5. Select the Tape setting and click Next.

On the “Schedule Customized Backup: Review” page. specifying demo as the password. click Edit RMAN Script. 2) Edit the RMAN script and include the command to encrypt the backup. and then 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-153 . The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 7. r O Answer: 1. Make sure the Start Immediately option is selected. Then submit the backup job.

Enter SET ENCRYPTION ON IDENTIFIED BY demo ONLY. and then 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-154 . Verify that the RMAN SET ENCRYPTION command is successfully executed. Click View Job. 3) Check the backup job status. and no other encryption keys will exist for this backup. at the top of the RMAN script. Note: Specifying “ONLY” in the command means decryption will require the demo password.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 2. Answer: 1.

Click the Backup link in the Name column of the table under the Logs section. 3.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 . Notice the successful execution of the RMAN SET ENCRYPTION command.

5) Optionally.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 4) Verify the successful completion of your backup. Answer: Refresh the browser page until the backup completes. Answer: r O 1. you can view the Backup_Encryption_viewlet_swf. 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. 2. Navigate to the /home/oracle/solutions/viewlets directory. Click the oracle’s Home icon on your desktop.html viewlet the /home/oracle/solutions/viewlets directory.

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 . close your Web browser window.html file and view the presentation. When you have finished viewing the presentation. Double-click the Backup_Encryption_viewlet_swf.

Restore the files to the default location. 2. • Troubleshoot the recovery process. 3. 1) In Enterprise Manager. Select Tablespaces from the Object Type list. On the Maintenance tabbed page. click the Maintenance tab. you perform the following tasks: • Perform a tablespace recovery using the encrypted backup. • Edit the RMAN script to decrypt the 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 B-158 . click the “Perform Recovery” link in the Backup/Recovery section. perform an object-level recovery of the EXAMPLE tablespace to the current time or a previous point in time. Answer: 1. you should log in as SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. On your Database home page. Unless specified otherwise. and click Perform Object Level Recovery.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup In this practice. ensure that your Host Credentials are correct.

Click Add. 5. Retain the default values for point-in-time recovery and click Next.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 .

Restore the files to the default location” option and click Next. 7. r O 8. and click the Select button. 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 . Click Next. Accept the “No.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 6. Select the EXAMPLE tablespace.

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 . RMAN could not decrypt the backup because it needs the password.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 9. Why? Answer: 1. Notice the “ORA-19913: unable to decrypt backup” error. 2) The recovery operation fails. Review your recovery request and click Submit. Scroll down the output window on the Perform Recovery: Result window.

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 .Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 2. r O 4) Perform an object-level recovery of the EXAMPLE tablespace to the current time or a previous point in time. This is due to the failed tablespace recovery attempt. On the Maintenance tabbed page. Restore the files to the default location. 2. click the “Perform Recovery” link in the Backup/Recovery section. Answer: 1. 3) Troubleshoot the recovery process. What do you notice on the Perform Recovery page? Notice that there is a tablespace offline and its datafile needs media recovery. Select Tablespaces from the Object Type list and click Perform Object Level Recovery. What do you notice on the Perform Recovery page? Answer: 1. Click OK.

and click Next. make sure that the EXAMPLE tablespace is displayed.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 2. 3. Retain the default values for point-in-time recovery and click Next. On the “Perform Object Level Recovery: Tablespaces” 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-163 .

specifying demo as the password. The command syntax is: SET ENCRYPTION ON IDENTIFIED BY demo ONLY. Restore the files to the default location” option and click Next. 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 . 5) Edit the RMAN script on the “Perform Object Level Recovery: Review” page.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 4. Then submit the backup job. Include the command to decrypt the backup. Retain the “No.

Notice that the SET DECRYPTION command was executed. Notice the successful execution of your SET DECRYPTION command. 6) View the Perform Recovery: Result page.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 1. and then click Submit. 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 . Click Edit RMAN Script. Enter SET DECRYPTION IDENTIFIED BY demo. at the top of the RMAN script. Answer: 1.

When you finished reviewing the results. 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 . click OK. Notice that the recovery completed successfully and the EXAMPLE tablespace was brought back online.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 2. r O 3.

• Back up the Oracle Secure Backup catalog. you perform the following tasks: • View Oracle Secure Backup information.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 .

Click the path link under Browse Host thrice. Unless specified otherwise. click the Maintenance tab. Click Backup Catalog. you view Oracle Secure Backup information: the catalog. 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 . Solutions for Practice 16-1: View Oracle Secure Backup Information 5. you should log in as the SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. Click File System Backup and Restore.In this practice. Click the Restore tab. volumes and their content. 1) The administrative server maintains a catalog in which it stores metadata relating to backup and restore operations for the administrative domain. 2. To access the Oracle Secure Backup Web tool. use admin as username and oracle as password. 4. Select your host name and click Browse Host. 3. r O 6. Use the Oracle Secure Backup Web tool to browse the Oracle Secure Backup catalog to view what you have backed up so far. jobs and job transcripts. Answer: 1. On your Database home page. and defaults and policies.

click the Manage tab. Click Volumes. Answer: 1. In the Oracle Secure Backup Web tool. which you backed up during a previous practice 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 B-169 . Click until you see the files. Note: The content of your /home/oracle/labs directory is different during class. 2) View the volumes and their content. 2.Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 7.

Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 3. Review the List Section Properties. 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 . Then click Close. The content of your Backup Sections will be different from this screenshot. click the Home tab. 3) View a category of jobs—for example. Select one of the volumes and click List Backup Sections. 4. completed ones. Answer: 1. In the Oracle Secure Backup Web tool. Include a review of a job transcript.

3. r O 4. so look at completed ones. Scroll to the end of the job transcript and view the error rate. Select the archivelog backup job and click Show Transcript. 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 . 2.Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) Most likely. It should be 0%. Click the Completed Jobs link. you will not have any failed jobs to research.

click the Maintenance tab. 4. On the Configure: Defaults and Policies 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-172 . Click Close. On the Configure page. 3. Click the Configure tab. On your Database home page. What is the value of the “Login token duration” policy? Answer: 1. click the security Policy.Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 5. r O 5. Click the File System Backup and Restore. 4) View the configuration of your security policies. click the Defaults and Policies link in the Advanced section. 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-173 . which means after 15 minutes of inactivity. you need to repeat your Oracle Secure Backup login. What is the value of the “Login token duration” policy? The default value is 15 minutes.Solutions for Practice 16-1: View Oracle Secure Backup Information (continued) 6.

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

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 . (--dataset). barcode 6a156878c944102b98500065b9621 d0. Answer: ob> lsvol --drive vt r O cl a ob> lsvol --drive vt Inventory of library vlib: * in 1: volume RMAN-DEFAULT-000002.ds) submitted. ob> 4) Use the information from the message returned in the previous step to verify that the backup completed successfully.ds Level: full Family: OSB_catalogs Scheduled time: none State: completed successfully at 2006/05/19. barcode 6a2ac70ec944102b98500065b9621d0 * in 4: unlabeled.ds ob> backup --go Info: backup request 1 (dataset catback. so the volume that contains the backup can be easily located. The backup is executed as the privileged root user (-g) and is given the highest priority (-p 1). 3463296 kb remaining. All the files described are backed up regardless of when the last backup was taken or what files have changed. job id is admin/3. content manages reuse * in 3: unlabeled. barcode 69ed75c0c944102b985 00065b9621d0. 3462496 kb remaining.21:51 Priority: 1 Privileged op: yes Run on host: (administrative server) Attempts: 1 ob> 5) Identify the volume that contains the backup. ob> backup –l full –p 1 –r vt –g --dataset catback. Answer: ob> lsjob --long admin/3 admin/3: Type: dataset catback. (State should show “completed successfully”).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. barcode 6a409e76c944102b98500065b9621d0 in dte: volume VOL000001. The backup is restricted to only the vt tape drive.ds.

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. r O cl a In e rn te l& a O I A s U O e ly n . All rights reserved.Oracle Secure Backup Additional Installation Topics Copyright © 2006.

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 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. together with the relevant lesson.Topics This appendix. All rights reserved. Oracle.

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. and can additionally be a media server or administrative server installation. such as: on Windows: disable drivers on Windows-based media servers. the GNU SMTP implementation is replaced with one developed by Oracle. All rights reserved. and how to configure firewalls. 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 . Oracle. Note: Every installation of Oracle Secure Backup on Windows is a client installation. During the installation process. see documentation for platform-specific details. Windows Installation: Overview Before beginning your installation. Oracle Secure Backup supports configuring the administrative domain on a host running the Windows operating system.3 .Windows Installation: Overview Stop drivers Run setup. To support running an administrative server on Windows. the Oracle Secure Backup Setup Wizard copies all Oracle Secure Backup files to the local host and generates Windows Registry entries.

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

Windows drivers claim devices to be used by Oracle Secure Backup. Repeat steps 9 and 10 for each tape library or tape drive that you intend to use with Oracle Secure Backup. 12. Reboot your host.Stopping Tape Device Drivers (continued) 11.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 C . If not disabled. the Windows drivers will preempt the Oracle Secure Backup device driver (ob) on the next reboot.

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

The “Ready to Install the Program” window is displayed. Click Install to start copying files. selecting this option removes the X from the Administrative Host icon and installs the administrative server software. Click Finish to continue. 11. 10. repeat this process for Create “oracle” user. the InstallShield Completed screen is displayed.Oracle Secure Backup Setup (continued) b. If you plan to perform Oracle database backups and restores. c. 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. click the pull-down menu of the Administrative Host icon and select “This feature will be installed on local hard drive. When the files are copied. A progress bar appears.” Again. To configure the Windows host as an administrative server.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 C . 9. Click Next to continue.

Oracle. All rights reserved.Manual: The Oracle Secure Backup service must be started manually by a user who is a member of the Administrators group.8 . 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 . Select a mode in which to start the Oracle Secure Backup service. Note: On the Windows operating system. Click Next to continue.Service Startup Dialogs Continued: Copyright © 2006. 13. . Service Startup Dialogs The Service Startup dialog box is displayed. Your choices are: .Automatic: The Oracle Secure Backup service starts automatically when you reboot your host. the only daemon that runs as a Windows service is the Oracle Secure Backup service (observiced). 12. .Disabled: The Oracle Secure Backup service is disabled.

9 . 14.Service Login Dialog Box Continued: Copyright © 2006. click “This Account” and enter the Windows user account name and password. Oracle. Click Finish to complete the installation. 16. Select one of the following options: . click System Account. Service Login Dialog Box The Service Login dialog box appears. 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 . .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. Repeat this installation process for each Windows host in your administrative domain.If you plan to run the Oracle Secure Backup service daemon (and associated subordinate daemons) with full privileges. All rights reserved. 15. If you choose this option. The required privileges are listed in the Oracle Secure Backup Service Logon dialog box. ensure that the account you select has enough backup and restore privileges.

each host on which Oracle Secure Backup is installed contains a configuration file. 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 . However.10 . The configuration file is called obconfig. Configuration file Oracle Secure Backup Installed Files The Oracle Secure Backup home directory is created on every host where you install Oracle Secure Backup. and it is called obconfig in the /etc directory on UNIX and Linux systems. although the contents of the directory vary depending on the roles you assigned to the host.txt in the db subdirectory where you install Oracle Secure Backup on Windows. In addition to containing the Oracle Secure Backup directory. The illustration in the slide shows the installed directories that are common to an administrative server on any operating system.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. All rights reserved. These directories contain the following types of files: • admin: Administrative and configuration data for the administrative domain. Oracle. an administrative server configured on a Linux host will have additional directories created.

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. 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.<operating_system>/: Daemons and utility programs for operating_ system • install/: Installation scripts • lib/: Link to the architecture-independent shared library for the SBT interface • .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 . • 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.etc. the directory for Sun Solaris is . On a Windows host. • . where operating_system is a derivative of the operating system name. For example.<operating_system>/: Maintenance tools • /usr/etc/ob/.solaris. the directory for Sun Solaris is . • .lib.wrapper shell program enable hosts to contain executables for multiple computer architectures.<operating_system>/: Executables for operating_system. For example. based on the computer architecture of the host executing the command.etc. Symbolic links and the architecture-independent . This script is an architecture-specific executable selection tool for Oracle Secure Backup.<operating_system>/: Shared library for the SBT interface for operating_system.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 • .bin.* directory.solaris.wrapper: Shell program that selects an executable from a .wrapper script for each Oracle Secure Backup utility.<operating_system>/: Device drivers for operating_system • etc/: Links that point to the <OSB_root>/.11 .drv.lib.bin.* or .

drv.hostid /usr/etc/ob/xcr/ /usr/tmp/ .12 .Oracle Secure Backup Installed Files <OSB_Home> directory /usr/local/oracle/backup . The other directories shown in the slide are created for machines that use the Windows operating system.bin.<OS> help bin device Media server <OSB_Home> directory /usr/local/oracle/backup help bin Client device Copyright © 2006.<operating_system>/ etc/ . Oracle. the following files and directories are installed in addition to the bin and device subdirectories: • Media server: . The bin and device subdirectories are created on every machine. All rights reserved. regardless of the operating system used. Oracle Secure Backup Installed Files (continued) The slide illustrates the directories created for a media server or client.<operating_system>/ man/ /usr/etc/ob/. For a UNIX or Linux host.<operating_system>/ .etc.drv.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 .

bin.etc.Oracle Secure Backup Installed Files (continued) • Client: .<operating_system>/ man/ /usr/etc/ob/.hostid /usr/etc/ob/xcr/ /usr/tmp/ .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 .<operating_system>/ etc/ .13 .

txt in the db subdirectory where you install Oracle Secure Backup on Windows. and it is called obconfig in the /etc directory on UNIX and Linux systems. The illustration in the slide shows the installed directories that are common to an administrative server on any operating system. However. The configuration file is called obconfig.14 . although the contents of the directory vary depending on the roles you assigned to the host. Oracle. In addition to containing the Oracle Secure Backup directory. All rights reserved.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. These directories contain the following types of files: • admin: Administrative and configuration data for the administrative domain. 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 . each host on which Oracle Secure Backup is installed contains a configuration file. an administrative server configured on a Linux host will have additional directories created.

etc. based on the computer architecture of the host executing the command.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.bin.lib.* or . 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. the directory for Sun Solaris is .solaris. 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>/: Executables for operating_system. Symbolic links and the architecture-independent .<operating_system>/: Device drivers for operating_system • etc/: Links that point to the <OSB_root>/. • .<operating_system>/: Maintenance tools • /usr/etc/ob/.wrapper: Shell program that selects an executable from a . On a Windows host.wrapper shell program enable hosts to contain executables for multiple computer architectures.15 .<operating_system>/: Daemons and utility programs for operating_ system • install/: Installation scripts • lib/: Link to the architecture-independent shared library for the SBT interface • . For example.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. where operating_system is a derivative of the operating system name.solaris. For example.lib.etc.<operating_system>/: Shared library for the SBT interface for operating_system.bin. This script is an architecture-specific executable selection tool for Oracle Secure Backup.wrapper script for each Oracle Secure Backup utility.* directory.bin. the directory for Sun Solaris is .

16 .bin.<OS> help bin device Copyright © 2006. The bin and device subdirectories are created on every machine. regardless of the operating system used.<operating_system>/ .Installed Files for Host Role: Media Server <OSB_Home> directory /usr/local/oracle/backup . the following files and directories are installed in addition to the bin and device subdirectories: • Media server: .etc.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>/ etc/ . For a UNIX or Linux host.<operating_system>/ man/ /usr/etc/ob/.hostid /usr/etc/ob/xcr/ /usr/tmp/ . The other directories shown in the slide are created for machines that use the Windows operating system. Installed Files for Host Role: Media Server The slide illustrates the directories created for a media server or client.drv. Oracle. All rights reserved.

Installed Files for Host Role: Client 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.bin.<operating_system>/ etc/ . • Client: . Oracle. The bin and device subdirectories are created on every machine. regardless of the operating system used.Installed Files for Host Role: Client <OSB_Home> directory /usr/local/oracle/backup help bin device Copyright © 2006.etc. All rights reserved.17 .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 .<operating_system>/ man/ /usr/etc/ob/.hostid /usr/etc/ob/xcr/ /usr/tmp/ .

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. HP-UX.18 .Specifying Installation Parameters # Once you've customized this obparameters file. 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. and Solaris64. Currently. Oracle. Linux. The obparameters file is located in the install subdirectory of 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 C . create pre-authorized oracle user: yes Copyright © 2006. For a Linux installation. AIX. Specifying Installation Parameters Oracle Secure Backup provides an obparameters file to help users customize their installations. The default value is the <OSB_Home> directory. All rights reserved. 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. you can set directories for Solaris. change the # following line to 'yes' to make installob less chatty.

/samples/*./admin/config/* .lib.0 root. You can specify the behavior for each type of supporting 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 . The default value is /usr/etc/ob. it cannot be shared among multiple machines via NFS (or any other remote file system).linux32. and the name of the directory in which to create the “lib” link (for library files). on some systems. or in /usr/etc instead of /etc. for example)./admin/* . You can choose not to create these links or to modify the location of the created links. 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. which eliminates temp directories mounted as SunOS “tmpfs” file systems./admin . 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 select a temp directory on a per-OS basis by modifying the appropriate line.*/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. Here is a partial listing: root.so link in this directory.0 root. along with the default permissions. For example.0 root. • <OS type> links: Indicates whether or not Oracle Secure Backup should create symbolic links.19 .so file that resides in the operating system–specific lib directory (. This directory must be private to each machine.0 755 700 700 700 755 4755 . the name of the directory in which to create the “etc” link (for daemons). By default.0 root. • <OS type> temp dir: Is used to alter the location of the temp area. The default value is yes. which is a subdirectory of your <OSB_Home> directory. it may be more appropriate to place links in /bin instead of /usr/bin. Note: If the obparameters file specifies a lib directory for the operating system type of the current installation./.bin.sh .0 root.*/* .Specifying Installation Parameters (continued) • <OS type> db dir: Is used to alter the directory in which Oracle Secure Backup retains host-specific information. Oracle Secure Backup uses the /usr/tmp directory on each host for the storage of transient files during installation. then the installation software creates a libobk. are listed. The link text points to the actual libobk. Oracle Secure Backup requires that the temp directory be able to contain lockable files./. Three link names must be specified: the name of the directory in which to create the “bin” links. A list of the files and directories.bin.

Looking for an acceptable temporary work area on client_z. Making sure target file system has enough space. Note: In this particular example.20 . the complete output is not shown in the slide.” When the installob script gives you the possibility to install Oracle Secure Backup on another machine. For formatting reasons. Client Installation: Example Assume in the example shown in the slide that you have just installed Oracle Secure Backup on the administrative server. you choose yes...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. Oracle Secure Backup installed successfully onto client_z Copyright © 2006. Oracle.. OK to proceed [yes]? yes Installing Oracle Secure Backup onto client_z (HP-UX version 10. as shown. All rights reserved. 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 ... a client installation is performed automatically.done.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 .. I'm ready to install Oracle Secure Backup on client_z as a client. The work area on client_z to be used for temporary install files is /tmp. and you now want to install Oracle Secure Backup on a client named “client_z. This is because the installob script determined that the target machine could not be configured as an administrative or media server. You need to specify the name of the machine and answer some basic questions.. no choice is provided regarding the new machine’s role. Thus..

For example. In the example. Note: The procedure for configuring tape libraries or Fibre Channel devices is the same as the process for configuring SCSI tape drives. … 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 need to obtain some physical SCSI information about the device. /dev/obt1. on a Linux platform. specify the host name of the machine that you want to add as a media server. q to quit) [c]? b Oracle Secure Backup's Web Server Interface software has been loaded. you must also assign an Oracle Secure Backup logical unit number. First.(c) a client Which would you like (one of a b c. you specify that you want this new machine to be a media server. (b) a media server or. it is assumed that the media server has only one SCSI tape drive attached. 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. In addition to obtaining SCSI device information. Note: For formatting reasons. Then.21 . 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. you can use the cat /proc/scsi/scsi command to obtain the necessary information. the complete output is not shown in the slide. and so on. Media Server Installation: Example This example demonstrates a media server installation. All rights reserved. /dev/obt0.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 . Oracle. 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. Before you can configure the tape drive.

All rights reserved. execute the following: $ obtool Oracle Secure Backup 10.1. Oracle.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.22 . To start the obtool utility. Verifying Your Installation In the slide are some examples of how you can verify your installation.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 .

Oracle. • Use the uninstallob script. If you are not logged in as root when you uninstall the software. If you uninstall Oracle Secure Backup from the local machine. you are given the option of retaining the administrative directory and its contents. 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 . To identify processes for Oracle Secure Backup. If you uninstall Oracle Secure Backup from an administrative server. For this reason. • Choose whether you want to save or remove the: – Oracle Secure Backup directory – Administrative directory Copyright © 2006. you may not have the privileges needed to delete files and shut down the Oracle Secure Backup daemons. 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 . • Close all sessions of Web tool. 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. All rights reserved. the uninstallob script removes the Oracle Secure Backup home directory when the script completes. – Call script from the parent directory of the Oracle Secure Backup home directory. Uninstalling Oracle Secure Backup You can uninstall Oracle Secure Backup from a client or the administrative server. 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. You must be logged in as the root user on UNIX or Linux systems to uninstall Oracle Secure Backup completely.Uninstalling Oracle Secure Backup • Have all users log out of Oracle Secure Backup applications. – You must be logged in as the root user.

correct the problem causing the error if possible. 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 . then run the uninstallob script again until you see the following message: Oracle Secure Backup has been successfully removed from <host>.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).24 .

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 .25 .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. All rights reserved.

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 .

one for each host that can directly access it. A host where you install Oracle Secure Backup. A device must have at least one attachment. Defines the way in which Oracle Secure Backup authenticates itself to the NDMP server. The administrative server runs the scheduling daemon.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. or an NAS device name. 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. 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. 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 . an attachment comprises the identity of a host plus a UNIX device special file name. Most often. application programming interface An attachment describes a data path between a host and a storage device. and often has multiple attachments. you should use the negotiated default setting. One administrative server can service all clients on your network. Advanced Intelligent Tape. Typically. This host stores configuration information and the catalog files for client hosts.

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

Specifies how many 512-byte blocks to include in each block of data written to each tape drive. 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 backup description file. or a combination of letters and numbers as in ASCII code. Oracle Secure Backup fails with an error. If you pick a value larger than is supported by the operating system of the server. numbers. By default. The backup schedule contains the names of each such dataset and the name of the media family to use. Oracle Secure Backup writes 64 K blocks to tape (blocking factor 128). 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 . 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. See backup image section. Also referred to as archive sections.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. which Oracle Secure Backup supports. processor instructions. Some tape libraries have an automated means to read barcodes. Because higher blocking factors usually result in better performance. See Database Backup Storage Selector. you can try a blocking factor larger than obtar’s default. A collection of Oracle Database data backed up by RMAN.

starting with 1. command descriptor block See Common Internet File System. obrobtd). which accesses the database. including administrative servers and media servers. Direct Attached Storage. Some daemons run continually (for example. observided) and others are started and stopped as required (for example. 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. and the Oracle Secure Backup software. They act as a glue layer between RMAN. each DTE is sequentially numbered. those parts of a wide-area network in which the mass storage devices are connected locally Digital audio tape. 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. A process on UNIX and Linux that runs in the background and performs an OSB task for an application. a new file access protocol designed to take advantage of standard memory-to-memory interconnect technologies See Direct Access Recovery. A file that contains the names of the hosts and paths that you want Oracle Secure Backup to back up. Secondary storage device within a tape library usually referred to by a number. which manages the underlying media. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-5 .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 Access File System. This is equivalent to a service on a Windows host. used by Windows clients to access data on this Network Appliance filer. In libraries that contain multiple drives. also referred to as a host CIFS is a protocol.

whether it is connected to a network or not. 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. DAR relies on file history information generated at the NAS device during a backup operation. Most devices have their drivers installed when the device or product that uses it is installed. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-6 . The DNS host name is the host name of the computer (does not include the domain). must have a driver program. disk drive. or keyboard. 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). 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. 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. also referred to as local Digital Linear Tape technology. Every device. Located on the same host or server. In DNS. 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. whether it is a printer. every host name is composed of a host name and domain name. which is a symbolic name used to reference a particular system.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.

FDDI networks are token-passing networks. A Fibre Channel configuration consists of a backplane. 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. A high performance interface designed to bring speed and flexibility to multiple diskdrive storage systems. This label contains the volume ID of the next volume in the set A unit of storage equal to 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 typically used as backbones for wide-area networks.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. (an external enclosure that houses a printed circuit board (PCB) and multiple drive receptacles) and a Fibre Channel host bus adapter (HBA). The backplane allows O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-7 .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.024 x 1. and support data rates of up to 100 Mbps (100 million bits per second). domains are defined by the IP address.024 x 1. All devices sharing a common part of the IP address are said to be in the same domain. Within the Internet.

graphic images.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). the set of rules for exchanging files (text. IP and a wide range of other protocols to meet the needs of the data center. supplies power to the drives. allows concurrent communications among workstations. Fibre Channel. a media server. Files are backed up whether or not they have changed since the last backup. mainframes. video. equal to 1. abbreviated as G or GB. GigaBit Interface Converter. and controls the input and output of data on all drives within the system.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 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. 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. 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 . sound. data storage systems. servers. and other peripherals using SCSI. 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. Hypertext Transfer Protocol (HTTP). You can have an administrative server. a one and two gigabit interconnect technology. or a client.

Not all libraries have a discrete import-export element. and is physically present only on certain libraries. 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 .” an acronym for Small Computer System Interface protocol over IP network instead of a direct SCSI compatible cable. A process that captures data that was changed since the level N backup operation.” ISAM is implemented as a C function library. Pronounced “eye-scuzzy. ISAM provides direct access to specific records through an index. The combination of the data file and its associated index file is called a “database. Some libraries do have a media access port. 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. 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. While storing data sequentially in a data file. iSCSI enables data blocks to be read from or sent at high speed to a storage device such as a disk or tape drive. It is sometimes called a mail slot. Just a Bunch of Disks. Used in tape libraries to move volumes into and out of the library without opening the door. HTTPS is HTTP using a Secure Socket Layer (SSL).

developed jointly by HP.048.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. Each media family identifies the amount of time that data can be written to a tape. 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.024 x 1. Valid values are read-only. equal to 1.024 or 1. and not-mounted. which means that users will have multiple sources of product and media See logical unit number. Linear Tape-Open technology. Moves a volume from a storage element to another element within a tape library A unit of storage abbreviated as M or MB. equal to 1. IBM. an “open format” technology. A collection of tapes or volumes A classification of backup media that share the same volume identification sequence. write/append. overwrite. and the amount of time the tape can remain in storage before it can be overwritten. Backup data is sent to and restored from volumes loaded in these devices. O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-10 . A library with multiple media servers connected to it See Network Attached Storage.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.024 bytes Data that Oracle Secure Backup uses to identify a volume or a backup image local area network See tape library. A media family can contain one or more volume sets and volumes. and Seagate. LUNs make it possible for a number of devices to share a single SCSI ID. abbreviated as K or KB. A machine with one or more attached tape drives or tape libraries.

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. The protocol provides a uniform means to back up and restore data within and between diverse kinds of storage servers. The server exposes the file systems to its clients through one or more standard protocols. and finite state automations that implement them. Layered atop TCP and the Berkeley socket model. One of three types of NDMP services. 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 name of a backup method supported by the NDMP Data Service running on a host. A computer on your network that hosts file systems. and closed operating system appliances. NFS provides access to shared files through an interface called the Virtual File System (VFS) that runs on top of TCP/IP. Backup types are defined by each Data Service provider. most commonly NFS and CIFS. network messages. NDMP defines a set of related service models. The NAS appliance communicates with the backup software using NDMP. 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. 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. for example) on the appliance. 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. open systems.

This is useful when you want to create a backup image for offsite storage without disturbing your schedule of incremental backups. A unit of information equal to 4 bits (or half a byte) One of the file systems for the Windows operating system. such as transaction logs to help restore from disk failures. See Network File System. A person who runs backup operations. 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. Internal names are named with a UUID. computers connected to a network operate as clients while accessing remote 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 . A data storage type used to store Oracle Secure Backup catalog data. See NT File System. With NFS. and as servers while providing remote users access to local shared files. class. swaps tapes.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. external names are user assigned. There are user. manages schedules. and checks for any errors A request from Oracle Secure Backup that asks for the operator to perform a task. The NFS standards are publicly available and widely used. NTFS has features to improve reliability.

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

” an acronym for Small Computer System Interface. Linux has a four- O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-14 . such as backup or restore. a Small Form Factor ½″ tape cartridge See Storage Area Network. See expiration policy. See expiration policy. interface between RMAN and storage media. 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. is performed. Super Advanced Intelligent Tape. RMAN communicates with Oracle Secure Backup through the SBT interface. A user-defined time period for executing backup operations Pronounced “scuzzy. Connection to the SCSI bus is achieved through a host adapter and a peripheral controller. System backup to tape. an acronym for Redundant Array of Inexpensive Disks to reflect the data accessibility and cost advantages that properly implemented arrays could provide. This list is defined in the obconfig file on the administrative server. The acronym has evolved to mean Redundant Array of Independent Disks emphasizing the technique’s potential data availability advantages over conventional disk storage systems. 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). Recovery Manager Used to determine the Oracle Secure Backup user under which a specific RMAN operation. This allows for the use of Oracle Secure Backup without going through the normal Oracle Secure Backup login requirements.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.

8-bit SCSI can have up to eight IDs. In the SCSI-2 specification. The initiator talks to targets. The value used to identify a logical unit of a SCSI device. There must be a minimum of one target and one initiator on the bus. 0 to 15 for 16-bit and 0 to 31 for 32 bit systems. and Adleman). These logical units are numbered from 0 through 7. there may be up to eight logical units for each SCSI device address. The unique address of a SCSI device. Super Digital Linear Tape technology. Each SCSI device can contain multiple Logical Unit Numbers (LUNs). named after its inventors: Rivest. which also includes the use of a digital certificate. 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.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. 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 . 16-bit up to sixteen IDs. SSL uses the public-and-private key encryption system from RSA (a public key algorithm. 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. In SCSI parlance. which are commonly known as SCSI devices. Shamir. and 32-bit up to 32 IDs.

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. or secondary storage. a non-profit trade organization. or machines that contains disks for storing data. 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). A data storage medium consisting of a magnetizable oxide coating on a thin plastic strip. Tapes are also referred to as removable media. A tape library with only one media server directly attached to it Storage Networking Industry Association. 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 . Popular for its ability to store large amounts of data. Some services run continually and others are started and stopped as required.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. A high-speed subnetwork of shared storage devices. 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. and for its portability. commonly used for backup and archiving. It ensures that tape resources are available and reserves them for the backup job.

O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-17 . Oracle Secure Backup computes this by adding the write window duration. autochanger. A library accepts SCSI commands to move media between storage locations and drives. unattended operation and allow simultaneous reading and writing to multiple drives. abbreviated as T or TB. A user-defined period in time or sets of times that causes a scheduled backup to run The Uniform Resource Locator. The date and time on which a volume expires. A unit of storage. It is the suite of protocols used to connect hosts for transmitting data over networks. then adding the volume retention period. It is also referred to as a robotic tape device. equal to 1. A single unit of media such as an 8-mm tape. 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. or the address of a resource available on the Internet Universal Unique Identifier. A volume can contain one or more backup images.024 gigabytes Transmission Control Protocol/Internet Protocol.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. Tape libraries also offer key features such as barcode readers to scan labels on cartridges. or medium changer. and an I/O Port for importing and exporting individual tapes under application control. if any. to the time at which it wrote backup image file number 1 to a volume. Tape libraries are designed for continuous.

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

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

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