8 Backup/Restore Oracle 8i/9i
This chapter will describe in details how backup 4 business OBM backup your Oracle 8i/9i and how you can restore an Oracle 8i/9i database using the backup files.
8.1 Requirements
- backup 4 business OBM must be installed onto the computer that can connect to your Oracle 8i/9i server using TCP/IP protocol.
- Data from Oracle 8i/9i database will be backed up to a temporary directory before they are sent to backup 4 business Offsite Backup Server. Please make sure you have sufficient space on your computer to store these data when you run the backup job.
- Database must be in archived log mode
To switch to archived log mode and enable automatic log archiving, please do the following:
- Set the parameters below in the PFILE to enable automatic archiving log_archive_dest = [directory where archived logs will be stored] log_archive_format = ARCH%S.LOG log_archive_start = TRUE
- Switch to archived log mode SVRMGRL> connect internal; SVRMGRL> startup mount; SVRMGRL> alter database archivelog; SVRMGRL> alter database open;
- Oracle JVM is enabled
To enable Oracle JVM for Oracle 8i/9i, please do the following:
1. Please make sure shared pool size is larger than 50MB and java pool size is larger than 20MB in the PFILE. For example: java_pool_size = 20971520 shared_pool_size = 52428800
2. Run the scripts below
Oracle 8i Oracle 9i SVRMGRL> connect internal SVRMGRL> @?/javavm/install/initjvm.sql; SVRMGRL> @?/rdbms/admin/catalog.sql; SVRMGRL> @?/rdbms/admin/catproc.sql; SVRMGRL> @?/javavm/install/initdbj.sql;
SQL> connect sys/change_on_install as sysdba SQL> @?/javavm/install/initjvm.sql; SQL> @?/xdk/admin/initxml.sql; SQL> @?/xdk/admin/xmlja.sql; SQL> @?/rdbms/admin/catjava.sql;
- JAVASYSPRIV role is granted to system account
You can grant this role to system account by executing:
SQL> grant JAVASYSPRIV to system;
8.2 Overview
backup 4 business OBM will backup your Oracle database by taking the following steps.
- Connect to the Oracle database using SQL*NET over TCP/IP
- Run all Pre-Commands of this backup set
- If the backup type to run is [Database Backup type],
- all data files in each of the tablespace(s) selected are copied to the temporary directory specified by this backup set
- if there are temporary files in the database, the script to re-create the temporary files are generated to a file located in the temporary directory specified by this backup set
- all non-default initialization parameters will be spooled to an initializing file located in the temporary directory specified by this backup set
- all control files will be copied to the temporary directory specified by this backup set
- all archived log files will be copied to the temporary directory specified by this backup set
- If the backup type to run is [Archived Log Backup type],
- all archived log files will be copied to the temporary directory specified by this backup set
- Run all Post-Commands of this backup set
- Upload all files copied to the temporary directory to the backup 4 business Offsite Backup Server
Note:
If your Oracle database is running on Windows, please install backup 4 business OBM onto the company running the Oracle database if backup 4 business OBM is to backup this Oracle database. This would shorten the time required to backup the Oracle database
8.3 How to backup an Oracle Database
Please follow the instructions below to backup your Oracle database to the backup 4 business Offsite Backup Server.
- Install backup 4 business OBM onto your computer
- Open backup 4 business OBM
Right click backup 4 business OBM icon available in the system tray and choose [Open]

- Create a backup set
- From the Menu, Choose [Backup Set] -> [New] -> [Oracle Database Backup Set]

- Enter a name for your backup set

- Enter the system password, the Oracle Database Server Host Name, TNS Port and SID
- Select the tablespace(s) you want to backup

- Enter a temporary location to store the database file(s) before they are sent to an backup 4 business Offsite Backup Server
- Set the backup schedule for database backup and archived log backup


Note: You can have more than one schedule in a backup set, i.e. you can perform intra-day transaction log backup by adding more than one daily transaction log backup schedule to your backup set. - Set the encryption algorithm, encryption mode and encrypting key for this backup set

Hint: For maximum security, please select AES (Advanced Encryption Standard) Algorithm, CBC (Cipher Block Chaining) mode and use an encrypting key with more than 8 characters.
- From the Menu, Choose [Backup Set] -> [New] -> [Oracle Database Backup Set]
- Run Backup
- Select the backup set you want to run on the left panel and press the [Start Backup] button (►)
- Select the backup type (e.g. Database Backup, Archived Log Backup) you would like to perform

- Select [Off-site Backup Server] to start backing up your files to an backup 4 business Offsite Backup Server.

8.4 How to restore an Oracle Database
Please follow the instructions below to restore your Oracle 8i/9i databases from an backup 4 business Offsite Backup Server.
- iDownload the backup files from the backup 4 business Offsite Backup Server
Please refer to the [Quick Start - Backup File] section for information on how to download backup files from backup 4 business Offsite Backup Server. - Put all data files back to their original locations
- Control files, data files and archived logs are stored on backup 4 business Offsite Backup Server along with their full path information. You just need to put all these files back to their original locations when performing a database restore.
- Put the PFILE back to its default location
Oracle 8i: $ORACLE_HOME/dbs/init<SID>.ora
Oracle 9i: $ORACLE_HOME/admin/<SID>/pfile/init.ora - Restore Database
(if Oracle 8i) Use Server Manager to restore you database by doing the following:- Run Oracle Server Manager (svrmgrl)
- Connect to the target database
- Startup mount
- Reapply all transactions from the archived log files
- Open database
Oracle 8i Example: $ svrmgrl
SVRMGRL> connect internal SVRMGR> startup mount;
ORACLE instance started.
Total System Global Area 95874448 bytes
Fixed Size 64912 bytes
Variable Size 52744192 bytes
Database Buffers 40960000 bytes
Redo Buffers 2105344 bytes
Database mounted. SVRMGRL> recover database using backup controlfile
ORA-00279: change 419671 generated at 06/14/03 02:51:49 needed for thread 1
ORA-00289: suggestion : /data/ora815/vin/archive/ARCH0000000225.LOG
ORA-00280: change 419671 for thread 1 is in sequence #225
ORA-00278: log file '/data/ora815/vin/archive/ARCH0000000224.LOG' no longer needed for this recovery
Specify log: {<RET>=suggested | filename |AUTO | CANCEL}
AUTO
Log applied
. . . . . . . . . . . .
ORA-00279: change 547222 generated at 06/18/03 19:58:26 needed for thread 1
ORA-00289: suggestion : /data/ora815/vin/archive/ARCH0000000384.LOG
ORA-00280: change 547222 for thread 1 is in sequence #384
ORA-00278: log file '/data/ora815/vin/archive/ARCH0000000383.LOG' no longer needed for this recovery
ORA-00308: cannot open archived log '/data/ora815/vin/archive/ARCH0000000384.LOG'
ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory
Additional information: 3 SVRMGR> recover database using backup controlfile until cancel
ORA-00279: change 547222 generated at 06/18/03 19:58:26 needed for thread 1
ORA-00289: suggestion : /data/ora815/vin/archive/ARCH0000000384.LOG
ORA-00280: change 547222 for thread 1 is in sequence #384
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SVRMGR> alter database open resetlogs;
Statement processed.
- Run Oracle Server Manager (rman)
- Connect to the target database
- Startup mount
- Reapply all transactions from the archived log files to the last sequence
- Open database
Oracle 9i Example: C:\>rman nocatalog
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN> connect target connected to target database (not started) RMAN> startup mount
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 269556596 bytes
Fixed Size 453492 bytes
Variable Size 243269632 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
RMAN> recover database until sequence=63 thread=1;
Starting recover at 24-JUN-03
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=11 devtype=DISK
starting media recovery
archive log thread 1 sequence 56 is already on disk as file
C:\ORACLE\ORADATA\VIN\ARCHIVE\1_56.DBF
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_56.DBF thread=1 sequence=56
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_57.DBF thread=1 sequence=57
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_58.DBF thread=1 sequence=58
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_59.DBF thread=1 sequence=59
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_60.DBF thread=1 sequence=60
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_61.DBF thread=1 sequence=61
archive log filename=C:\ORACLE\ORADATA\VIN\ARCHIVE\1_62.DBF thread=1 sequence=62
media recovery complete
Finished recover at 24-JUN-03
RMAN> alter database open resetlogs;
database opened
Top / Previous / Next / Table of Contents
