Posts

Restoring a PDB Backup into a New CDB

According to Oracle Backup and Recovery documentation, restoring a Pluggable Database (PDB) normally requires access to the backup of the Container Database (CDB) that originally hosted the PDB. Without the source CDB metadata, restoring a standalone PDB backup is generally not possible. However, there is an alternative approach that can sometimes be used to recover a PDB backup and plug it into a different CDB. Although this method is not guaranteed to work in every scenario, it is a useful technique to be aware of when designing backup and recovery strategies. In this example, we will back up a PDB named RMANPDB, transfer the backup to another server, and restore it into a completely new CDB. Backing Up the PDB First, verify that the PDB exists and is open: Connected to: Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production Version 21.3.0.0.0 SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- -----------------------------...

Oracle 26ai — Enhancements to Data Dictionary Views for Partitioning

  In data dictionary views related to partitioning, the HIGH_VALUE column is one of the most frequently used attributes. However, its datatype is LONG , which comes with several limitations and restrictions. To address these limitations, Oracle AI Database 26ai introduces two additional columns, HIGH_VALUE_CLOB and HIGH_VALUE_JSON , allowing partition high values to be represented in more convenient formats. The following example creates an interval-partitioned table: SQL > create table tb( 2 id number, 3 date_ date 4 ) 5 partition by range ( date_ ) 6 interval ( numtoyminterval( 1 , 'YEAR' )) 7 ( 8 PARTITION p2022 VALUES LESS THAN (TO_DATE( '2023/01/01' , 'YYYY/MM/DD' )), 9 PARTITION p2023 VALUES LESS THAN (TO_DATE( '2024/01/01' , 'YYYY/MM/DD' )), 10 PARTITION p2024 VALUES LESS THAN (TO_DATE( '2025/01/01' , 'YYYY/MM/DD' )) 11 ); Table created To display partition ...

Oracle Data Guard 26ai: Restricting Switchover and Failover Targets with PrimaryDatabaseCandidates

  Oracle AI Database 26ai introduces a useful enhancement for Data Guard environments that contain multiple standby databases. The new PrimaryDatabaseCandidates Data Guard Broker property allows administrators to explicitly define which databases are eligible to assume the primary role during switchover or failover operations. This feature is particularly valuable in environments where some standby databases are dedicated to disaster recovery while others are used for reporting, testing, cloning, or other non-production purposes. *The PrimaryDatabaseCandidates property is available starting with Oracle Database 19.26 Release Update (RU). Test Environment For this test, I configured a Data Guard environment consisting of one primary database and two physical standby databases. DGMGRL> show configuration Configuration - DB2 Protection Mode: MaxPerformance Members: DB2 - Primary database dg1 - Physical standby database dg2 - Physical standby database...

26ai- Using Tags in Oracle Data Guard Broker

  Oracle AI Database 26ai adds tagging support to Oracle Data Guard Broker, allowing administrators to attach custom metadata to configuration members. With tags, you can attach your own information to Data Guard members. Think of it as adding labels to databases so they become easier to identify later. For example, you may want to store: * Deployment location * Environment type * Build date * Owner team * Compliance information Before using tags, the feature must be enabled. DGMGRL> EDIT CONFIGURATION SET PROPERTY TagMode= 1 ; Property "tagmode" updated In this demo, I added two tags to the member dg1. The first tag stores the location of the database: DGMGRL > EDIT MEMBER dg1 SET TAG location = 'BABOL' ; Tag "location" updated in "dg1". The second tag stores a configuration date: DGMGRL > EDIT MEMBER dg1 SET TAG configuation_date = '2026-02-25' ; Tag "configuation_date" updated in "dg1". Now we c...

Automatic temp file creation on the standby - Oracle AI Database 26ai

Image
  In Oracle Database 19c, when a tempfile is added on the primary database, it is   not automatically created   on the physical standby database. This is because Oracle does not generate redo for tempfile-related DDL operations (such as creating, adding, resizing, or dropping tempfiles). Behavior in Oracle Database 19c For example, when creating a temporary tablespace on the primary database(19c): — Primary SQL > create temporary tablespace TEMP1404; Tablespace created. SQL > select ts# from v$tablespace where NAME = 'TEMP1404' ; TS# ---------- 15 SQL > select name from v$tempfile where ts# = 15 ; NAME -------------------------------------------------------------------------------- + DATA / HUME / B3AE49A3735D8867E053088A210A341D / TEMPFILE / temp1404 .807 .1225812657 On the standby database, although the tablespace metadata exists, the tempfile itself is not created: — Data Guard SQL > select ts# from v$tablespace where NAME = 'TE...