Oracle Data Guard 19c Masterclass – part 3: Standby Server & Oracle/Grid Preparation

Objective

Before creating the standby database, we need to prepare the entire standby infrastructure.

Our target environment is:

                    PRIMARY SITE
                 ┌─────────────────┐
                 │ Oracle RAC 19c  │
                 │                 │
                 │ PRODDB          │
                 │ RAC1 + RAC2     │
                 └────────┬────────┘
                          │
                    Data Guard
                     Network
                          │
                          ▼
                 ┌─────────────────┐
                 │  DR SITE        │
                 │                 │
                 │ Oracle RAC 19c  │
                 │ PRODDB_DR       │
                 │ RAC1 + RAC2     │
                 └─────────────────┘

And underneath:

Oracle RAC
    │
    ▼
Grid Infrastructure
    │
    ▼
ASM
    │
    ├── +DATA
    └── +RECO

The important principle is:

Data Guard is a database technology, but a production Data Guard environment depends heavily on the underlying OS, network, Grid Infrastructure, ASM and Oracle software.

1. Standby Server Sizing

The first mistake I see in Data Guard implementations is sizing the standby only according to the database size.

For example:

Primary database = 10 TB
Standby storage = 10 TB

This is not sufficient planning.

The standby needs capacity for:

Datafiles
+
Tempfiles
+
Online redo logs
+
Standby redo logs
+
FRA
+
Archived redo
+
Flashback logs
+
Future database growth

A more realistic calculation might be:

Database                  10 TB
Expected growth            2 TB
FRA                        2 TB
Standby redo              100 GB
Operational margin         2 TB
--------------------------------
Recommended capacity      16+ TB

The actual sizing depends on your recovery strategy.

2. CPU and Memory

The standby must be able to apply redo at least as fast as the primary generates it during sustained peaks.

Don’t think:

Primary:
32 CPU / 256 GB RAM

Standby:
16 CPU / 128 GB RAM

is automatically acceptable.

It may work for a lightly loaded database.

But if your primary generates:

500 GB/hour

during a batch window, the standby needs sufficient CPU, memory and I/O throughput to process that workload.

3. Standby Hostname

Let’s assume:

Primary:

prod-rac01
prod-rac02

Standby:

dr-rac01
dr-rac02

Check:

hostname
hostname -f

Example:

dr-rac01.wadhahdaouehi.tn

Make sure hostname resolution is consistent.

4. /etc/hosts

In environments where DNS is not fully implemented, verify:

cat /etc/hosts

Example:

192.168.10.101  prod-rac01
192.168.10.102  prod-rac02

192.168.20.101  dr-rac01
192.168.20.102  dr-rac02

For RAC, you also need the appropriate:

Public IP
Private interconnect
VIP
SCAN

addresses.

5. DNS Is Preferable

For a serious production RAC/Data Guard implementation, DNS is generally preferable to maintaining large manually managed /etc/hosts files.

Verify:

nslookup dr-rac01
nslookup dr-rac02

and:

nslookup dr-scan

Also verify reverse resolution where required:

nslookup 192.168.20.101

6. Network Architecture

We should have separate logical paths for:

Application traffic
        |
        v
Public network

RAC interconnect
        |
        v
Private network

Data Guard transport
        |
        v
Primary ↔ Standby network

For example:

PRIMARY SITE

+-----------------------------+
| RAC1                        |
|                             |
| Public ────────────────┐    |
| Private ───────────┐   |    |
+--------------------|---|----+
                     |   |
+--------------------|---|----+
| RAC2                |   |    |
|                     |   |    |
+---------------------|---|----+
                      |   |
                Data Guard
                      |
======================|================
                      |
                DR NETWORK
                      |
+---------------------|----+
| DR RAC1                  |
+--------------------------+
                      |
+---------------------|----+
| DR RAC2                  |
+--------------------------+

7. Test Network Latency

From primary:

ping dr-rac01

Then:

ping dr-rac02

But ping is only a basic test.

For Data Guard, we care about:

Latency
Bandwidth
Packet loss
TCP connectivity
Oracle Net

8. Test TCP 1521

From primary:

nc -zv dr-rac01 1521

or:

nc -zv dr-rac02 1521

Expected:

Connection to dr-rac01 1521 port [tcp/*] succeeded!

If nc isn’t installed:

telnet dr-rac01 1521

where permitted.

9. Measure Bandwidth

For a serious Data Guard implementation, use something such as:

iperf3

For example, on standby:

iperf3 -s

On primary:

iperf3 -c dr-rac01

This gives a much more meaningful view of the network available for Data Guard transport.

Remember:

10 Gb Ethernet does not necessarily mean you will get 10 Gb/s of usable Data Guard throughput.

10. Linux Kernel Parameters

For Oracle/Grid installations, verify the operating system configuration.

Examples include:

sysctl -a | grep -E 'shm|sem|file-max'

and:

ulimit -a

The exact values should follow the Oracle 19c installation requirements for your operating system and Grid Infrastructure version.

Don’t blindly copy kernel parameters from an old Oracle 11g tutorial.

11. Oracle Users and Groups

Verify:

id oracle
id grid

For a typical RAC/Grid environment:

grid
oracle

with groups such as:

oinstall
dba
oper
asmadmin
asmdba
asmoper

The exact group configuration depends on your installation design.

12. Oracle Inventory

Check:

cat /etc/oraInst.loc

Example:

inventory_loc=/u01/app/oraInventory
inst_group=oinstall

Make sure the Oracle inventory is correct before installing Grid/Database software.

13. Grid Infrastructure

If the standby is RAC + ASM, Grid Infrastructure must be prepared before the database.

Architecture:

Operating System
       |
       v
Grid Infrastructure
       |
       +---- Clusterware
       |
       +---- ASM
       |
       +---- SCAN
       |
       +---- VIP
       |
       +---- Listeners
       |
       v
Oracle Database

This is why we’re treating Grid preparation separately from RMAN.

14. Check CRS

Once Grid Infrastructure is installed:

crsctl check crs

Expected:

CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

15. Check Cluster Nodes

olsnodes -n -s

Example:

dr-rac01    1    Active
dr-rac02    2    Active

Then:

crsctl status resource -t

You should see the cluster resources.

16. Verify ASM

Connect:

sqlplus / as sysasm

Then:

SELECT name,
       state,
       type,
       total_mb,
       free_mb,
       usable_file_mb
FROM v$asm_diskgroup
ORDER BY name;

Expected:

NAME    STATE  TYPE  TOTAL_MB  FREE_MB
------- ------ ----- --------- --------
DATA    MOUNTED NORMAL ...
RECO    MOUNTED NORMAL ...

17. ASM Disk Groups

Our standard architecture:

+DATA
   |
   +-- Database datafiles
   +-- Controlfiles
   +-- Online redo
   +-- Standby redo

+RECO
   |
   +-- FRA
   +-- Archived logs
   +-- Flashback logs

You can adapt this to your organization’s storage architecture.

18. ASM Capacity Check

Run:

SELECT name,
       ROUND(total_mb/1024,2) total_gb,
       ROUND(free_mb/1024,2) free_gb,
       ROUND(usable_file_mb/1024,2) usable_gb
FROM v$asm_diskgroup
ORDER BY name;

This gives a useful human-readable view.

19. Oracle 19c Software

Install the same Oracle Database major release on the standby.

Verify:

$ORACLE_HOME/OPatch/opatch lspatches

Compare with primary.

For example:

PRIMARY
19.25

STANDBY
19.25

The exact RU depends on your current environment.

20. Why Patch Consistency Matters

Suppose:

Primary = RU X
Standby = RU X-3

You may encounter incompatibilities or operational restrictions.

For a production Data Guard architecture, maintain a controlled patching strategy.

Later in the Masterclass we’ll discuss:

Data Guard rolling patching and standby-first patching strategies.

21. Oracle Home Validation

On standby:

$ORACLE_HOME/bin/sqlplus -v

Example:

SQL*Plus: Release 19.0.0.0.0

Then:

$ORACLE_HOME/OPatch/opatch version

Verify OPatch itself is at an appropriate level.

22. Environment Variables

Example:

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

For Grid:

export GRID_HOME=/u01/app/19.0.0/grid

Don’t mix:

ORACLE_HOME
GRID_HOME

They serve different purposes.

23. Oracle Net Configuration

Now we reach one of the most important parts.

The primary must be able to resolve the standby.

Example:

PRODDB_DR =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = dr-scan.example.com)
      (PORT = 1521)
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PRODDB_DR)
    )
  )

And the standby should have an entry for the primary:

PRODDB =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = prod-scan.example.com)
      (PORT = 1521)
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PRODDB)
    )
  )

The actual services will depend on your RAC configuration.

24. Test TNS

Primary:

tnsping PRODDB_DR

Standby:

tnsping PRODDB

Then test SQL*Net:

sqlplus sys@PRODDB_DR as sysdba

and:

sqlplus sys@PRODDB as sysdba

25. Static Listener Preparation

Before the standby database is open, dynamic registration may not be available.

Therefore, for some build procedures, a static listener entry is useful.

Example:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = PRODDB_DR)
      (ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)
      (SID_NAME = PRODDB)
    )
  )

Then:

lsnrctl reload

Again, RAC environments should use the appropriate Grid-managed listener/service configuration.

26. Password File

Prepare the password file according to the RAC architecture.

Verify:

SHOW PARAMETER remote_login_passwordfile;

Expected:

EXCLUSIVE

The primary and standby must be able to authenticate using the appropriate SYS credentials.

27. Standby Directory Structure

For a filesystem environment, you might have:

/u01/app/oracle
/u01/app/oracle/product/19.0.0/dbhome_1
/u02/oradata
/u03/fra

With ASM:

+DATA
+RECO

the database files will be managed by ASM instead.

For our masterclass, we’ll focus primarily on ASM-based Data Guard, because that maps well to enterprise RAC environments.

28. Firewall

Check firewall configuration:

firewall-cmd --list-all

or:

iptables -L -n

You need the required Oracle Net ports to be reachable.

Typical:

1521/TCP

But don’t open ports unnecessarily.

29. SELinux

Check:

getenforce

If SELinux is enforcing, follow your organization’s Oracle support/security configuration rather than simply disabling it.

This is important:

A Data Guard implementation should not solve a networking problem by weakening the server security posture.

30. Time Synchronization

RAC and Data Guard environments should have consistent system time.

Check:

timedatectl

and:

chronyc sources -v

You want a healthy time synchronization service.

31. Cluster Time

For RAC:

crsctl check ctss

Depending on your Grid Infrastructure configuration, Oracle Cluster Time Synchronization Service may be used.

The important thing is that the cluster’s time configuration is healthy and consistent.

32. Verify Services

On the standby RAC:

srvctl status database -d PRODDB_DR

Initially, the database may not yet be registered because we haven’t created it.

That’s expected.

At this stage we’re validating the infrastructure, not the database.

33. What Should Exist Before RMAN?

Before Part 4, we want:

DR SERVER
   |
   +-- Linux ready
   |
   +-- Grid Infrastructure
   |
   +-- ASM
   |     +-- +DATA
   |     +-- +RECO
   |
   +-- Oracle 19c
   |
   +-- Oracle Net
   |
   +-- Listener
   |
   +-- Password authentication
   |
   +-- Network connectivity
   |
   +-- Storage capacity

Only then do we create:

PRODDB_DR

34. Final Pre-RMAN Validation

Operating System
hostname
cat /etc/hosts
timedatectl
ulimit -a
Network
ping prod-rac01
tnsping PRODDB
nc -zv prod-scan 1521
Grid
crsctl check crs
olsnodes -n -s
crsctl status resource -t
ASM
asmcmd lsdg
Database software
sqlplus -v
$ORACLE_HOME/OPatch/opatch lspatches

35. Expert-Level Checklist

Before moving to RMAN:

┌──────────────────────────────────────────┐
│       STANDBY INFRASTRUCTURE             │
├──────────────────────────────────────────┤
│ ✓ CPU / RAM sizing                       │
│ ✓ Storage sizing                         │
│ ✓ Network bandwidth                      │
│ ✓ Network latency                        │
│ ✓ DNS / hostname resolution              │
│ ✓ Firewall                               │
│ ✓ Oracle users/groups                    │
│ ✓ Grid Infrastructure                    │
│ ✓ Clusterware                            │
│ ✓ ASM                                    │
│ ✓ +DATA                                  │
│ ✓ +RECO                                  │
│ ✓ Oracle 19c Home                        │
│ ✓ Patch/RU consistency                   │
│ ✓ Oracle Net                             │
│ ✓ Listener                               │
│ ✓ Static registration where required     │
│ ✓ Password file                          │
│ ✓ Time synchronization                   │
└──────────────────────────────────────────┘

Bookmark the permalink.
Loading Facebook Comments ...

Leave a Reply