WARNING: This web is not used anymore. Please use PDBService.RecoverRlsDB instead!

Recover RLS database

This document was last revised: March 3, 2004 by Magnus Lübeck


  • Diskserver with Oracle 9 binaries installed according to RLS installation procedures

1. Make sure the environment settings are correct

Log in on the system. If the environment is not set, do the following:

export ORACLE_BASE=/ORA/dbs01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/rdbms9.2.0.3
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export TNSNAMES=$ORACLE_HOME/network/admin/tnsnames.ora
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export NLS_LANG=american_america.WE8ISO8859P9

alias orasys='sqlplus "/ as sysdba"'
export ORACLE_SID=rls1

2. Mount the nfs filesystem

As ROOT, add the following line to /etc/vfstab

pdb-backup1:/data/pdb-backup1 - /ORA/nfsbackup nfs rsize=8192,wsize=8192 yes rw
< /vfstab>

# mount /ORA/nfsbackup

3. Prepare for the instance

* Create the directory structure as the oracle user:

mkdir -p $ORACLE_BASE/admin/rls1
mkdir -p $ORACLE_BASE/admin/rls1/pfile
mkdir -p $ORACLE_BASE/admin/rls1/rman
mkdir -p $ORACLE_BASE/admin/rls1/ad-hoc

mkdir -p /ORA/dbs00/oracle/admin/rls1/adump
mkdir -p /ORA/dbs00/oracle/admin/rls1/bdump
mkdir -p /ORA/dbs00/oracle/admin/rls1/cdump
mkdir -p /ORA/dbs00/oracle/admin/rls1/udump
ln -s /ORA/dbs00/oracle/admin/rls1/adump $ORACLE_BASE/admin/rls1
ln -s /ORA/dbs00/oracle/admin/rls1/bdump $ORACLE_BASE/admin/rls1
ln -s /ORA/dbs00/oracle/admin/rls1/cdump $ORACLE_BASE/admin/rls1

ln -s /ORA/dbs00/oracle/admin/rls1/udump $ORACLE_BASE/admin/rls1
mkdir -p /ORA/dbs03/oradata/rls1

* Create the p-file $ORACLE_BASE/admin/rls1/pfile/initrls1.ora and a link to $ORACLE_HOME/dbs

cp /ORA/nfsbackup/rls1/full/`ls -tr /ORA/nfsbackup/rls1/full | sort -i | tail -1`/initrls1.ora $ORACLE_BASE/admin/rls1/pfile
ln -s /ORA/dbs01/oracle/admin/rls1/pfile/initrls1.ora $ORACLE_HOME/dbs

4. Create orapwd file

* Replace the XXXXXX with the real password

orapwd file=$ORACLE_HOME/dbs/orapwrls1 password=XXXXXX

5. Run rman to restore the controlfile (will take about 10 seconds)

connect target /
connect catalog pdb_rman/XXXXXX@oemrep

shutdown abort;

set dbid 2642027317

startup nomount;

run {
restore controlfile;


6. Find out which is the latest sequence number backed up in archive logs

Startup RMAN and query the repository which is the latest backed up archivelog

RMAN> connect target /
RMAN> connect catalog pdb_rman/XXXXXX@oemrep
RMAN> list backup of archivelog from time 'sysdate-1';

Make a note on which is the latest archivelog with the highest Next SCN number.

List of Archived Logs in backup set 1314612

Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 8866 5556717779379 14-OCT-03 5556717779651 14-OCT-03

In this case it is "sequence 8866 thread 1". Add one to the sequence number for later use.

7. Run RMAN restore database (will take about 3 minutes)

edit the file restore_database.rman to look like the following:


connect target /
connect catalog pdb_rman/XXXXXX@oemrep

shutdown abort;
startup nomount;

run {

set until sequence 8867 thread 1;

alter database mount;

restore database;
recover database;
alter database open resetlogs;


(Author: Magnus Lubeck, IT/DB, 2003-10-14)

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2005-12-07 - unknown
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    PSSGroup All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback