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 .

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

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 .

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

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

Practice for Lesson 3 In this practice. 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 . You also configure a backup of your database using the Oracle-Suggested Backup Strategy feature in Enterprise Manager Database Control.

2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking. 5) Use RMAN to create a duplexed backup set of the EXAMPLE tablespace. Specify /u01/app/oracle/oradata/orcl/chg_track. r 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 .Practice 3-1: Use RMAN to Create and Manage Backups 1) Use Enterprise Manager Database Control to configure autobackup of the control file and the server parameter file. 3) Use Enterprise Manager Database Control to create a whole database backup using the Oracle-suggested backup strategy. 4) Use Enterprise Manager to view information about your backups.f for the name of the block change tracking file. 6) Use Enterprise Manager Database Control to perform a crosscheck of your backups.

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

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

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

2) Simulate a failure in your environment by executing the lab_04_03_02_01. 1) Use SQL*Plus to view files information for the control files in your database.Practice 4-3: Recover Control Files 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-11 . Use Recovery Manager to recover the control files. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file. you recover your control file using an autobackup. 3) You need some more information about your control files.sh script to delete all your control files. Query V$CONTROLFILE. 4) You have lost all your control files and will need to recover them from the control file autobackup.

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

Practice for Lesson 5 In this practice. you use Oracle Flashback features to recover from errors in 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-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 A-14 . 2) Use the ALTER DATABASE command to enable supplemental logging.Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database.

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

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

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

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

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

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

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

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.

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

Practice 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 A-24 .

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

Practice for Lesson 10 There are no practices for Lesson 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 A-27 .

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

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

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

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

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

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

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

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

r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery A-37 . Both use oracle as password. 4) Optionally. Query the Manage: Jobs page for the previously created and executed job. which can be accessed from Enterprise Manager for the tasks in this practice session. 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. 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. 2) Create a backup with your mylabs dataset. to reinforce this practice topic. access Enterprise Manager as SYDBA and the Oracle Secure Backup Web tool as admin user. Note: Do not back up the local root directory. you can view the Scheduling_filesystem_backups_viewlet_swf.Practice 13-1: Back Up Your File System with Oracle Secure Backup Use the Oracle Secure Backup Web tool. The backup should run immediately. Unless specified otherwise. 3) View Oracle Secure Backup job information.

you perform the following tasks: • Delete the contents of your 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-38 . • Restore the missing lab files. • Verify that the files are recovered.Practice for Lesson 14 In this practice.

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

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

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

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

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

use admin as username and oracle as password. Include a review of a job transcript. 4) View the configuration of your security policies. 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 . you view Oracle Secure Backup information: the catalog. To access the Oracle Secure Backup Web tool. 2) View the volumes and their content. completed ones. you should log in as the SYS user (with the oracle password) and connect as SYSDBA to Enterprise Manager Database Control. volumes and their content. 3) View a category of jobs—for example. 1) The administrative server maintains a catalog in which it stores metadata relating to backup and restore operations for the administrative domain. and defaults and policies. jobs and job transcripts. Use the Oracle Secure Backup Web tool to browse the Oracle Secure Backup catalog to view what you have backed up so far. Unless specified otherwise.In this practice.

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

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 .

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

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 .

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

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

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

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

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

you configure automatic backup of the control file.Practice Solutions 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 B-9 .

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

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

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

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

The #Copies column shows the duplexed backup set copies you made. Oracle Database 10g: Backup and Recovery B-14 .rmn RMAN> list backup summary.----------.Solutions for Practice 3-1: Use RMAN to Create and Manage Backups (continued) input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.------.. Exit from RMAN. Use the RMAN LIST BACKUP SUMMARY command to view a listing of the backup sets and pieces.---------.-----21-MAR-06 22-MAR-06 22-MAR-06 22-MAR-06 1 1 1 1 1 1 2 1 r O cl a In e rn te l& a O I A s U O e ly n Recovery Manager complete.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.-. 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. using target database control file instead of recovery catalog List of Backups =============== Key TY LV S Device Type #Copies Compressed Tag ------.--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 --------------. RMAN> @sol_03_01_05_03.-.

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

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

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

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

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

Answer: 1.JOBS table.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. SQL> select * from jobs. 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 .Solutions for Practice 4-1: Use RMAN to Recover a Datafile (continued) 9. Query the HR. Click OK to return to the Maintenance page.

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

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

dbf'. 1. 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 . Click Return to return to the Tablespaces page. RMAN> @sol_04_02_07_02.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.rmn RMAN> backup as copy datafile 5 2> format '/u01/app/oracle/oradata/orcl/example01. Select Tablespaces on the Administration page. Log in to RMAN and connect to your target database. 3.dbf tag=TAG20060324T13447 channel ORA_DISK_1: datafile copy complete. 2. 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. 6) Using Enterprise Manager Database Control. Answer: 7) Make a copy of the datafile in the original location and switch back to it. Select the Example tablespace and click View. verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area. Answer: 1. Create an image copy of the datafile in the original location.

dbf" 5. 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. sql statement: alter database datafile 5 offline 4. sql statement: alter database datafile 5 online 8) Use Enterprise Manager Database Control to verify the file. Exit from RMAN. RMAN> sql 'alter database datafile 5 offline'. Select Tablespace on the Administration page. RMAN> recover datafile 5. Switch to the new copy you made. Take the datafile offline. Recover the datafile. RMAN> switch datafile 5 to copy. Bring the datafile back online. r 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 . Answer: 1. elapsed time: 00:00:02 Finished recover at 24-MAR-06 6. RMAN> sql 'alter database datafile 5 online'. datafile 5 switched to datafile copy "/u01/app/oracle/oradata/orcl/example01.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.

4. 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. Note that the datafile is the one you switched to. Click the Database tab to return to your database home page.

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

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

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

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

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. database opened 9.Solutions for Practice 4-3: Recover Control Files (continued) Finished recover at 28-MAR-06 8. using target database control file instead of recovery catalog sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT RMAN> backup archivelog all. elapsed time: 00:00:26 channel ORA_DISK_1: starting archive log backupset r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-30 . RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT'. Open the database with the RESETLOGS option. Back up the current online redo log file and back up all the archived redo log files. RMAN> alter database open resetlogs.

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

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> report obsolete.------------------Archive Log 19 15-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 20 16-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 21 20-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 22 20-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 23 20-MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log 24 21-MAR-06 /u01/app/oracle/flash_recovery_ac Datafile Copy 4 21-MAR-06 /u01/app/oracle/flash_recovery_af Backup Set 5 21-MAR-06 Backup Piece 5 21-MAR-06 /u01/app/oracle/flash_recovery_ap Backup Set 7 22-MAR-06 Backup Piece 7 22-MAR-06 /u01/app/oracle/flash_recovery_ap Backup Set 9 22-MAR-06 Backup Piece 10 22-MAR-06 /u01/app/oracle/flash_recovery_ap 2) Use Enterprise Manager Database Control to delete obsolete backups. Answer: 1.-----------------. Answer: 1. In your RMAN session. Invoke Enterprise Manager and log in as sys/oracle as SYSDBA.Solutions for Practice 4-4: Delete Obsolete Backups 1) Use Recovery Manager to view obsolete backups. r O 2. 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 -------------------. 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 . Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups. Note: Your results may vary from the following output. issue the REPORT OBSOLETE command to determine whether you have any obsolete backups.

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

Practice Solutions for Lesson 5 In this practice. you use Oracle Flashback features to recover from errors in 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-35 .

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

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

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

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

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

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

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

---------------------------------------.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 .----------CITY STATE_PROVINCE CO -----------------------------.------------------------.

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

JOB_HISTORY table. 3) Execute the lab_05_04_03_01.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 . 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.sql script to determine the number of rows in the HR. The Restore Point is created. Record the number of rows: ___________ Answer: 1.sql script to determine the number of rows in the HR. Execute the lab_05_04_03_01.JOB_HISTORY table.

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

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

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

Click Next. The Restore Point field is populated.Solutions for Practice 5-4: Use Flashback Database (continued) 14. Select Yes. r 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 . Click Next. 15.

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

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 .

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

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

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

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

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

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

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

f channel ORA_AUX_DISK_1: copied datafile copy of datafile 00003 output filename=/u01/app/oracle/oradata/aux/sysaux01.dbf channel ORA_AUX_DISK_1: copied datafile copy of datafile 00005 output filename=/u01/app/oracle/oradata/aux/example01.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 00005 input datafile copy recid=21 stamp=586270521 filename=/u01/app/oracle/flash_recf destination for restore of datafile 00005: /u01/app/oracle/oradata/aux/example0f channel aux1: copied datafile copy of datafile 00004 output filename=/u01/app/oracle/oradata/aux/users01.dbf 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.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.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/aux/system01.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 .log' ) SIZE 50 M REUSE. GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03.Solutions for Practice 6-1: Create a Duplicate Database (continued) input datafile copy recid=20 stamp=586270521 filename=/u01/app/oracle/flash_recf destination for restore of datafile 00002: /u01/app/oracle/oradata/aux/undotbs0f channel ORA_AUX_DISK_1: copied datafile copy of datafile 00002 output filename=/u01/app/oracle/oradata/aux/undotbs01. GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02.

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

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

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

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

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

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

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

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

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

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". Answer: 1. imported "HRTEST". ."EMP_DETAILS_VIEW" created with compilatios Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT ORA-39083: Object type REF_CONSTRAINT failed to create with error: ORA-00942: table or view does not exist Failing sql is: ALTER TABLE "HRTEST". imported "HRTEST"."EMPLOYEES" 15."JOBS" 6. 2. .Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) . r O cl a RMAN> backup database.76 KB 107 rows .609 KB 19 rows . Invoke RMAN and connect to your target database."SYS_IMPORT_FULL_01" completed with 3 error(s) at 07:08:54 4) Create a backup of your database using RMAN. . imported "HRTEST"."JOB_HISTORY" 6. Execute the BACKUP DATABASE command. 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 ."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".

Execute the date command at the operating system prompt. 2. Query the CURRENT_SCN column in V$DATABASE and record the current SCN. Invoke SQL*Plus as SYSDBA.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. 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. CURRENT_SCN ----------4725352 6) Record the current time.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/hrtest01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01. [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 .dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01. SQL> select current_scn from V$database. r O Answer: 1.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.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_07_01. SQL> select employee_id. SQL> SQL> 2 3 4 @lab_07_01_08_01 update hrtest.---------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.sql script. salary 2 from hrtest.sql script to query the HRTEST.25 where department_id = 60 / 5 rows updated.---------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 . last_name. Make note of the highest salary that is displayed: ________ Answer: 1.sql script to update the salaries for the employees in department 60 and note the highest salary displayed. salary from employees where department_id = 60 / LAST_NAME SALARY ------------------------. Highest salary: _____________ Answer: 1. Execute the lab_07_01_08_01.employees set salary = salary * 1. SQL> SQL> 2 3 4 @lab_07_01_07_01 select employee_id. last_name.employees 3 where department_id = 60 4 / EMPLOYEE_ID ----------103 104 105 106 107 r O cl a In e LAST_NAME SALARY ------------------------.EMPLOYEES table and view information about employees in department 60.Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery (continued) 7) Execute the lab_07_01_07_01.sql script.

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

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

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

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

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

10. Review the information and click Submit.

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-83

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

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

13. Click OK.

r O

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

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-84

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

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

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

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

r O

cl a

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

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-85

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

14) Assume you need to perform TSPITR on the HRTEST tablespace again. Execute the lab_07_01_14_02.sql query to determine whether there are any dependencies outside the recovery set. Answer: 1. Invoke SQL*Plus and connect as SYSDBA. 2. Execute the lab_07_01_14_02.sql script.
SQL> @lab_07_01_14_02 SQL> set echo on SQL> SELECT obj1_owner, obj1_name, obj1_type, ts1_name, 2 obj2_owner, obj2_name, obj2_type, ts2_name, 3 constraint_name, reason 4 FROM SYS.TS_PITR_CHECK 5 WHERE (TS1_NAME IN ('HRTEST') 6 AND TS2_NAME NOT IN ('HRTEST')) 7 OR (TS1_NAME NOT IN ('HRTEST') 8 AND TS2_NAME IN ('HRTEST')) 9 / OBJ1_OWNER OBJ1_NAME OBJ1_TYPE TS1_NAME --------------------------------------------------------OBJ2_OWNER OBJ2_NAME OBJ2_TYPE TS2_NAME ------------------------------ -------------------------CONSTRAINT_NAME REASON -----------------------------HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_LOC_ID_FK constraint between tables not contained in recovery set

r O

cl a

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

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-86

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

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

r O

cl a

In e

rn te

l& a

O

I A

s U

O e

ly n

Oracle Database 10g: Backup and Recovery B-87

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

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

1. database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN> 2. r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-90 . 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. You can use RMAN commandline or Enterprise Manager for this step.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. Answer: Use RMAN command-line OR Enterprise Manager Database Control. Select Add Recovery Catalog on the Recovery Catalog Settings page. RMAN> resync catalog. Using RMAN: RMAN> register database. so the resync command fails. Using Enterprise Manager: Select Recovery Catalog Settings on the Maintenance Page.

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

Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database (continued) The Processing: Register Database page is displayed. r 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 . the Recovery Catalog Settings page is displayed indicating that the database was successfully registered with the recovery catalog. After the processing completes.

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

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

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 .

RMAN> delete obsolete. Answer: 1. using target database control file instead of recovery catalog RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=133 devtype=DISK allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=158 devtype=SBT_TAPE channel ORA_SBT_TAPE_1: Oracle Secure Backup Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle -------------------. Execute the DELETE OBSOLETE command.------------------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 . Invoke RMAN and connect to your target database.Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups 1) Invoke RMAN and delete all obsolete backups. 2.-----.-----------------.

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

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

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

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

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

8. Click Submit Job. Click View Job. 9. Click the links in the Logs section to view additional information. Information about the job is displayed. r 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 .Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs (continued) 7.

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

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

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

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

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

d/qrserviced creating /etc/rc.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. [root@edrsr4p1 backup]# exit exit [oracle@edrsr4p1 oracle}$ r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-109 .d/init.(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.

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

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

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

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

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

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

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

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 .

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

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

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

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

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

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

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

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

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

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 .

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

and then click Next. enter 1 for Tape Drives and click Next. On the “Schedule Oracle-Suggested Backup: Schedule” page. Oracle Database 10g: Backup and Recovery B-130 . select “Archivelogs and the Incremental Backup”. On the “Schedule Oracle-Suggested Backup: Setup” page.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) 5. r O cl a In e rn te l& a O I A s U O e ly n 6. 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 Oracle Database 10g: Backup and Recovery B-131 . On the “Schedule Oracle-Suggested Backup: Review” page. 7.Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) This specification first initiates a disk backup to the Flash Recovery Area. and then the backup will be written to tape. review both the Settings and RMAN Scripts and click Submit Job.

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

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

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

Answer: 1. but it should show both DISK and SBT_TAPE under “Output Devices. 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 .Solutions for Practice 12-2: Perform Oracle-Suggested Backup (continued) Your screenshot will look different.” 3) Optionally. r O 3.html file and view the presentation. Click the oracle’s Home icon on your desktop.html viewlet in the /home/oracle/solutions/viewlets directory. you can view the Oracle_Suggested_Strategy_viewlet_swf. Double-click the Oracle_Suggested_Strategy_viewlet_swf. 2. to reinforce this practice topic. Navigate to the /home/oracle/solutions/viewlets directory.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solutions for Practice 15-1: Create an Encrypted Backup (continued) 2. Notice the successful execution of the RMAN SET ENCRYPTION command. r 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 . Click the Backup link in the Name column of the table under the Logs section. 3.

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

When you have finished viewing the presentation.Solutions for Practice 15-1: Create an Encrypted Backup (continued) 3.html file and view the presentation. 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-157 . Double-click the Backup_Encryption_viewlet_swf.

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

r 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 . Click Add.Solutions for Practice 15-2: Recover a Tablespace from an Encrypted Backup (continued) 4. 5. Retain the default values for point-in-time recovery and click Next.

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

r 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 . 2) The recovery operation fails. Review your recovery request and click Submit. Scroll down the output window on the Perform Recovery: Result window. Why? Answer: 1. Notice the “ORA-19913: unable to decrypt backup” error. 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.

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

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

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

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

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. 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 . When you finished reviewing the results. r O 3. click OK.

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

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

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

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

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

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

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

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. Answer: ob> lsvol --drive vt r O cl a ob> lsvol --drive vt Inventory of library vlib: * in 1: volume RMAN-DEFAULT-000002. lastse 2 In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery B-175 .ds) submitted.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. Answer: ob> lsjob --long admin/3 admin/3: Type: dataset catback. (--dataset). (State should show “completed successfully”). 3462496 kb remaining. barcode 6a409e76c944102b98500065b9621d0 in dte: volume VOL000001. The backup is executed as the privileged root user (-g) and is given the highest priority (-p 1). job id is admin/3.ds. ob> backup –l full –p 1 –r vt –g --dataset catback. 3463296 kb remaining. All the files described are backed up regardless of when the last backup was taken or what files have changed.21:51 Priority: 1 Privileged op: yes Run on host: (administrative server) Attempts: 1 ob> 5) Identify the volume that contains the backup. barcode 6a2ac70ec944102b98500065b9621d0 * in 4: unlabeled.ds ob> backup --go Info: backup request 1 (dataset catback. barcode 6a156878c944102b98500065b9621 d0. The backup is restricted to only the vt tape drive. content manages reuse * in 3: unlabeled. so the volume that contains the backup can be easily located. barcode 69ed75c0c944102b985 00065b9621d0.

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

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

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

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

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

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

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

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

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

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

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

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

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

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 . In addition to containing the Oracle Secure Backup directory.14 .Installed Files for Host Role: Administrative Server <OSB_Home> directory admin • • • • config history log state • • • • • apache conf htdocs images logs modules bin device help samples Configuration file Copyright © 2006. The illustration in the slide shows the installed directories that are common to an administrative server on any operating system. and it is called obconfig in the /etc directory on UNIX and Linux systems. Oracle. The configuration file is called obconfig. However. 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. These directories contain the following types of files: • admin: Administrative and configuration data for the administrative domain.txt in the db subdirectory where you install Oracle Secure Backup on Windows. although the contents of the directory vary depending on the roles you assigned to the host. All rights reserved. Installed Files for Host Role: Administrative Server The Oracle Secure Backup home directory is created on every host where you install Oracle Secure Backup.

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

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

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

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

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

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

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

Oracle.1.22 . To start the obtool utility. All rights reserved.0 login: admin Password: oracle << Password not echoed >> ob> lsuser admin admin oracle oracle ob> lsmf --long RMAN-DEFAULT: Keep volume set: content manages reuse Appendable: yes Volume ID used: unique to this media family Comment: Default RMAN backup media family ob> quit r O cl a In e rn te l& a O I A s U O e ly n Oracle Database 10g: Backup and Recovery C . Verifying Your Installation In the slide are some examples of how you can verify your installation.Verifying Your Installation Some examples: • View Oracle Secure Backup processes in Linux: ps -e | grep ob • Use obtool commands to view Oracle Secure Backup users and default media family: ob> lsuser ob> lsmf --long Copyright © 2006. execute the following: $ obtool Oracle Secure Backup 10.

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

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 . 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 .Uninstalling Oracle Secure Backup (continued) If you encounter errors when uninstalling the Oracle Secure Backup software. then run the uninstallob script again until you see the following message: Oracle Secure Backup has been successfully removed from <host>.

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

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 .

A host where you install Oracle Secure Backup. 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. A device must have at least one attachment. you should use the negotiated default setting. Your choices are: • Default • None • Negotiated • Text • Md5 O I A s U O e ly n Oracle Database 10g: Backup and Recovery D-2 . The administrative server runs the scheduling daemon. application programming interface An attachment describes a data path between a host and a storage device. one for each host that can directly access it. One administrative server can service all clients on your network. which starts and monitors backups within the administrative domain. Advanced Intelligent Tape. an attachment comprises the identity of a host plus a UNIX device special file name. and often has multiple attachments. There must be one and only one administrative server for each administrative domain at your site. Defines the way in which Oracle Secure Backup authenticates itself to the NDMP server. or an NAS device name. Typically. a Windows device name.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. Most often. This host stores configuration information and the catalog files for client hosts.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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