|
Oracle9i Database Platform Guide
Release 2 (9.2) for Windows Part No. B10163-01 |
|
This chapter provides information on backing up and recovering your database.
This chapter contains these topics:
This section describes tools available for backup and recovery of your Oracle9i database and makes recommendations on which tool to use.
This section contains these topics:
|
Note: Before performing a backup when Oracle9i database is shut down, and regardless of the backup tool you use, stop service OracleServiceSID to clear locks on database files. If you do not stop this service, some database files may not be backed up. |
Oracle Enterprise Manager DBA Management Pack includes Backup and Recovery Wizards for backing up and recovering an Oracle9i database. These wizards also provide a graphical user interface (GUI) to Recovery Manager.
|
Note: Oracle Enterprise Manager can manage a 64-bit database from a remote 32-bit computer. For more information, see Appendix G, " Oracle9i Database for 64-Bit Windows". |
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 tablespace, data files, and archived redo logs
Perform backups both online and when the database is shut down
Oracle highly recommends Oracle Enterprise Manager for backing up and recovering your Oracle9i database because of its capabilities and ease of use.
|
Note: Backing up to tape requires an optional media management layer (MML) from a third-party vendor. |
|
See Also: Oracle Enterprise Manager Administrator's Guide for more information on Oracle Enterprise Manager |
Recovery Manager (RMAN) is an Oracle9i command-line tool that manages 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. This interface operates invisibly; you will interface only with a command line.
|
Note: Starting with Oracle8i release 8.1.6 for Windows, 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. |
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 is ORACLE_BASE\ORACLE_HOME\database\sncfSID.ora.
You must clearly understand the command-line syntax described in Oracle9i Recovery Manager Reference before using this tool. Backing up to tape requires an optional MML from a third-party vendor.
|
See Also: Chapter 4, " Database Tools on Windows" for instructions on accessing this tool and Oracle9i Recovery Manager User's Guide for instructions on using this tool |
Starting with Oracle9i release 2, Oracle bundles a new version of the Legato backup and recovery software for Oracle databases. This is a single version of Legato NetWorker and NetWorker Module for Oracle client, which has been designed to operate on the same server as your Oracle database. After installing this version of Legato NetWorker, you will receive a license notice each time you back up your database to tape using Recovery Manager. To eliminate this license notice, you can enter an authorization code, which can be obtained directly from Legato without charge. Instructions for obtaining this code are in the displayed license notice.
Oracle no longer distributes Legato documentation. You can obtain Legato NetWorker documentation and product updates directly from Legato at http://www.legato.com/lssv/.
If you have previously installed and used Legato Storage Manager (LSM) on your Oracle database server, you can uninstall it and install this new version of Legato NetWorker. Any backups made by LSM are still usable by the new Legato NetWorker software.
|
Note: Legato Networker is not supported in Oracle9i release 2 (9.2.0.2) for 64-bit Windows. See "Backing Up and Recovering 64-Bit Database Files". |
OCOPY is a command-line tool that can back up only to disk and can perform only local backups. It can back up an entire Oracle9i database when it is shut down, or it can back up a tablespace (online or offline) when the database is open.
Oracle accesses the media management library through library orasbt.dll. This file must exist in the system PATH. Typically, the file is located in Oracle home folder ORACLE_HOME\bin.
|
Note: You are not required 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: Fileorasbt.dll is not required to be in folder ORACLE_BASE\ORACLE_HOME\bin as long as the folder containing the library is in the system PATH variable setting. For information on viewing and changing the PATH variable setting, see "Changing the Value of PATH".
|
Use OCOPY for database file backups of the following file types:
File Allocation Table (FAT) files
NT File System (NTFS) files
Logical raw files
Physical raw files
Logical raw files are stored on a logical drive (accessed with direct I/O) identified by \\.\x where x is logical drive designator. Physical raw files are stored on a physical hard drive (accessed with direct I/O) identified by \\.\physicaldriven where n is 0, 1, 2, and so on, representing each of the physical drives in the system. For more information on raw partitions, see Appendix B, " Storing Tablespaces on Raw Partitions".
In hard disk copy mode, OCOPY copies hot files to a new name and location on a hard disk, where you can use an archive utility to back them up.
In multiple diskettes copy mode, OCOPY copies hot files to one or more diskettes (up to ten maximum). If the file to be copied is too large to fit on one diskette, OCOPY prompts you to insert new diskettes as needed. OCOPY catalogs parts of the file automatically so that it can be reconstructed at a later time.
You can specify how OCOPY slices the file to be backed up with the size_1 and size_n options. Option size_1 specifies the size (in kilobytes) of the first piece. Option size_n specifies the sizes of all remaining pieces. If the sizes specified result in more than ten pieces, OCOPY returns an error.
For example, if you back up a 10mb hot file specifying size_1=2048 and size_n=4096, the file is split into three pieces of size 2mb, 4mb, and 4mb respectively.
|
Note: Always use fresh diskettes for OCOPY procedures. Do not back up a file onto a diskette that contains part or all of another file backed up using OCOPY. |
Table 10-1 describes syntax to use when backing up all file types to hard disk. Table 10-2 does the same for backups to multiple diskettes. Table 10-3 defines syntax terms.
Table 10-1 OCOPY Backup Syntax in Hard Disk Mode
| File Type | Syntax |
|---|---|
| FAT or NTFS files | C:\> ocopy old_file new_file
|
| Logical raw | C:\> ocopy \\.\x: new_file
|
| Physical raw | C:\> ocopy \\.\physicaldriven new_file
|
Table 10-2 OCOPY Backup Syntax in Multiple Diskettes Mode
| File Type | Syntax |
|---|---|
| FAT or NTFS files | C:\> ocopy /B old_file a: [size_1 [size_n]]
|
| Logical raw | C:\> ocopy /B \\.\x: a: [size_1 [size_n]]
|
| Physical raw | C:\> ocopy /B \\.\physicaldriven a: [size_1 [size_n]]
|
Table 10-3 OCOPY Backup Syntax Definitions
| Term | Definition |
|---|---|
old_file
|
Name and location of hot file to back up |
new_file
|
Name and location of backup copy |
x
|
Raw drive that holds a single raw database file |
physicaldriven
|
Physical drive that holds a single raw database file |
/B
|
Large files must be split over multiple diskettes |
a:
|
Drive containing diskette(s) on which to save backup copy. |
size_1
|
Size (in kilobytes) of first piece |
size_n
|
Size (in kilobytes) of remaining pieces |
Table 10-4 describes syntax to use when recovering all file types from hard disk. These are files originally backed up without option /B. Table 10-5 describes syntax to use when recovering all file types from multiple diskettes. These are files originally backed up with option /B. Table 10-6 defines syntax terms.
|
Note: When recovering from multiple diskettes, insert the diskette containing the first part of the backed up file before starting OCOPY. |
Table 10-4 OCOPY Recover Syntax in Hard Disk Mode
| File Type | Syntax |
|---|---|
| FAT or NTFS files | Use Windows copy command |
| Logical raw | C:\> ocopy new_file \\.\x:
|
| Physical raw | C:\> ocopy new_file \\.\physicaldriven
|
Table 10-5 OCOPY Recover Syntax in Multiple Diskettes Mode
| File Type | Syntax |
|---|---|
| FAT or NTFS files | C:\> ocopy /R a: restore_dir
|
| Logical raw | C:\> ocopy /R a: \\.\x:
|
| Physical raw | C:\> ocopy /R a: \\.\physicaldriven
|
Table 10-6 OCOPY Recover Syntax Definitions
| Term | Definition |
|---|---|
new_file
|
Name and location of backup copy |
x
|
Raw drive that holds a single raw database file |
physicaldriven
|
Physical drive that holds a single raw database file |
/R
|
Restore option |
a:
|
Drive containing diskette with backed up file |
restore_dir
|
Server directory in which to place file (Restored file has same name as original file.) |
|
![]() Copyright © 2003 Oracle Corporation All rights reserved |
|