1. Home
  2. Knowledge Base
  3. ZDLRA
  4. Zero Data Loss Recovery Appliance (ZDLRA) Hands-On Lab 3

Zero Data Loss Recovery Appliance (ZDLRA) Hands-On Lab 3

Tutorial Objectives

  • Add ZDLRA to an existing Data Guard Broker configuration
  • Create a ZDLRA Replication Server
  • Configure ZDLRA replication from Primary ZDLRA (upstream) to Secondary ZDLRA (downstream)
  • Perform RMAN backup and verify replication of backup pieces as well as Virtual Backup creation on Secondary ZDLRA

DATA GUARD BROKER CONFIGURATION

[oracle@prdb01 server_wallet]$ dgmgrl
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Wed Sep 8 16:37:02 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

Welcome to DGMGRL, type "help" for information.

DGMGRL> connect / as sysdg
Connected to "cdb2"
Connected as SYSDG.

DGMGRL> show configuration;

Configuration - cdb_dg

Protection Mode: MaxAvailability
Members:
cdb - Primary database
cdb_sb - Physical standby database

Fast-Start Failover: Disabled

Configuration Status:
SUCCESS (status updated 50 seconds ago)

DGMGRL> add recovery_appliance zdlra_se as connect identifier is 'czdr8nse-scan.mycorp.gov.au:1521/SEZDRDB1_2060:dedicated';
Recovery Appliance "zdlra_se" added

DGMGRL> add recovery_appliance zdlra_pr as connect identifier is 'czdr8npr-scan.mycorp.gov.au:1521/PRZDRDB1_2060:dedicated';
Recovery Appliance "zdlra_pr" added

DGMGRL> edit database cdb set property RedoRoutes = '(cdb : (cdb_sb sync), (zdlra_se async priority=1, zdlra_pr async priority=2))' ;
Property "redoroutes" updated

DGMGRL> edit database cdb_sb set property RedoRoutes = '(cdb_sb : (cdb sync), (zdlra_se async priority=1, zdlra_pr async priority=2))';
Property "redoroutes" updated

DGMGRL> disable configuration;
Disabled.

DGMGRL> enable configuration;
Enabled.


DGMGRL> show configuration;

Configuration - cdb_dg

Protection Mode: MaxAvailability
Members:
cdb - Primary database
cdb_sb - Physical standby database
zdlra_se - Recovery appliance

Members Not Receiving Redo:
zdlra_pr - Recovery appliance (alternate of zdlra_se)

Fast-Start Failover: Disabled

Configuration Status:
SUCCESS (status updated 47 seconds ago)

CONFIGURE ZDLRA REPLICATION FROM PRIMARY ZDLRA (UPSTREAM) TO SECONDARY ZDLRA (DOWNSTREAM)

  • On Primary ZDLRA, VPC user has been created:repuser_from_secondary
  • On Secondary ZDLRA, VPC user has been created:repuser_from_primary
  • Primary ZDLRA has connection to Secondary ZDLRA via VPC user :repuser_from_primary
  • Secondary ZDLRA has connection to Primary ZDLRA via VPC user :repuser_from_secondary
  • ZDLRA replication is performed using Replication SCAN and port is 1522
PRIMARY ZDLRA

[oracle@przdlra01 ~]$ mkstore -wrl /dbfs_repdbfs/REPLICATION -listCredential
Oracle Secret Store Tool Release 21.0.0.0.0 - Production
Version 21.0.0.0.0
Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.

List credential (index: connect_string username)
1: czdr8serepl-scan.mycorp.gov.au:1522/SEZDRDB:repuser_from_primary repuser_from_primary
You have new mail in /var/spool/mail/oracle


SECONDARY ZDLRA
[oracle@sezdlra01 ~]$ mkstore -wrl /dbfs_repdbfs/REPLICATION -listCredential
Oracle Secret Store Tool Release 21.0.0.0.0 - Production
Version 21.0.0.0.0
Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.

List credential (index: connect_string username)
1: czdr8prrepl-scan.mycorp.gov.au:1522/PRZDRDB:repuser_from_secondary repuser_from_secondary

Create Replication Server

BEGIN
DBMS_RA.create_replication_server(
replication_server_name=>'REPL_PRZDR_TO_SEZDR',
sbt_so_name=>'/u01/app/oracle/product/19.0.0.0/dbhome_1/lib/libra.so',
sbt_parms=>NULL,
max_streams=>10,
catalog_user_name=>'RASYS',
wallet_alias=>'czdr8serepl-scan.mycorp.gov.au:1522/SEZDRDB:repuser_from_primary',
wallet_path=>'file:/dbfs_repdbfs/REPLICATION',
proxy_url=>NULL,
proxy_port=>NULL,
http_timeout=>NULL);
END;
/

Associate a replication server configuration with a protection policy

On Primary ZDLRA as RASYS 

SQL> BEGIN
DBMS_RA.ADD_REPLICATION_SERVER(
replication_server_name=> 'REPL_PRZDR_TO_SEZDR',
protection_policy_name => 'CDB_PROTECTION_POLICY');
END;
/
2 3 4 5 6

PL/SQL procedure successfully completed.


SQL> select REPLICATION_SERVER_NAME as "RS_NAME", REPLICATION_SERVER_STATE as "RS_STATE"
from RA_REPLICATION_SERVER where POLICY_NAME='CDB_PROTECTION_POLICY';


RS_NAME
--------------------------------------------------------------------------------
RS_STATE
---------------------
REPL_PRZDR_TO_SEZDR
RUNNING

CHECK ZDLRA BACKUP REPLICATION

CONNECT TO PRIMARY ZDLRA


[oracle@prdb01 ~]$ rman target / catalog /@dr_zdlra_pr

Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 20 19:33:46 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

connected to target database: CDB (DBID=2200216847)
connected to recovery catalog database
recovery catalog schema version 21.01.00.00. is newer than RMAN version


PERFORM LEVEL 1 INCREMENTAL BACKUP - DATAFILE #3


run
{
allocate channel sbt1 device type sbt
format '%d_%U'
PARMS="SBT_LIBRARY=/u01/app/oracle/product/19.0.0.0/dbhome_2/lib/libra.so,
ENV=(RA_WALLET='location=file:/u01/app/oracle/product/19.0.0.0/dbhome_2/network/admin/server_wallet
credential_alias=dr_zdlra_pr')";

backup
cumulative incremental level 1
filesperset 1
section size 64g
datafile 3;
}


allocated channel: sbt1
channel sbt1: SID=126 device type=SBT_TAPE
channel sbt1: RA Library (PRZDRDB) SID=CC6B519E1029346EE0537C01360A0A60

Starting backup at 20-SEP-21
channel sbt1: starting incremental level 1 datafile backup set
channel sbt1: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/CDB/sysaux01.dbf
channel sbt1: starting piece 1 at 20-SEP-21
channel sbt1: finished piece 1 at 20-SEP-21
piece handle=CDB_2o09ihu3_88_1_1 tag=TAG20210920T200003 comment=API Version 2.0,MMS Version 19.0.0.1
channel sbt1: backup set complete, elapsed time: 00:00:15
Finished backup at 20-SEP-21

Starting Control File and SPFILE Autobackup at 20-SEP-21
piece handle=c-2200216847-20210920-06 comment=API Version 2.0,MMS Version 19.0.0.1
Finished Control File and SPFILE Autobackup at 20-SEP-21
released channel: sbt1

RMAN> list backup of datafile 3 completed after 'sysdate -5/1440';


List of Backup Sets
===================


BS Key Type LV Size
------- ---- -- ----------
118371 Incr 1 41.00M
List of Datafiles in backup set 118371
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
3 1 Incr 3267272 20-SEP-21 NO /u01/app/oracle/oradata/CDB/sysaux01.dbf

Backup Set Copy #1 of backup set 118371
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
SBT_TAPE 00:01:42 20-SEP-21 NO TAG20210920T200003

List of Backup Pieces for backup set 118371 Copy #1
BP Key Pc# Status Media Piece Name
------- --- ----------- ----------------------- ----------
118372 1 AVAILABLE Recovery Appliance (PRZDRDB) CDB_2o09ihu3_88_1_1

Backup Set Copy #2 of backup set 118371
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ --------------- ---------- ---
SBT_TAPE 00:01:42 20-SEP-21 NO TAG20210920T200003

List of Backup Pieces for backup set 118371 Copy #2
BP Key Pc# Status Media Piece Name
------- --- ----------- ----------------------- ----------
118420 1 AVAILABLE Recovery Appliance (SEZDRDB) RA_SBT_CDB_610847228_112728_2o09ihu3_1_2_118371

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
118411 Incr 1 7.82M SBT_TAPE 00:00:10 20-SEP-21
BP Key: 118412 Status: AVAILABLE Compressed: YES Tag: TAG20210920T200003
Handle: VB$_610847228_118410I Media:
List of Datafiles in backup set 118411
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
3 1 Incr 3267272 20-SEP-21 NO /u01/app/oracle/oradata/CDB/sysaux01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
118415 Incr 0 155.27M SBT_TAPE 00:00:10 20-SEP-21
BP Key: 118416 Status: AVAILABLE Compressed: YES Tag: TAG20210920T200003
Handle: VB$_610847228_118410_3 Media:
List of Datafiles in backup set 118415
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
3 0 Incr 3267272 20-SEP-21 NO /u01/app/oracle/oradata/CDB/sysaux01.dbf

REPLICATION OF LEVEL 1 BACKUP AND VIRTUAL BACKUP CREATION ON SECONDARY ZDLRA

CONNECT TO SECONDARY ZDLRA 

[oracle@prdb01 ~]$ rman target / catalog /@dr_zdlra_se

Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 20 20:03:30 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

connected to target database: CDB (DBID=2200216847)
connected to recovery catalog database
recovery catalog schema version 21.01.00.00. is newer than RMAN version

RMAN> list backup of datafile 3 completed after 'sysdate -5/1440';


List of Backup Sets
===================


BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
217347 Incr 1 7.82M SBT_TAPE 00:01:42 20-SEP-21
BP Key: 217348 Status: AVAILABLE Compressed: YES Tag: TAG20210920T200003
Handle: VB$_2950937840_217346I Media:
List of Datafiles in backup set 217347
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
3 1 Incr 3267272 20-SEP-21 NO /u01/app/oracle/oradata/CDB/sysaux01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
217351 Incr 0 155.27M SBT_TAPE 00:01:42 20-SEP-21
BP Key: 217352 Status: AVAILABLE Compressed: YES Tag: TAG20210920T200003
Handle: VB$_2950937840_217346_3 Media:
List of Datafiles in backup set 217351
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- --------- ----------- ------ ----
3 0 Incr 3267272 20-SEP-21 NO /u01/app/oracle/oradata/CDB/sysaux01.dbf

Next Hands-On Lab

Updated on May 18, 2024

Was this article helpful?

Related Articles

Leave a Comment