Friday, October 16, 2015

Setup Manual Standby Database

As everybody know oracle High Availabily DataGuard feature is available with Enterprise Edition only. But some times we need temporary High Availabily solutions for oracle standard edition databases. So here you can find detailed steps for how to setup manual standby database.

Follow below steps to setup manual standby database:

1) Primary database should be in Archivelog mode.

   Follow this post to enable archivelog mode in your database.
 
2) Create parameter file in primary side.

   SQL> Create pfile from spfile;

3) Take backup of your primary database and also take standby controlfile backup.
 
   RMAN> backup database plus archivelog;
   RMAN> copy current controlfile for standby to '/u01/app/oracle/bkp/stndby_ctrl01.ctl';
 
4) Copy pfile and backup files to standby server

   example: scp -r * oracle@hostname:<<backup_location>>

4) In Standby server, install same version of ORACLE binaries (same as production) and create same directory structure like production database.

5) Copy pfile in $ORACLE_HOME/dbs location and check the paths existed in standby server.

6) In standby side, follow below steps to restore and recover the database.

   SQL> startup nomount;
   
   RMAN> restore controlfile from '/u01/app/oracle/bkp/stndby_ctrl01.ctl';
   
   SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
   
   RMAN> catalog start with '/u01/app/oracle/bkp';
   
   RMAN> restore database;
   
   RMAN> recover database;
 
7) After restored the database put standby database in MRM mode.

   SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE  DISCONNECT FROM SESSION;
 
If you want open manually created stand by database then follow below steps:

1) Activate the standby database and open it.

   SQL> alter database activate standby database;
   SQL> alter database open;
 
2) Create temprary tablespace and make it as default.

   SQL> CREATE TEMPORARY TABLESPACE <<TEMP_TABLESPACE_NAME>> TEMPFILE '<<DATAFILE_PATH>>' SIZE 1024M;
   SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE <<TEMP_TABLESPACE_NAME>>;
 
Note: Using DBVisit, you can configure standby database like dataguard in Standard Edition. But separate licence is required for DBVisit product usage.

Thats it.. Hope this will help you :)

Thanks,
Chowdari

No comments:

Post a Comment

Some Most Popular Articles