Friday, October 12, 2018

Configure Data Guard, switchover and convert

7:07 AM Posted by Dilli Raj Maharjan , No comments

Data Guard configuration, switchover and convert database to snapshot standby.

Verify dg_broker_start parameter. Set parameter to true if it is false.
alter system set dg_broker_start=true;


Set dg_broker_start to true on standby server also.


Type dgmgrl once you enter the dgmgrl prompt type connect sys. Type password when prompt.
dgmgrl
connect sys


Type help to get list of command type help command to get syntax of the comand
help
help create


Create configuration with primary database as accdb.
create configuration noug_dg as
primary database is accdb
connect identifier is accdb;


Add standby database with add database command
add database accstdb as connect identifier is accstdb;


Check configuration with show command
show configuration.


Enable configuration with command below.
enable configuration;


Once you enable configuration you can switchover database role with command below
switchover to accstdb;
show configuration;


Switch back to accdb;
switchover to accdb;


Convert physical standby database to snaphost standby.
convert database accstdb to snapshot standby;


Check database role. While database is in snapshot standby mode there is one restore point created to revert back changes.
select open_mode, database_role from v$database;
col name format a60
set lines 200 pages 200
select name, storage_size, time from v$restore_point;


Create user dilli on snapshot standby database and create table in dilli schema
create user dilli identified by raj;
grant dba to dilli;
connect dilli/raj
create table abc as select * from dba_objects;
commit;
select count(*) from abc;


Check current DG configuration.
show configuration;


Convert database back to physical standby.
convert database accstdb to physical standby;


Verify database role.
select open_mode, database_role from v$database;

For details please visit Oracle documentation
https://docs.oracle.com/database/121/DGBKR/sofo.htm#DGBKR390

0 comments:

Post a Comment