La versión 21c viene con un sinnúmero de nuevas características muy interesante, una de ellas llamada PREPARE DATABASE FOR DATA GUARD, que sirve para realizar las configuraciones básicas en el servidor primario al momento de crear una base de datos con Dataguard (no genera el Broker en sí).

Recordar que la versión 21c es Innovation Release , de la documentación de Oracle
- Innovation Release:
In between Oracle Database Long Term Releases, Oracle delivers Oracle Database Innovation Releases that include many enhancements and new capabilities which will also be included in the next Long Term Release. Innovation Releases are designed to enable customers to continuously use leading-edge technologies to rapidly develop or deploy new applications or augment existing applications. Support for Innovation Releases includes at least 2 years of Premier Support, but there is no Extended Support. Production workloads can be deployed on Innovation Releases if upgrading to the next database release within one year after the next database release ships is factored into the deployment plan.
Imaginemos la siguiente arquitectura:
- RAC (Real Application Cluster) versión 21c de 2 nodos
- Un base en contenedor con 2 PDBs
- Instancias en modo NOARCHIVELOG
- Sin FlashBack database activado
- Sin Dataguard Broker
Nos conectamos a Dataguard Broker Manager y ejecutamos el comando PREPARE DATABASE FOR DATAGUARD, mostrando la configuración que puede soportar con el comando help prepare
[oracle@rac01 ~]$ dgmgrl /
DGMGRL for Linux: Release 21.0.0.0.0 - Production on Wed Oct 20 22:09:39 2021
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "base"
Connected as SYSDG.
DGMGRL> help prepare
Prepare a primary database for a Data Guard environment.
Syntax:
PREPARE DATABASE FOR DATA GUARD
[WITH [DB_UNIQUE_NAME IS ]
[DB_RECOVERY_FILE_DEST IS ]
[DB_RECOVERY_FILE_DEST_SIZE IS ]
[BROKER_CONFIG_FILE_1 IS ]
[BROKER_CONFIG_FILE_2 IS ]];
DGMGRL>
Ejecutamos el siguiente comando en nuestra dgmgrl de la base primaria (los parámetros junto con sus valores son opcionales). con el siguiente comando ya el PREPARE hace modificaciones a nuestra base de datos.
Recordar que este comando sube y baja la base por ende no se debe ejecutar sin una ventana de trabajo previamente solicitada
DGMGRL> prepare database for data guard
with db_unique_name is prod
;
Y su salida la podemos ver en el siguiente cuadro:
DGMGRL> prepare database for data guard
with db_unique_name is prod
;
Preparing database "prod" for Data Guard.
Initialization parameter DB_FILES set to 1024.
Initialization parameter LOG_BUFFER set to 268435456.
Primary database must be restarted after setting static initialization parameters.
Primary database must be restarted to enable archivelog mode.
Shutting down database "prod".
Database closed.
Database dismounted.
ORACLE instance shut down.
Starting database "prod" to mounted mode.
ORACLE instance started.
Database mounted.
Initialization parameter DB_FLASHBACK_RETENTION_TARGET set to 120.
Initialization parameter DB_LOST_WRITE_PROTECT set to 'TYPICAL'.
RMAN configuration archivelog deletion policy set to SHIPPED TO ALL STANDBY.
Adding standby log group size 209715200 and assigning it to thread 1.
Adding standby log group size 209715200 and assigning it to thread 1.
Adding standby log group size 209715200 and assigning it to thread 1.
Initialization parameter STANDBY_FILE_MANAGEMENT set to 'AUTO'.
Initialization parameter DG_BROKER_START set to TRUE.
Database set to FORCE LOGGING.
Database set to ARCHIVELOG.
Database set to FLASHBACK ON.
Database opened.
Algunas consideraciones a tener en cuenta posteriores a la ejecución del comando :
- Se baja y sube la base origen, por lo mismo tener mucho cuidado al momento de ejecutar el comando
- Se deja en modo FORCE LOGGING
- Se deja en modo FLASHBACK
- Se deja la base en modo ARCHIVELOG, recordar que se deja en modo ARCHIVELOG al CDB y que los PDBs comparten los mismos redologs, por ende no se puede dejar un PDB sólo en ARCHIVELOG, quedan todos los PDBs de un CDB en modo ARCHIVELOG 🙂
- Se configuran los archivos de broker
- Log_buffer de 256Mb
- NO genera la configuración del Broker, sino que solamente las configuraciones básicas para crear una Standby con un Dataguard.
- Se crean los Standby Redologs por cada thread de base de datos
Extracto de la documentación de 21c sobre creación de Standby Redo Groups

Documentación oficial
Comando Prepare Database for Dataguard
Comando Prepare Database for Dataguard
Espero les sirva de orientación 😉