Oracle9i Database Administrator's Guide
Release 1 (9.0.1) for Windows

Part Number A90164-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

6
Backing Up and Recovering Database Files

This chapter provides information on backing up and recovering your database.

This chapter contains these topics:

Selecting a Backup and Recovery Tool

Backing up and recovering your Oracle9i database is one of the most critical operations that a database administrator (DBA) performs. For this reason, it is extremely important to choose the correct tools. Table 6-1 describes available backup and recovery tools and makes recommendations on which tool to use with your Oracle9i database:

Table 6-1 Backup and Recovery Tools
Tool  Description  Analysis of Tool  To Use this Tool, See... 

Oracle Enterprise Manager Backup Management tools 

The Oracle Enterprise Manager DBA Management Pack includes the Backup and Recovery Wizards for backing up and recovering an Oracle9i database. These wizards also provide a graphical user interface (GUI) to Recovery Manager.

The Backup Wizard enables users to:

  • Perform database backups to disk and tape.

  • Create backup scripts.

  • Specify frequency, time, backup configuration, and multiple destinations.

  • Back up an entire database or tablespaces, data files, and archived redo logs.

  • Perform both online backups and the database is shut down.

 

Highly recommended for backing up and recovering your Oracle9i database because of capabilities and ease of use. Works in conjunction with Recovery Manager (RMAN). Backing up to tape requires an optional media management layer (MML) from a third-party vendor, such as Legato Storage Manager (LSM). LSM is included on your CD-ROM. 

Oracle Enterprise Manager Administrator's Guide  

Recovery Manager (RMAN) in command line modeFoot 1 

Recovery Manager in command line mode is an Oracle9i tool that manages the process of backing up, restoring, and recovering files. Recovery Manager is automatically installed with Oracle Utilities. Recovery Manager uses a special PL/SQL interface to the server for invoking backup functions. The user is unaware of this interface and instead interfaces only with a command line. Foot 2 

Command line usage only. Must clearly understand the command line syntax described in Oracle9i Recovery Manager Reference before using. Backing up to tape requires an optional MML from a third-party vendor. 

"Database Tools Overview" chapter of the Oracle9i Database Getting Started for Windows for instructions on accessing this tool and Oracle9i Recovery Manager User's Guide for instructions on using this tool. 

Third-party vendor products 

Third-party vendors such as Legato provide tape backup software that works with Backup Wizard and Recovery Manager. 

If using Legato MML, you can back up to tape only if you are using RMAN and only if the tape device and the target database are on the same physical device. Contact your third-party vendors for additional information. 

Legato Storage Manager Administrator's Guide and other third-party vendor documentation. 

OCOPY utility 

The OCOPY utility is one of several you may use when performing a user-managed backup and recovery. You can also make the following types of backups:

  • Backups when the database is shut down

  • Backups of a tablespace that is offline when the database is open

  • Backups of a tablespace that is online when the database is open

 

Command line usage only. Can back up only to disk. Can only perform local backups. 

"Backing Up Files with the OCOPY Utility" and "Recovering Files with the OCOPY Utility" in this chapter and the Oracle9i User-Managed Backup and Recovery Guide 

1 On Windows NT, starting with release 8.1.6, additional transformations are added to file names entered by the user. If you use Recovery Manager, existing file names stored in the recovery catalog must be normalized. To normalize file names, see Oracle9i Database Migration guide.

2 When RMAN needs to resynchronize from a read-consistent version of the control file, it creates a temporary snapshot control file. The default location of this file on Windows NT is ORACLE_BASE\ORACLE_HOME\database\sncfSID.ora.


Note:

Before performing a backup when the database is shut down, and regardless of the backup tool you use (for example, Oracle Enterprise Manager Backup Wizard or a third party tool), stop the OracleServicesid service in order to clear locks on the database files. If you do not stop this service, some database files may not be backed up. 


Integrating RMAN with a Media Manager on Windows NT

On Windows NT, Oracle accesses the media management library through the library orasbt.dll. This file must exist in the system path. Typically, the file is located in the ORACLE_HOME\bin folder of the Oracle home.


Note:

You do not need to start or shut down the instance when installing the media management library. 


If an orasbt.dll already exists in the system path, then remove it before installing the media manager. After installation, check your media management vendor documentation to determine where the media management library is installed.


Note:

The orasbt.dll file does not have to be in the ORACLE_BASE\ORACLE_HOME\bin folder as long as the folder containing the library is in the system PATH variable setting. To see the PATH variable setting, choose Start > Settings > Control Panel > System > Environment. 


Backing Up Files with the OCOPY Utility

Use the OCOPY utility for both hot and raw database file backups of the file types described in Table 6-2:

Table 6-2 File Types for Database File Backups
File  Description 

File Allocation Table (FAT) or NT File System (NTFS) files 

FAT or NTFS files you want to back up. 

Logical raw files:

 

A logical drive (accessed with the direct I/O) identified by the name: 

 

\\.\x: 

Note: For more information on logical drives, see Appendix A, "Storing Tablespaces on Raw Partitions" 

where x: is the logical drive designator. 

Physical raw files 

A physical hard drive (accessed with direct I/O) identified by a device name of the form: 

 

\\.\physicaldriven 

 

where n is 0, 1, 2, and so on, representing each of the physical drives in the system. 

Table 6-3 describes the two copy modes in which to use the OCOPY utility:

Table 6-3 The OCOPY Utility Copy Modes
Copy Mode  The OCOPY utility is used to... 

Hard disk 

Copy hot files to a new name and location on a hard disk where you can use an archive utility to back them up. 

Multiple diskettes 

Back up large hot files directly to multiple diskettes. 

Table 6-4 describes the syntax to use when backing up all file types to hard disk or multiple diskettes:

Table 6-4 Backing Up File Syntax
Copy Mode  File Type  Syntax 

Hard disk 

FAT or NTFS files 

C:\> ocopy old_file new_file 

 

Logical raw 

C:\> ocopy \\.\C: new_file 

 

Physical raw 

C:\> ocopy \\.\physicaldriven new_file 

Multiple diskettes 

FAT or NTFS files 

C:\> ocopy /B hot_file a: 

 

Logical raw 

C:\> ocopy /B \\.\C: a: 

 

Physical raw 

C:\> ocopy /B \\.\physicaldriven a: 

Where... 

Indicates the... 

old_file 

Name and location of the hot file you want to back up. 

new_file 

Name and location of the backup copy. 

C: 

Raw drive that holds a single RAW database file. 

physical drive 

Physical drive that holds a single RAW database file. 

n  

Number(s) representing each of the physical drives in the system. 

hot_file 

Path and filename of the hot file you want to back up.  

a: 

Diskette drive containing the diskette on which to save the backup copy. If the file is too large to fit on one diskette, the OCOPY utility prompts you to insert new diskettes as needed. The OCOPY utility catalogs the parts of the file automatically so that it can be reconstructed at a later time.  

/B 

Large files must be split over multiple diskettes. 


Note: Always use a fresh diskette for each OCOPY utility procedure; do not use the OCOPY utility to back up a file onto a diskette that contains part or all of another file backed up using the OCOPY utility.  


Recovering Files with the OCOPY Utility

Table 6-5 describes the syntax to use when recovering all file types from hard disk or multiple diskettes.

Table 6-5 Recovering File Syntax
Restore From...  File Type to Restore  Syntax 

Hard DiskFoot 1 

FAT or NTFS files  

Use the Windows NT copy command. 

 

Logical raw 

C:\> ocopy new_file \\.\c:  

 

Physical raw 

C:\> ocopy new_file \\.\physicaldriven 

Multiple diskettesFoot 2 

FAT or NTFS files  

C:\> ocopy /R a: restore_dir

Note: First insert the diskette containing the initial part of the backed up file. 

 

Logical raw 

C:\> ocopy /R a: \\.\c:  

 

Physical raw 

C:\> ocopy /R a: \\.\physicaldriven 

1 These are files originally backed up without the /B option.

2 These are files originally backed up with the /B option.

Where...  Indicates the... 

C:  

Raw drive, which holds a single RAW database file. If you use a different drive as your raw drive, substitute it for C:. The OCOPY utility prompts you to insert diskettes as needed. 

new_file 

File name to which to restore the file. 

physical drive 

Physical drive that holds a single RAW database file. 

n 

Number(s) representing each of the physical drives in the system. 

/R 

Restore option. 

a: 

Drive containing the diskette with the backed up file. 

restore_dir 

Directory on the server in which to place the file. (The restored file has the same name as the original file.) 

Using Legato Storage Manager

When running backups to tape drivers using Legato Storage Manager (LSM), you must add LSM's bin directory to the PATH. The default location of the directory is C:\win32app\nsr\bin.

To add this directory to the PATH:

  1. Select System from the Control Panel.

    The System Properties dialog box appears.

  2. Select the Environment tab.

    The Environment view appears.

  3. Select Path from the System Variables box.

  4. Add the value, and choose Set.

  5. Choose OK to close the System Properties dialog box.

Settings for Multiple Tape Devices

If you use LSM, and have more than one tape device on your system (LSM supports a maximum of four), ensure that the following settings are made in the LSM Administrator GUI:

  1. Select Start > Programs > NetWorker group > NetWorker Administrator to start the LSM Administrator GUI.

  2. Choose the set up server button, and set the parallelism field to the number of tape devices you have. Then, choose the devices button. For each tape device listed, select it with the right mouse button, select edit, and set the target sessions field to 1.

Japanese Version of Legato Storage Manager


Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback