Scenario 5: Prepare the Databases for DG PDB

Connect to each container database and open the PDBs if they are not already open:
SQL> ALTER PLUGGABLE DATABASE ALL OPEN; 
Pluggable database altered.
The following SQL query can be used to check the open mode of the PDBs in a container database:
SQL> SELECT name, open_mode FROM v$pdbs; 
NAME                 OPEN_MODE 
-------------------- ---------- 
PDB$SEED             READ ONLY 
BOS_SALES            READ WRITE 
BOS_ACCT             READ WRITE 
BOS_FINANCE          READ WRITE
The Data Guard broker EDIT CONFIGURATION PREPARE DGPDB command assumes that the source container database and target container database configurations have been configured and are enabled. During execution, the command prompts the user to enter a password for the DGPDB_INT account for each of the container databases and then configures the internal structures required to provide Data Guard protection or change roles for a PDB.
DGMGRL> EDIT CONFIGURATION PREPARE DGPDB; 
Enter password for DGPDB_INT account at boston: 
Enter password for DGPDB_INT account at newyork: 
Prepared Data Guard for Pluggable Database at newyork. 
Prepared Data Guard for Pluggable Database at boston. 
Continue to use this DGMGRL session in the next scenario.