Oracle_DataGuarding

12c Active data guard. licen$ced (have physcical standby open yet also receiving/applying redo)
12c uses rman more heavily.
12c guards at the cdb level.
Sync
Async
Physical
Logical
Services
Client fail over ...via TNS addr list

====================================

11.2+ Dataguard physical standby

on prim 

archive log list; --in arch mode?
altdb force logging; --avoid user overrides
altsys standby_file_management='AUTO'; --add/del dbf's
altsys db_recovery_file_dest=’myFraDir’;
altsys db_recovery_file_dest_size=400g;
altdb add standby logfile group 11...
altsys remote_login_passwordfile=exclusive scope=spfile; (and bounce)
orapwd password=<sys_pwd>
altdb flashback on;
listener(self)
tnsnames(stby) ...tnsping
altsys log dest1(db=self) all_roles
altsys log dest2(db=stby) prm_role,  async, service=stby
altsys log_arc_config=dg_config(prim,stby)
altsys fal_svr(stby)
create pfile
proc1 service.start ONLY if primary
trig proc1 after startup or db_role_change

on Stby

edit /etc/oratab
listener(self)
tnsnames(prim) ...tnsping
create dirs:
dbf dir(s), 
log dir(s)
base\admin\sid, 
base\admin\sid\adump
FRA dir
copy pfile, 
set log_dest1(self)
set log_dest1(prim)
fal_svr(prim)
db_unique_name=stby
create db via rman
connect target sys@prim
connect catalog <catalogowner>@<catalogdb>
connect auxiliary sys@stby
duplicate target database for standby from active database;
view alert log (ignore ORA-27037: unable to obtain file status)
altdb flashback on;
--start redo
ALTdb RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
-see V$ARCHIVE_DEST, V$ARCHIVE_DEST_STATUS, V$DATAGUARD_STATUS and V$ARCHIVED_LOG
ALTDB OPEN READ ONLY;
-----------------------------------------------------------------

Clients

tnsNames addr_list: prim:port & stby:port

switchover manually

  prim

altdb commit to switchover to physical standby with session shutdown;
shutdown immediate;
startup mount;
recover standby database using backup controlfile;

  stby

altdb commit to switchover to primary with session shutdown;
altdb open;
altdb recover managed standby database using current logfile disconnect from session;
failover graceful
  stby
altdb set standby database to maximize performance;
startup mount

  prim

altsys flush redo to stby;
Failover semi-graceful
copy arc redo files to stby
altdb register physical logfile 'myarclog1';
Fail Over - Standard
ALTDB RECOVER MANAGED STANDBY db CANCEL; --stop redo apply
ALTDB RECOVER MANAGED STANDBY db FINISH; --finish up
see: SWITCHOVER_STATUS from V$DATABASE;
altdb commit to switchover to primary with session shutdown;
altdb open;

Another DBA blogger working w/dataguard:
http://dbaharrison.blogspot.com/2013/12/creating-standby-minimally.html


Comments

Popular Posts