RMANgt; backupdatabaseincludecurrentcontrolfileforstandbyplusarchivelog; note that the standby control is created when the database is backed up.
RMANgt; backup database include current controlfile for standby plus archivelog; // note that the standby control is created when the database is backed up
1. General steps
The steps for creating a standby database through RMAN backup are roughly as follows:
(1) set the master database to force loggin Mode
(2) set the primary database to archived log Mode
(3) configure the parameter file of the Master/Slave Database
(4) The password files on both sides are consistent
(5) configure the listener
(6) Start standby to nomount with the parameter file
(7) completely back up the master database through rman
(8) create a control file for standby using rman
(9) run the rman dumplicate command to create a slave Database
(10) after creation, the standby database is automatically started to the mount state, and redo apply is not automatically started.
Ii. Implement creation operations
Environment: primary database name DGWH, standby database name DGBJ, db_unique_name = DGWH
In the 10 steps I have summarized, the first 5 steps are the same as the conventional method. For more information, see:
Theoretical knowledge:
Detailed configuration steps are provided, which are omitted here, starting from step 1.
Note that I have directly created the spfile file. After modifying the parameter file, you can use create spfile from pfile to create the file.
References:
Important configuration parameters of Oracle Data Guard
Configure Oracle 11g Data Guard based on the same host
Explore Oracle 11g elastic uard
Oracle Data Guard (RAC + DG) archive deletion policies and scripts
Role conversion for Oracle Data Guard
FAL gap in Oracle Data Guard logs
Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby
(1) Use spfile on the slave database to start to nomount.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 318046208 bytes
Fixed Size 1299652 bytes
Variable Size 297798460 bytes
Database Buffers 12582912 bytes
Redo Buffers 6365184 bytes
SQL>
(2) Start the master database to the mount state, and then use rman to connect to the backup database.
RMAN> backup database include current controlfile for standby plus archivelog; // note that the standby control file is created while the database is backed up, and archive logs are included. It can also be split into backup database; copy current controlfile for standby to '/tmp/st. ctl'
Starting backup at 22-SEP-13
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 154 device type = DISK
Channel ORA_DISK_1: starting archived log backup set
Channel ORA_DISK_1: specifying archived log (s) in backup set
Input archived log thread = 1 sequence = 463 RECID = 917 STAMP = 826842432
Channel ORA_DISK_1: starting piece 1 at 22-SEP-13
Channel ORA_DISK_1: finished piece 1 at 22-SEP-13
Piece handle =/u01/app/oracle/flash_recovery_area/DGWH/backupset/2013_09_22/empty _. bkp tag = TAG20130922T224340 comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 22-SEP-13
Starting backup at 22-SEP-13
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting full datafile backup set
Channel ORA_DISK_1: specifying datafile (s) in backup set
Input datafile file number = 00001 name =/u01/app/oracle/oradata/DGWH/datafile/o1_mf_system_9361jnkf _. dbf
Input datafile file number = 00002 name =/u01/app/oracle/oradata/DGWH/datafile/o1_mf_sysaux_9361jnkx _. dbf
Input datafile file number = 00003 name =/u01/app/oracle/oradata/DGWH/datafile/o1_mf_undotbs1_9361jnol _. dbf
Input datafile file number = 00004 name =/u01/app/oracle/oradata/DGWH/datafile/o1_mf_users_9361jnpq _. dbf
Channel ORA_DISK_1: starting piece 1 at 22-SEP-13
Channel ORA_DISK_1: finished piece 1 at 22-SEP-13
Piece handle =/u01/app/oracle/flash_recovery_area/DGWH/backupset/2013_09_22/empty _. bkp tag = TAG20130922T224346 comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Channel ORA_DISK_1: starting full datafile backup set
Channel ORA_DISK_1: specifying datafile (s) in backup set
Including standby control file in backup set
Including current SPFILE in backup set
Channel ORA_DISK_1: starting piece 1 at 22-SEP-13
Channel ORA_DISK_1: finished piece 1 at 22-SEP-13
Piece handle =/u01/app/oracle/flash_recovery_area/DGWH/backupset/2013_09_22/empty _. bkp tag = TAG20130922T224346 comment = NONE
Channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 // piece handle generates three backup slices to/u01/app/oracle/flash_recovery_area/DGWH/backupset
Finished backup at 22-SEP-13
Starting backup at 22-SEP-13
Using channel ORA_DISK_1
Specification does not match any archived log in the recovery catalog
Backup canceled because all files were skipped
Finished backup at 22-SEP-13
Next, let's take a look at the highlights of page 2nd: