Oracle DataGaurd on Standard Edition

Data guard in Oracle Standard Edition is not posible, so alternat way in Oracle is Manual DataGaurd on Standard Edition also called Manual DataGuard.

Steps are

1) Take rman backup from primary server
script
rman target ‘system/paswd’ log=/rman/rman/rmanlog.`date ‘+%a’` <<EOF
run
{
allocate channel d1 type disk;
allocate channel d2 type disk;
delete noprompt backup;
BACKUP AS COMPRESSED BACKUPSET DATABASE
tag whole_database_open
format ‘/rman/rman/db_%t_%s_p%p’;
backup current controlfile tag =cf1 format ‘/rman/rman/cf_%t_%s_p%p’;
release channel d1;
release channel d2;
}
exit;
EOF
at 20:01 < /rman/rman/rman.sh
————

2- Take standby controlfile from primary server
alter database create standby controlfile as ‘/rman/rman/standby.ctl’;
copy the /rman/rman folder to DR-SERVER
scp -r /rman/rman DR-SERVER:/rman/.

3- Restore standby controlfile on DR-SERVER
SQL> startup nomount
rman target /
rman> restore controlfile from ‘/rman/rman/standby.ctl;
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
rman> restore database;

4- schedule archive copy on primary server to DR-SERVER particularly in non-working hours

rsync -e ssh -Pazv /rman/arch/* oracle@DR-SERVER:/rman/arch/.
at 22:01 < /home/oracle/script/copy_archive_to_dr.sh

5- Schedule recovery process on DR-SERVER

schedule the sqlaplly.sh as showing below by 11:01 AM which will call another sql script called recover2.sql

[oracle@dr-server scripts]$ cat sqlaplly.sh
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_SID=prod
cd /u01/app/oracle/product/10.2.0/db_1/bin
./sqlplus sys/idgroup as sysdba @/home/oracle/scripts/recover2.sql
at 11:01 < /home/oracle/scripts/sqlaplly.sh
[oracle@dr-server scripts]$ cat recover2.sql
set echo on
spool /home/oracle/scripts/logapply.log
alter database recover automatic standby database until cancel;
alter database recover cancel;
spool off
exit;

6- user equllancy is mandatory (oracle OS user between in primary and DR-server.)

Advertisements

About Sher khan

Senior Oracle DBA, Oracle 10g , Oracle 11g OCE ,Oracle 12C and Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g , 11g and 12C. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com
This entry was posted in Oracle DataGaurd. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s