Detailed steps for building dataguard at ORACLE11G (all physical standby operations)

Source: Internet
Author: User

Detailed steps for building dataguard at ORACLE11G (all physical standby operations)
Preface:
DATAGUARD establishes a reference relationship by establishing a PRIMARY and STANDBY group. Once STANDBY is created, DATAGUARD passes the REDO of the PRIMARY database (PRIMARY) to the STANDBY database, then, apply REDO in STANDBY to synchronize databases.

1. installation environment
Project ListPrimary LibraryStandby LibraryOperating System:
Centos6.4
Centos6.4
Oracle software version:
Oracle 11.2.0.1.0
Oracle 11.2.0.1.0
IP Address:
192.168.121.217
192.168.121.218
Db_unique_name:
Pdunq
Pdunq_dg
?


2.3 prepare the parameter file

2.3.2 modify pfile

[oracle@powerlong5 ~]$ rman target sys/syspl1758@PD1 auxiliary /Recovery Manager: Release 11.2.0.1.0 - Production on Sat Feb 7 19:08:16 2015Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.connected to target database: POWERDES (DBID=3391761643)connected to auxiliary database: POWERDES (not mounted)RMAN> run {allocate auxiliary channel c1 device type disk;allocate auxiliary channel c2 device type disk;duplicate target database for standby nofilenamecheck dorecover;release channel c1;release channel c2;}2> 3> 4> 5> 6> 7>using target database control file instead of recovery catalogallocated channel: c1channel c1: SID=767 device type=DISKallocated channel: c2channel c2: SID=1150 device type=DISKStarting Duplicate Db at 07-FEB-15contents of Memory Script:{set until scn 10903678943;restore clone standby controlfile;}executing Memory Scriptexecuting command: SET until clauseStarting restore at 07-FEB-15channel c1: starting datafile backup set restorechannel c1: restoring control filechannel c1: reading from backup piece /oracle/app/oracle/flash_recovery_area/PDUNQ/backupset/2015_02_07/o1_mf_ncsnf_TAG20150207T182252_bfct20tb_.bkpchannel c1: piece handle=/oracle/app/oracle/flash_recovery_area/PDUNQ/backupset/2015_02_07/o1_mf_ncsnf_TAG20150207T182252_bfct20tb_.bkp tag=TAG20150207T182252channel c1: restored backup piece 1channel c1: restore complete, elapsed time: 00:00:01output file name=/oracle/data_ora/powerdes/control01.ctloutput file name=/oracle/app/oracle/flash_recovery_area/powerdes/control02.ctlFinished restore at 07-FEB-15contents of Memory Script:{sql clone \'alter database mount standby database\';}executing Memory Scriptsql statement: alter database mount standby databasecontents of Memory Script:{set until scn 10903678943;set newname for datafile 1 to\"/home/oradata/pwerdes/system01.dbf\";set newname for datafile 2 to\"/home/oradata/pwerdes/sysaux01.dbf\";set newname for datafile 3 to\"/home/oradata/pwerdes/undotbs01.dbf\";set newname for datafile 4 to\"/home/oradata/pwerdes/users01.dbf\";set newname for datafile 6 to\"/home/oradata/pwerdes/plas01.dbf\";set newname for datafile 7 to\"/home/oradata/pwerdes/pl01.dbf\";set newname for datafile 8 to\"/home/oradata/pwerdes/help01.dbf\";set newname for datafile 9 to\"/home/oradata/pwerdes/adobelc01.dbf\";set newname for datafile 10 to\"/home/oradata/pwerdes/sms01.dbf\";restoreclone database;}executing Memory Scriptexecuting command: SET until clauseexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEStarting restore at 07-FEB-15channel c1: starting datafile backup set restorechannel c1: specifying datafile(s) to restore from backup setchannel c1: restoring datafile 00001 to /home/oradata/pwerdes/system01.dbfchannel c1: restoring datafile 00002 to /home/oradata/pwerdes/sysaux01.dbfchannel c1: restoring datafile 00003 to /home/oradata/pwerdes/undotbs01.dbfchannel c1: restoring datafile 00004 to /home/oradata/pwerdes/users01.dbfchannel c1: restoring datafile 00006 to /home/oradata/pwerdes/plas01.dbfchannel c1: restoring datafile 00007 to /home/oradata/pwerdes/pl01.dbfchannel c1: restoring datafile 00008 to /home/oradata/pwerdes/help01.dbfchannel c1: restoring datafile 00009 to /home/oradata/pwerdes/adobelc01.dbfchannel c1: restoring datafile 00010 to /home/oradata/pwerdes/sms01.dbfchannel c1: reading from backup piece /oracle/app/oracle/flash_recovery_area/PDUNQ/backupset/2015_02_07/o1_mf_nnndf_TAG20150207T182252_bfcsvxoz_.bkpchannel c1: piece handle=/oracle/app/oracle/flash_recovery_area/PDUNQ/backupset/2015_02_07/o1_mf_nnndf_TAG20150207T182252_bfcsvxoz_.bkp tag=TAG20150207T182252channel c1: restored backup piece 1channel c1: restore complete, elapsed time: 00:04:05Finished restore at 07-FEB-15contents of Memory Script:{switch clone datafile all;}executing Memory Scriptdatafile 1 switched to datafile copyinput datafile copy RECID=3 STAMP=871067691 file name=/home/oradata/pwerdes/system01.dbfdatafile 2 switched to datafile copyinput datafile copy RECID=4 STAMP=871067691 file name=/home/oradata/pwerdes/sysaux01.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=5 STAMP=871067691 file name=/home/oradata/pwerdes/undotbs01.dbfdatafile 4 switched to datafile copyinput datafile copy RECID=6 STAMP=871067691 file name=/home/oradata/pwerdes/users01.dbfdatafile 6 switched to datafile copyinput datafile copy RECID=7 STAMP=871067691 file name=/home/oradata/pwerdes/plas01.dbfdatafile 7 switched to datafile copyinput datafile copy RECID=8 STAMP=871067691 file name=/home/oradata/pwerdes/pl01.dbfdatafile 8 switched to datafile copyinput datafile copy RECID=9 STAMP=871067691 file name=/home/oradata/pwerdes/help01.dbfdatafile 9 switched to datafile copyinput datafile copy RECID=10 STAMP=871067692 file name=/home/oradata/pwerdes/adobelc01.dbfdatafile 10 switched to datafile copyinput datafile copy RECID=11 STAMP=871067692 file name=/home/oradata/pwerdes/sms01.dbfcontents of Memory Script:{set until scn 10903678943;recoverstandbyclone databasedelete archivelog;}executing Memory Scriptexecuting command: SET until clauseStarting recover at 07-FEB-15starting media recoveryarchived log for thread 1 with sequence 302 is already on disk as file /oracle/app/oracle/flash_recovery_area/archivelog/1_302_870804216.dbfarchived log file name=/oracle/app/oracle/flash_recovery_area/archivelog/1_302_870804216.dbf thread=1 sequence=302media recovery complete, elapsed time: 00:00:00Finished recover at 07-FEB-15Finished Duplicate Db at 07-FEB-15released channel: c1released channel: c2RMAN> exit

3.7 modify the parameter file on standby
3.8 start the database
4. Check that the archive has not been found.
4.1, view alert logs <br> [oracle @ powerlong5 = "" trace] $ = "" tail = ""-f = "" oracle = "" app = "" diag = "" rdbms = "" pdunq_dg = "" powerdes = "" trace = "" alert_powerdes.log = "" <br = ""> mrp0 = "" started = "" with = "pid = ""41, "OS =" "id =" 21243 "> mrp0: =" "background =" "managed =" "standby =" "recovery =" "process =" "(powerdes) <br = ""> = "" logmerger = "" process <br = ""> sat = "" feb = "" 07 = "" 20:12:18 = "" 2015 <br = ""> managed = "" not = "" usin G = "" real = "" time = "" apply <br = ""> parallel = "" media = "4 =" "slaves <br =" "> waiting = "" for = "" all = "" non-current = "" orls = "" to = "" be = "" archived... <br = ""> all = "" have = "" been = "" archived. <br = ""> media = "" waiting = "" thread = "" 1 = "" sequence = "" 303 <br = ""> completed: = "" alter = "" database = "" recover = "" disconnect = "" from = "" session <br = ""> <br = "" view log transmission status <br = "" select = "" sequence #, first_time, next_time = "" V $ archived_log; <br = ""> select = "" sequence #, to_char (first_time, 'yyyy-mm-dd = "" hh24: mi: ss ') = "" first_time, to_char (next_time, 'yyyy-mm-dd = "" next_time = ""> primary = "": 4.2, go to tnsnames. in ora, the modification and configuration of primary and standby are consistent. OK, and the deployment uard is complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.