Professional Documents
Culture Documents
Step by Guide Rman For Dataguard-ID 469493.1
Step by Guide Rman For Dataguard-ID 469493.1
Goal
Solution
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and
therefore has not been subject to an independent technical review.
Applies to:
Oracle Server - Enterprise Edition - Version: 9.0.1.0 to 11.2.0.3 - Release: 9.0.1 to 11.2
Information in this document applies to any platform.
***Checked for relevance on 12-Dec-2010***
Goal
Step by step guide on how to create a physical standby database using RMAN without using
duplicate command.
Solution
Below are the steps to accomplish the task :
Step 1: Backup the database that includes backup of datafiles, archivelogs and controlfile for
standby
Step 2: Move the backups to the standby server
Step 3: Make proper changes in the parameter files of both primary and standby database
Step 4: Do the restore and recover on standby database
Step 5: Put the standby database in recover managed mode
Example :
=======
Step 1: Backup the primary database that includes backup of datafiles, archivelogs and controlfile
for standby
[oracle@test-br ~]$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Sun Dec 9 14:56:49 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=3959250272)
RMAN> run
2> {
3> allocate channel c1 type disk;
4> allocate channel c2 type disk;
5> allocate channel c3 type disk;
6> backup database plus archivelog;
7> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: sid=159 devtype=DISK
allocated channel: c2
channel c2: sid=138 devtype=DISK
allocated channel: c3
channel c3: sid=137 devtype=DISK
2> {
3> allocate channel c1 type disk;
4> backup current controlfile for standby;
5> }
allocated channel: c1
channel c1: sid=159 devtype=DISK
Starting backup at 09:DEC:2007:15:00:09
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including standby control file in backupset
channel c1: starting piece 1 at 09:DEC:2007:15:00:10
channel c1: finished piece 1 at 09:DEC:2007:15:00:11
piece
handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09/o1_mf
_ncnnf_TAG20071209T150009_3oqff2fb_.bkp tag=TAG20071209T150009 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 09:DEC:2007:15:00:11
released channel: c1
lock_name_space='standby'
Step 4: Do the restore and recover on standby database
Note : After the restore try to identify the last archivelog sequence that is backed up and add 1 to
it and do the recovery using it. In the below example the last archivelog that is backed up is
sequence 36 and we added 1 to it that becomes 37 and we recovered till sequence 37.
[oracle@test-br ~]$ export ORACLE_SID=standby
[oracle@test-br ~]$ rman target /
Recovery Manager: Release 10.2.0.2.0 - Production on Sun Dec 9 15:18:28 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 603979776 bytes
Fixed Size 1262224 bytes
Variable Size 163581296 bytes
Database Buffers 432013312 bytes
Redo Buffers 7122944 bytes
RMAN> set dbid=3959250272;
executing command: SET DBID
For 9i to restore controlfile you need to use the below command :
RMAN> restore controlfile from
'/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09/o1_mf_ncnnf_
TAG20071209T150009_3oqff2fb_.bkp';
From 10g onwards you need to use the below command to restore controlfile :
RMAN> restore standby controlfile from
'/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09/o1_mf_ncnnf_
TAG20071209T150009_3oqff2fb_.bkp';
Starting restore at 09:DEC:2007:15:19:50
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u01/oracle/product/ora10g/oradata/standby/control01.ctl
output filename=/u01/oracle/product/ora10g/oradata/standby/control02.ctl
output filename=/u01/oracle/product/ora10g/oradata/standby/control03.ctl
Finished restore at 09:DEC:2007:15:19:53
Related
Products
Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise
Edition > Recovery Manager > Standby database issues
Keywords
DATAGUARD;PHYSICAL STANDBY
Errors
ORA-1152;ORA-1110;ORA-1547