ORACLE DataGuard in Oracle Standard

Env
Primary 12.11.0.104 Linux 5.5 + Oracle 11g R2 Standard Version
Standby 12.11.0.130 Linux 5.5 + Oracle 11g R2 Standard Version

Primary Server
1. Create database orcl11g 
A. Enable the archive log mode and specific the archive dest such as {ORACLE_BASE}/archivelog

2. Create pfile 

3. Create standby control file

4. Create backup

5. Copy the pfile, password file, standby control file, database backup and archivelog to standby database

Standby Server
1. sqlplus / as sysdba
A. startup nomount
B. alter database mount standby database

2. rman target /
A. restore database
if the datafile is different use following example
run {
set newe name for datafile 4 to '/tmp/datafile4.dbf';
restore datafile 4;
}

3. sqlplus / as sysdba
A. recover standby database

4. Check the result
A. sqlplus / as sysdba
B. alter database open read only;

5. Apply archive log
A. sqlplus / as sysdba
B. shutdown immediate
C. startup nomount
D. startup mount standby database
E. recover standby database

Convert the standby database to primary
1. primary database: alter system archive log current;
2. transfer the archivelog file from primary database to standby one
3. apply the archivelog by "recover standby database"
4. activate the standby database by "alter database activate stnadby database"
5. restart the database
shutdown immediate;
startup mount;
alter database read write;

Comments

Popular posts from this blog

Nginx Proxy & Load Balance & LNMP

Snort+barnyard2+Snorby CentOS 6.5_64 Installation

ORACLE Error