Category: 26ai

  • Using Data Guard Broker to prevent a standby database becoming the primary

    I often get questions about Exadata, running Oracle Database on Exadata, and running Oracle Database in general.

    A more “general” database question I got recently—though it has an Exadata and Exascale basis—is, “How can an administrator prevent a standby database from being used in a switchover or failover event?”

    Why would you prevent a standby from being used for its core purpose?

    This needs more context. The background is that an organization plans to set up a primary database system and a DR system. They also have a nonprod (dev/test) environment in which they want production-like data to make development and testing more robust. They want to create multiple clones of a gold-image nonprod database so that, when they provide production-like data to developers, they can mask the data once and clone it many times.

    They are interested in Exascale for its ability to create database clones efficiently and quickly.

    So how does this all come together, and how does it relate to the question?

    First, a Data Guard standby database can serve as the source for subsequent database clones on Exascale. Oracle recommends using a secondary standby database for this purpose, to separate the DR function from cloning. In other words, use at least two standby databases—one for DR and one as the source of your clones.

    See the Exadata Exascale Best Practices for Database Snapshots and Clones paper for more background and details.

    The second standby database is kept up to date by the primary, as with the DR database.

    You can then create a clone from the second standby database and mask it with your favorite tool, such as Enterprise Manager, to create your gold‑image database.

    Finally, you can create database clones using gDBClone at the CDB level, or run ‘CREATE PLUGGABLE DATABASE clonepdb FROM sourcepdb SNAPSHOT COPY;’ for PDB‑level clones on Exascale.

    The resulting environment looks like this:

    This brings us closer to the initial question: How can I prevent my secondary standby database (CDB1STBY2) from being used for DR?

    Let’s come back to why this is even a question.

    The secondary standby database (CDB1STBY2) is in a separate Exadata environment—likely in a different network zone and possibly on a system not sized for the production workload.

    To prevent the secondary standby from being switched to or failed over, Data Guard Broker (starting with 19.26 and 26ai) lets you specify which databases can assume the primary role using the “PrimaryDatabaseCandidates” property. Any databases in the configuration not listed in this property cannot be switched to or failed over using Data Guard Broker.

    What does this look like in Data Guard Broker?

    DGMGRL> show configuration
    ...
       CDB1 - Primary Database
          CDB1STBY1 - Physical standby database
          CDB1STBY2 - Physical standby database
    ...
    
    DGMGRL> edit configuration set property
    > PrimaryDatabaseCandidates = 'CDB1,CDB1STBY1';
    Property "primarydatabasecandidates" updated

    If we try to switch over or fail over to CDB1STBY2 now, Data Guard Broker will prevent the operation because we told it not to allow this database to become the primary.

    DGMGRL> switchover to CDB1STBY2;
    2026-01-12T15:16:23.812-07:00
    Performing switchover NOW, please wait...
    
    Error: ORA-16529: Switchover and failover operations are restricted to databases specified in the PrimaryDatabaseCandidates configuration property.
    
    Failed.
    2026-01-12T15:16:23.954-07:00
    Unable to switchover, primary database is still "CDB1"

    And that’s it – using Data Guard Broker to prevent specific standby databases from becoming a primary database is easy, and for environments

    If you take one thing away, make it this: keep two standbys—one for DR, one for clones.

    If you take two things away, the second is that Data Guard Broker can help ensure only the databases you want to allow to become primary can take on that responsibility.

    A quick shout out to Ludovico Caldera who pointed me in the direction of this useful feature in Data Guard Broker.

    Cheers!

  • Quick Guide to Oracle Database and GI Gold Image Clone Patch Downloads for Exadata

    Quick Guide to Oracle Database and GI Gold Image Clone Patch Downloads for Exadata

    Sometimes its the little things that annoy me the most. OK, maybe its more often than sometimes.

    In today’s episode of annoying things, I was looking for the latest Oracle database and grid infrastructure gold images for Exadata so I can update my databases to Oracle AI Database 26ai (more on that in another post).

    As always, I go to the following MOS notes – 888828.1, and 888.1 – to get the desired information.

    Which give me the specific patches I need to download. (888828.1 first, followed by 888.1)

    Graphic of patches from MOS note 888828.1 for Oracle AI Database 26ai on Exadata
    Graphic of patches from MOS note 8881 for Oracle AI Database 26ai

    But here’s the thing – I want the Database and GI Gold Image Clone files for Exadata so I can use them with OEDACLI to install and update my VM clusters.

    In MOS, to find these you can search for “DB SOFTWARE CLONE” or “‘GI SOFTWARE CLONE” and do some digging to find what you’re looking for.

    But the easiest option to find this information is to use OEDA itself.

    Firstly, make sure you download the latest OEDA release from https://www.oracle.com/database/technologies/oeda-downloads.html

    Then unzip it to a location of your choosing, fire up the Web UI and walk through creating a configuration, or upload and update an existing configuration, which will give you the desired information in the installation report at the end!

    Image of OEDA installation report Appendix B with the required download files and patches

    Simple right. Sure – but its actually even easier than this.

    OEDACLI has a great little feature which gives you this same information, namely the patches you need to download, in two simple commands.

    Again, after downloading the latest OEDA release, start oedacli from the command line. You don’t need to provide a configuration file.

    ./oedacli

    Then, use the ‘list requiredfiles’ command and pass in the DB or GI versions you want information about.

    oedacli> LIST REQUIREDFILES DBVERSION=23.26.0.0.0
    
    VM_DB_FILES_23.26.0.0.0 : p38455285_2326000DBRU_Linux-x86-64.zip : db-klone-Linux-x86-64-2300026000.zip
    VM_DB_KVM_FILES_23.26.0.0.0 : p38455285_2326000DBRU_Linux-x86-64.zip : db-klone-Linux-x86-64-2300026000.zip
    BM_DB_FILES_23.26.0.0.0 : V1043785-01.zip

    And

    oedacli> LIST REQUIREDFILES GIVERSION=23.26.0.0.0
    VM_GI_FILES_23.26.0.0.0 : p38455288_2326000GIRU_Linux-x86-64.zip : grid-klone-Linux-x86-64-2300026000.zip
    VM_GI_KVM_FILES_23.26.0.0.0 : p38455288_2326000GIRU_Linux-x86-64.zip : grid-klone-Linux-x86-64-2300026000.zip
    BM_GI_FILES_23.26.0.0.0 : V1043786-01.zip

    So for the DB, I want to grab patch 38455285, and for GI I want patch 38455288.

    So what was annoying me about that? My own memory! This neat feature has been around since the around 2017 (if not earlier), but somewhere along the way I forgot about it and started doing things the hard way again…

    Oh, and while we still have oedacli running, if you want to know what software versions are supported on your generation of Exadata, the LIST SOFTWAREVERSIONS command is really helpful.

    oedacli> list softwareversions where type=X8M
    GI Versions for X8M
    11.2.0.4.210119
    12.1.0.2.220719
    12.2.0.1.220118
    18.14.0.0.210420
    19.29.0.0.251021, 19.28.0.0.250715, 19.27.0.0.250415, 19.26.0.0.250121
    23.26.0.0.0, 23.9.0.25.07, 23.8.0.25.04, 23.7.0.25.01
    Recommended GI version: 23.26.0.0.0
    
    DB Versions for X8M
    11.2.0.4.210119
    12.1.0.2.220719
    12.2.0.1.220118
    18.14.0.0.210420
    19.29.0.0.251021, 19.28.0.0.250715, 19.27.0.0.250415, 19.26.0.0.250121
    23.26.0.0.0, 23.9.0.25.07, 23.8.0.25.04, 23.7.0.25.01
    Recommended DB version: 23.26.0.0.0

    Make sure you have the appropriate support in place for any versions earlier than 19c.

    And that’s it – the easiest way to get the patch numbers for the Gold Image Clones used by OEDA and Exadata to deploy and update Oracle Database and Grid Infrastructure!