Creating physical standby using RMAN duplicate

Oracle9i start from, Oracle allows the use of duplicate manner Dataguard standby database creation, very simple.

First of all, the main course required a RMAN backup database, and then need to send backup to the standby database and the main library in the same directory.
Monitor in the standby host to create the necessary directory structure, parameter file, start the instance, and then at the main library will be able to connect from the library to restore.

Recovery of the major orders are: duplicate target database for standby;

+++++++++++++++++++++++++++++ Primary ++++++++++++++++++++++++++++++++++++++++++++++

C: \>% oracle_home% \ bin \ rman

Recovery Manager: Release 10.2.0.3.0 - Production on Mon Mar 30 16:48:18 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

RMAN> connect target /

connected to target database: LGX (DBID = 2379918214)

RMAN> run (
2> allocate channel ch0 type disk format 'p: \ backup02 \% U' maxpiecesize 100M;
3> backup database;
4> release channel ch0;
5>)

allocated channel: ch0
channel ch0: sid = 154 devtype = DISK

Starting backup at 30-MAR-09
channel ch0: starting full datafile backupset
channel ch0: specifying datafile (s) in backupset
input datafile fno = 00001 name = P: \ LGXDB \ SYSTEM01.DBF
input datafile fno = 00003 name = P: \ LGXDB \ SYSAUX01.DBF
input datafile fno = 00002 name = P: \ LGXDB \ UNDOTBS01.DBF
input datafile fno = 00004 name = P: \ LGXDB \ USERS01.DBF
channel ch0: starting piece 1 at 30-MAR-09
channel ch0: finished piece 1 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0KKB7QP7_1_1 tag = TAG20090330T164943 comment = NONE
channel ch0: starting piece 2 at 30-MAR-09
channel ch0: finished piece 2 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0KKB7QP7_2_1 tag = TAG20090330T164943 comment = NONE
channel ch0: starting piece 3 at 30-MAR-09
channel ch0: finished piece 3 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0KKB7QP7_3_1 tag = TAG20090330T164943 comment = NONE
channel ch0: starting piece 4 at 30-MAR-09
channel ch0: finished piece 4 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0KKB7QP7_4_1 tag = TAG20090330T164943 comment = NONE
channel ch0: starting piece 5 at 30-MAR-09
channel ch0: finished piece 5 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0KKB7QP7_5_1 tag = TAG20090330T164943 comment = NONE
channel ch0: starting piece 6 at 30-MAR-09
channel ch0: finished piece 6 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0KKB7QP7_6_1 tag = TAG20090330T164943 comment = NONE
channel ch0: backup set complete, elapsed time: 00:00:16
channel ch0: starting full datafile backupset
channel ch0: specifying datafile (s) in backupset
including current control file in backupset
channel ch0: starting piece 1 at 30-MAR-09
channel ch0: finished piece 1 at 30-MAR-09
piece handle = P: \ BACKUP02 \ 0LKB7QPN_1_1 tag = TAG20090330T164943 comment = NONE
channel ch0: backup set complete, elapsed time: 00:00:02
Finished backup at 30-MAR-09

released channel: ch0

RMAN> run (
2> allocate channel ch0 type disk format 'p: \ backup02 \ ctl_% U';
3> backup current controlfile for standby;
4> release channel ch0;
5>)

allocated channel: ch0
channel ch0: sid = 154 devtype = DISK

Starting backup at 30-MAR-09
channel ch0: starting full datafile backupset
channel ch0: specifying datafile (s) in backupset
including standby control file in backupset
channel ch0: starting piece 1 at 30-MAR-09
channel ch0: finished piece 1 at 30-MAR-09
piece handle = P: \ BACKUP02 \ CTL_0MKB7QQM_1_1 tag = TAG20090330T165030 comment = NONE
channel ch0: backup set complete, elapsed time: 00:00:02
Finished backup at 30-MAR-09

released channel: ch0

#

# Copy all the backup files, parameter files, password file on the standby machine

# Startup nomount standby database

#

RMAN> connect auxiliary sys / lgx @ standby /

RMAN-00571: ============================================== =============
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ============================================== =============
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "newline,;"
RMAN-01008: the bad identifier was: /
RMAN-01007: at line 1 column 35 file: standard input

RMAN> connect auxiliary sys / lgx @ standby

connected to auxiliary database: LGX (not mounted)

RMAN> duplicate target database for standby nofilenamecheck;

Starting Duplicate Db at 30-MAR-09
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid = 155 devtype = DISK

contents of Memory Script:
(
restore clone standby controlfile;
sql clone 'alter database mount standby database';
)
executing Memory Script

Starting restore at 30-MAR-09
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ CTL_0MKB7QQM_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle = P: \ BACKUP02 \ CTL_0MKB7QQM_1_1 tag = TAG20090330T165030
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output filename = P: \ LGXDB \ CONTROL01.CTL
output filename = P: \ LGXDB \ CONTROL02.CTL
output filename = P: \ LGXDB \ CONTROL03.CTL
Finished restore at 30-MAR-09

sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1

contents of Memory Script:
(
set newname for tempfile 1 to
"P: \ LGXDB \ TEMP01.DBF";
switch clone tempfile all;
set newname for datafile 1 to
"P: \ LGXDB \ SYSTEM01.DBF";
set newname for datafile 2 to
"P: \ LGXDB \ UNDOTBS01.DBF";
set newname for datafile 3 to
"P: \ LGXDB \ SYSAUX01.DBF";
set newname for datafile 4 to
"P: \ LGXDB \ USERS01.DBF";
restore
check readonly
clone database
;
)
executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to P: \ LGXDB \ TEMP01.DBF in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 30-MAR-09
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid = 157 devtype = DISK

channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
restoring datafile 00001 to P: \ LGXDB \ SYSTEM01.DBF
restoring datafile 00002 to P: \ LGXDB \ UNDOTBS01.DBF
restoring datafile 00003 to P: \ LGXDB \ SYSAUX01.DBF
restoring datafile 00004 to P: \ LGXDB \ USERS01.DBF
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ 0KKB7QP7_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle = P: \ BACKUP02 \ 0KKB7QP7_1_1 tag = TAG20090330T164943
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ 0KKB7QP7_2_1
channel ORA_AUX_DISK_1: restored backup piece 2
piece handle = P: \ BACKUP02 \ 0KKB7QP7_2_1 tag = TAG20090330T164943
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ 0KKB7QP7_3_1
channel ORA_AUX_DISK_1: restored backup piece 3
piece handle = P: \ BACKUP02 \ 0KKB7QP7_3_1 tag = TAG20090330T164943
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ 0KKB7QP7_4_1
channel ORA_AUX_DISK_1: restored backup piece 4
piece handle = P: \ BACKUP02 \ 0KKB7QP7_4_1 tag = TAG20090330T164943
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ 0KKB7QP7_5_1
channel ORA_AUX_DISK_1: restored backup piece 5
piece handle = P: \ BACKUP02 \ 0KKB7QP7_5_1 tag = TAG20090330T164943
channel ORA_AUX_DISK_1: reading from backup piece P: \ BACKUP02 \ 0KKB7QP7_6_1
channel ORA_AUX_DISK_1: restored backup piece 6
piece handle = P: \ BACKUP02 \ 0KKB7QP7_6_1 tag = TAG20090330T164943
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:55
Finished restore at 30-MAR-09

contents of Memory Script:
(
switch clone datafile all;
)
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy recid = 6 stamp = 682880024 filename = P: \ LGXDB \ SYSTEM01.DBF
datafile 2 switched to datafile copy
input datafile copy recid = 7 stamp = 682880024 filename = P: \ LGXDB \ UNDOTBS01.DBF
datafile 3 switched to datafile copy
input datafile copy recid = 8 stamp = 682880024 filename = P: \ LGXDB \ SYSAUX01.DBF
datafile 4 switched to datafile copy
input datafile copy recid = 9 stamp = 682880024 filename = P: \ LGXDB \ USERS01.DBF
Finished Duplicate Db at 30-MAR-09

RMAN>

+++++++++++++++++++++++++++++ Primary ++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++ Standby ++++++++++++++++++++++++++++++++++++++++++++++

SQL> alter database mount standby database;
alter database mount standby database
*
ERROR at line 1:
ORA-01100: database already mounted

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL>

+++++++++++++++++++++++++++++ Standby ++++++++++++++++++++++++++++++++++++++++++++++
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb
Tags:

Related Posts of Creating physical standby using RMAN duplicate

  • RMAN created physical standby

    Monitor in the standby host to create the necessary directory structure and parameter files. Hot COPY after the main library to the standby, and on standby to restore. +++++++++++++++++++++++++++++ Standby ++++++++++++++++++++++++++++++++++++++++++++ ...

  • Physical Standby step by step

    [I] should be prepared to do the logical standby experiment, the physical standby in mind about the steps. 1) Physical Standby: force logging ALTER DATABASE FORCE LOGGING; 2) Physical Standby: create standby control file > startup mount; > alte ...

  • RMAN to create the physical standby

    Monitor in the standby host to create the necessary directory structure and parameter files. Hot COPY after the main library to the standby, and on standby to restore. +++++++++++++++++++++++++++++ Standby ++++++++++++++++++++++++++++++++++++++++++++ ...

  • Article Index ---- yangtingkun personal BLOG aspects of the physical DATA GUARD

    Physical DATA GUARD areas: DATA GURAD Physical STANDBY building: a record of the physical environment, the establishment of STANDBY. DATA GURAD on the same server to establish the physical STANDBY: on the same server to establish the physical STANDBY ...

  • DATA GUARD STANDBY the FAILOVER physical switch

    DATA GUARD STANDBY the FAILOVER physical switch Study: yangtingkun, Source: blog, Editor: Shu-Qin Li, 2007-12-04 04:10 The FAILOVER physical STANDBY switch will present a physical PRIMARY STANDBY switch to the database. The FAILOVER physical STANDBY ...

  • Use RMAN to create a database for quick Dataguard

    Oracle9i start from, Oracle allows the use of duplicate manner Dataguard standby database creation, very simple. First of all, the main course required a RMAN backup database, and then need to send backup to the standby database and the main library ...

  • Experimental Logical Standby

    1) 1 Create a Physical Standby Database 2) Stop Redo Apply on the Physical Standby Database alter database recover managed standby database cancel; 3) Set Parameters in Primary alter system set log_archive_dest_1 = 'location = d: \ arc \ VALID_FO ...

  • DATA GUARD STANDBY the SWITCHOVER physical switch

    The SWITCHOVER physical STANDBY switch will present a physical PRIMARY STANDBY switch to the database, but the physical STNADBY PRIMARY database and into the database. General SWITCHOVER switch in the switching of both plans, characterized by the swi ...

  • Advanced Application of Duplicate copy RMAN database (3) replication process

    Use rman's duplicate command to copy the database series, this series can be viewed as a step by step learning companion RMAN ~ ~ ~ ~ Advanced Application of Duplicate copy RMAN database (1) Overview Advanced Application of Duplicate copy RMAN da ...

  • RMAN Advanced Application of Duplicate Copy Database (5) added

    Use rman's duplicate command to copy the database series, this series can be viewed as a step by step learning companion RMAN ~ ~ ~ ~ Advanced Application of Duplicate copy RMAN database (1) Overview Advanced Application of Duplicate copy RMAN databas

Leave a Reply

Recent
Recent Entries
Tag Cloud
Random Entries
Latest Comments