Oracle® Database Installation and Administration Guide 10g Release 2 (10.2) for Fujitsu Siemens BS2000/OSD Part Number E10319-01 |
|
|
PDF · Mobi · ePub |
This chapter supplements the generic Oracle Database documentation set with information about backup and recovery.
Refer to the following Oracle manuals for detailed information about database backup and recovery:
You can choose among many methods and Oracle tools for backup and recovery. You may use the Import and Export Utilities for logical backup and recovery. For physical backup and recovery you may use Recovery Manager (RMAN) or operating system utilities.
This chapter describes some BS2000 specific issues if you apply user-managed backup and recovery with SQL*Plus and BS2000 utilities.
In the last section of this chapter, you will find some information about RMAN on BS2000.
You can use one of the following methods to back up an Oracle database:
You can back up an Oracle database using BS2000 operating system utilities (for example, ARCHIVE
or the /COPY-FILE
command).
Use the following steps to back up an Oracle database:
While the database is running, collect the names of all files, which make up the Oracle database. You can determine the names of the log and database files by entering the following commands:
/START-PROGRAM $ORAC1020.SQLPLUS * /NOLOG SQL> CONNECT / AS SYSDBA SQL> SELECT * FROM V$DATAFILE; SQL> SELECT * FROM V$LOGFILE;
To ensure that all Oracle database files are synchronized at the time of the backup, shut down the Oracle database using SQL*Plus.
Back up all database files and log files using the BS2000 ARCHIVE
utility or the BS2000 /COPY-FILE
command. Note that you should always back up all files at the same time.
Restart the Oracle Database using SQL*Plus.
You can perform an online backup of the database or individual tablespaces by using either:
the BS2000 ARCHIVE
utility together with the Oracle Database INSTALL.C.OPNBACK
utility
the BS2000 PERCON
utility
The ARCHIVE
method is faster, and is described in this section.
Before you can perform an online (hot) backup of individual tablespaces, you must ensure that the ARCHIVE
utility can back up open files.
The following BS2000 command ensures that ARCHIVE
can back up all open files:
/START-PROGRAM $ORAC1020.INSTALL.C.OPNBACK
*<filename>
The INSTALL.C.OPNBACK
utility calls the BS2000 macro CATAL
, which sets the OPNBACK
file attribute to YES
. For the CATAL
macro to work the database must be shut down or the tablespace in question must be offline. You enter this command once for each file. For example, before adding it to a tablespace, not on the occasion of each backup.
You must never back up database files online without first setting the tablespace to backup mode. If you do not follow this step, then the resulting backup files will be inconsistent. To perform an online backup of individual tablespaces or data files, use the following procedure:
Enter the following command:
SQL> ALTER TABLESPACE name BEGIN BACKUP;
Backup the file(s) of the tablespace using the BS2000 utility ARCHIVE
(Make sure that the OLS parameter of ARCHIVE
is set to YES).
Enter the following command:
SQL> ALTER TABLESPACE name END BACKUP;
Note:
The preceding SQL*Plus commands operate on tablespaces, while theARCHIVE
utility operates on data files.You can use one of the following methods to recover the database:
An Oracle Database can be restored offline from backups, using the following steps:
Copy all the database files and the log files from the backup. You may use the BS2000 ARCHIVE
utility or the BS2000 /COPY-FILE
command. Files must be restored with their original name.
While the Oracle database is running, the names of all files which it comprises can be determined by querying the table V$DATAFILE
. Enter the following command when the SQL prompt is displayed:
SELECT * FROM V$DATAFILE;
The following is displayed:
File #FILENAME
------ -------------------------
1 ?.DBS.DATABASE1.DBF
2 ?.DBS.DATABASE2.DBF
2 ROWS SELECTED.
You can determine the name of the log files in a similar way:
SQL> SELECT * FROM V$LOGFILE;
The following result is displayed:
File # FILENAME
------ -------------------------
1 ?.DBS.LOG1.DBF
2 ?.DBS.LOG2.DBF
2 ROWS SELECTED.
Under the DBA user ID, ensure that the ORASID
environment variable identifies the Oracle database, which is to be restored.
Use the SQL*Plus STARTUP
command to start up the Oracle database.
On BS2000/OSD, RMAN does not support tapes. Disks are the only backup media.
As a workaround, you could use the Recovery Manager output as a first level storage to be 'migrated' by BS2000 subsystem HSMS (Hierarchical Storage Management System) to tapes. However, it is the administrator's responsibility to care for cooperation of the two systems.
Recovery Manager must use an Oracle Net Services connection. For this purpose you can:
use a Bequeath Server (refer to Chapter 9, " Oracle Net Services")
follow the same procedure as 'Starting a Database Instance from a Remote System', that is, you must create a password file, start a listener, and connect through Oracle Net Services
The following is an example of a Recovery Manager command:
/START-PROG $ORAC1020.RMAN *target "dba1/dba1@i1" catalog "dba2/dba2@i2" cmdfile "b.dat" log "b.log"