26aiCDB/PDBData Guard

Oracle AI Database 26ai: Setting Up DGPDB Between Two Primary CDBs

By August 21, 2026No Comments11 min read

Introduction

Traditional Oracle Data Guard protects an entire database. Typically, one CDB operates as the primary database in read write mode, while another CDB operates as a physical standby. Redo generated by the primary is transported and applied to the standby, and a switchover or failover changes the role of the complete database.

Oracle AI Database 26ai introduces a very different architecture with Data Guard for Pluggable Databases, or DG PDB. Instead of requiring the destination CDB to become a physical standby, we can have two independent CDBs that both remain in the PRIMARY database role and continue operating read write. Data Guard protection is established only for a selected PDB. In other words, a primary read write CDB can host a PDB that acts as the physical standby for a PDB residing in another primary read write CDB.

The architecture used in this lab is:

                         Data Guard for PDB

              ggate1                         ggate2
        +----------------+             +----------------+
        |    ORCLRUH     |             |    ORCLJED     |
        |    PRIMARY     |             |    PRIMARY     |
        |   READ WRITE   |             |   READ WRITE   |
        +----------------+             +----------------+
                |                              |
                |                              |
            RUH_PDB                        JED_PDB
          Source PDB                    Target PDB
          Read Write                  Physical Standby
                |                              ^
                |                              |
                +---------- REDO --------------+

This is the key architectural difference:

The target CDB is therefore not a standby database. ORCLJED remains a normal primary CDB and can host other read write PDBs while JED_PDB operates as the physical standby for RUH_PDB. This provides much more granular protection and allows applications hosted in different PDBs to have independent Data Guard relationships and role transitions.

This article walks through the complete configuration using Oracle AI Database 26ai 23.26.1.0.0 and Data Guard Broker. The commands and outputs below are retained from the actual lab, including the configuration and troubleshooting encountered during the setup.

The source PDB is RUH_PDB and its Data Guard target is JED_PDB. Both containing CDBs remain primary databases.

Ensure the Source Primary & Target Primary DB_UNIQE_NAME is different/Unique.

SQL> alter system set db_unique_name=ORCLJED scope=spfile;

System altered.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup

Configure TNS Connectivity Between Both Servers

Add the Primary CDB/PDB TNS entries on the standby server and the target CDB/PDB TNS entries on the primary server.

RUHCDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ggate1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCLCDB)
    )
  )
RUHPDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ggate1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ruh_pdb)
    )
  )
JEDCDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ggate2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCLCDB)
    )
  )
JEDPDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ggate2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = jed_pdb)
    )
  )

Copy the password file to the second server:

[oracle@ggate1 dbs]$ scp orapwORCLCDB ggate2:/opt/oracle/product/26ai/dbhome_1/dbs/
oracle@ggate2's password:
orapwORCLCDB                                                                                                                      100% 2048     1.9MB/s   00:00
[oracle@ggate1 dbs]$

Note: The above is the original lab log as captured. Before reproducing the setup, verify that the JEDPDB host resolves to the intended target server. In this architecture the target is ggate2.

Verify Force Logging and Enable Data Guard Broker

Enable the force logging on primary database and enable the data guard broker parameter as below on both source primary and target primary

ggate1
  CDB: PRIMARY
    └── RUH_PDB   [source / primary PDB]

ggate2
  CDB: PRIMARY
    └── JED_PDB   [target / physical standby PDB]

SQL> select force_logging from v$database;

FORCE_LOGGING
---------------------------------------
YES

SQL> show parameter broker

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
connection_brokers                   string      ((TYPE=DEDICATED)(BROKERS=2)(C
                                                 ONNECTIONS=2000)), ((TYPE=EMON
                                                 )(BROKERS=1))
dg_broker_config_file1               string      /opt/oracle/product/26ai/dbhom
                                                 e_1/dbs/dr1ORCLCDB.dat
dg_broker_config_file2               string      /opt/oracle/product/26ai/dbhom
                                                 e_1/dbs/dr2ORCLCDB.dat
dg_broker_start                      boolean     FALSE
use_dedicated_broker                 string      NONE
SQL> alter system set dg_broker_start=true;

System altered.

SQL>

Create the Broker Configuration for ORCLRUH/Source

[oracle@ggate1 admin]$ dgmgrl sys/Oracle123
DGMGRL for Linux: Release 23.26.1.0.0 - Production on Tue Aug 11 07:42:30 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2026, Oracle and/or its affiliates.  All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "ORCLCDB"
Connected as SYSDBA.
DGMGRL> create configuration RUH_DGB connect identifier is ruhcdb;
Connected to "ORCLCDB"
Configuration "ruh_dgb" created with primary database "ORCLCDB"
DGMGRL> show configuration
Configuration - ruh_dgb
  Protection Mode: MaxPerformance
  Members:
  ORCLCDB - Primary database
Fast-Start Failover:  Disabled
Configuration Status:
DISABLED
DGMGRL> enable configuration;
Enabled.
DGMGRL>

Notice that this is not the conventional primary plus standby Broker configuration. At this stage RUH_DGB contains its own primary CDB.

Create the Broker Configuration for ORCLJED

In the traditional standby CDB, we add the database in the primary configuration. In PDB Level Data Guard te configuration will be unique for each source primary and target primary.

[oracle@ggate2 admin]$ . oraenv
ORACLE_SID = [ORCLCDB] ?
The Oracle base remains unchanged with value /data/app/oracle
[oracle@ggate2 admin]$ dgmgrl sys/Oracle123
DGMGRL for Linux: Release 23.26.1.0.0 - Production on Sat Aug 15 15:56:58 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2026, Oracle and/or its affiliates.  All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "ORCLCDB"
Connected as SYSDBA.
DGMGRL> create configuration JED_DGB connect identifier is JEDCDB;
Connected to "ORCLCDB"
Configuration "jed_dgb" created with primary database "ORCLCDB"
DGMGRL> show configuration
Configuration - jed_dgb
  Protection Mode: MaxPerformance
  Members:
  ORCLCDB - Primary database
Fast-Start Failover:  Disabled
Configuration Status:
DISABLED
DGMGRL> enable configuration;
Enabled.
DGMGRL>

Again, ORCLJED is itself a primary database. DG PDB links these two primary CDB Broker configurations rather than converting ORCLJED into a conventional standby CDB.

Link the Two Primary CDB Broker Configurations

Connect to the source Broker configuration:

[oracle@ggate1 dbs]$ dgmgrl sys/Oracle123@ruhcdb
DGMGRL for Linux: Release 23.26.1.0.0 - Production on Tue Aug 11 17:20:29 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2026, Oracle and/or its affiliates.  All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "ORCLRUH"
Connected as SYSDBA.
DGMGRL> add configuration jed_dgb connect identifier is jedcdb;
Configuration jed_dgb added.
DGMGRL> show configuration
Configuration - ruh_dgb
  Protection Mode: MaxPerformance
  Members:
  ORCLRUH - Primary database
  ORCLJED - Primary database in jed_dgb configuration
Fast-Start Failover:  Disabled
Configuration Status:
SUCCESS   (status updated 49 seconds ago)
DGMGRL>

This output clearly demonstrates the architecture:

ORCLRUH - Primary database
ORCLJED - Primary database in jed_dgb configuration

Both CDBs remain primary.

Prepare the Configuration for Data Guard per PDB
Now prepare both CDBs for DG PDB:

DGMGRL> edit configuration prepare DGPDB;
Enter password for DGPDB_INT account at ORCLRUH:
Enter password for DGPDB_INT account at ORCLJED:
Prepared Data Guard for Pluggable Database at ORCLJED.
Prepared Data Guard for Pluggable Database at ORCLRUH.
DGMGRL>

The prepare dgpdb operation prepares both Broker configurations to participate in PDB-level Data Guard.

Verify Source PDB Datafiles

Check the source PDB:

SQL> alter session set container=RUH_PDB;
Session altered.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/RUH_PDB/system01.dbf
/opt/oracle/oradata/ORCLCDB/RUH_PDB/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/RUH_PDB/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/RUH_PDB/users01.dbf
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/RUH_PDB/temp01.dbf
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/RUH_PDB/temp01.dbf
SQL>

The source PDB datafiles are located under: /opt/oracle/oradata/ORCLCDB/RUH_PDB/, Now start the PDB in backup mode and copy the datafiles and tempfiles to the target. Please note in 23.26.1 the procedure is manual but in recent 23.26.3 the broker itself can copy the datafiles without manual begin/end backup commands.

SQL> alter session set container=RUH_PDB;
Session altered.
SQL> alter database begin backup;
Database altered.
[oracle@ggate1 trace]$ scp /opt/oracle/oradata/ORCLCDB/RUH_PDB/*.dbf oracle@ggate2:/opt/oracle/oradata/ORCLCDB/JED_PDB/
oracle@ggate2's password:
sysaux01.dbf                                                                                                                      100%  460MB  68.3MB/s   00:06
system01.dbf                                                                                                                      100%  350MB  69.0MB/s   00:05
temp01.dbf                                                                                                                        100%   84MB  77.4MB/s   00:01
undotbs01.dbf                                                                                                                     100%  100MB  61.3MB/s   00:01
users01.dbf                                                                                                                       100% 7176KB  86.1MB/s   00:00
[oracle@ggate1 trace]$

SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/RUH_PDB/system01.dbf
/opt/oracle/oradata/ORCLCDB/RUH_PDB/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/RUH_PDB/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/RUH_PDB/users01.dbf
SQL>
SQL> alter database end backup;
Database altered.
SQL>

Join the PDB to the Data Guard as below

DGMGRL> add pluggable database jed_pdb at orcljed source is ruh_pdb at orclruh pdbfilenameconvert is "'/opt/oracle/oradata/ORCLCDB/RUH_PDB/','/opt/oracle/oradata/ORCLCDB/JED_PDB/'";
Pluggable Database "JED_PDB" added

SQL> show pdbs
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 JED_PDB                        MOUNTED
SQL> alter session set container=JED_PDB;
Session altered.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/JED_PDB/system01.dbf
/opt/oracle/oradata/ORCLCDB/JED_PDB/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/JED_PDB/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/JED_PDB/users01.dbf
SQL>

DGMGRL>  show configuration
Configuration - ruh_dgb
  Protection Mode: MaxPerformance
  Members:
  ORCLRUH - Primary database
    ORCLJED - Primary database in jed_dgb configuration
Data Guard for PDB:   Enabled in SOURCE role
Configuration Status:
SUCCESS   (status updated 59 seconds ago)
DGMGRL>

Now start the MRP on DGPDB since the configuration status is valid.

DGMGRL> edit pluggable database jed_pdb at orcljed set state='apply-on';
Succeeded.
DGMGRL> show pluggable database jed_pdb at orcljed;
Pluggable database - JED_PDB at orcljed
  Data Guard Role:     Physical Standby
  Con_ID:              4
  Source:              con_id 3 at ORCLRUH
  Transport Lag:       (unknown)
  Apply Lag:           0 seconds (computed 67 seconds ago)
  Intended State:      APPLY-ON
  Apply State:         Running
  Apply Instance:      ORCLCDB
  Average Apply Rate:  28 KByte/s
  Real Time Query:     OFF

Pluggable Database Status:
SUCCESS

Data Validation Test

Create sample user and table

alter session set container=ruh_pdb;
create user avukweb identified by Oracle123;
grant create session, create table, unlimited tablespace to avukweb;
create table avukweb.customers (
    customer_id number primary key,
    customer_name varchar2(100),
    email varchar2(100),
    city varchar2(50)
);

Insert sample data

begin
    for i in 1..20 loop
        insert into avukweb.customers values
        (i, 'customer_'||i, 'customer'||i||'@example.com', 'riyadh');

        insert into avukweb.products values
        (i, 'product_'||i, 'electronics', 100+(i*25));

        insert into avukweb.orders values
        (i, i, sysdate-i, 'completed', 500+(i*100));

        insert into avukweb.payments values
        (i, i, sysdate-i, 'credit card', 500+(i*100));
    end loop;

    commit;
end;
/
PL/SQL procedure successfully completed.
SQL> 

Connect tot he DGPDB and verify if the tables and associated data received or not

[oracle@ggate2 trace]$ sqlplus avukweb/Oracle123@jedpdb
SQL*Plus: Release 23.26.1.0.0 - Production on Sun Aug 16 02:23:52 2026
Version 23.26.1.0.0
Copyright (c) 1982, 2025, Oracle.  All rights reserved.
Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
SQL> 
select count(*) from avukweb.customers;
  COUNT(*)
----------
        20

Conclusion

We have successfully completed the Oracle Data Guard at the PDB level (DGPDB) setup from scratch between two independent Read/Write CDBs, including the complete Data Guard Broker configuration. This architecture allows selected PDBs to be protected and replicated between CDBs while both container databases continue operating independently in the Primary role.

The configuration demonstrates the flexibility of PDB-level Data Guard by providing disaster recovery protection at a more granular level without requiring the entire CDB to participate in a traditional primary-standby relationship. With Data Guard Broker managing and monitoring the configuration, DGPDB provides a streamlined and manageable approach for protecting individual pluggable databases while maintaining the operational independence of both Read/Write CDBs.

Leave a Reply