Wednesday, April 8, 2026

Oracle Data Guard 26ai New Features and Enhancements

 Oracle Data Guard 26ai (and 21c onwards) 

  • Faster role transitions – Reduces switchover and failover time by optimizing role change workflows
  • Minimized stall in Maximum Performance – Lowers commit latency while maintaining near‑real‑time protection.
  • Choice of Lag Type for Fast‑Start Failover – Allows failover decisions based on apply lag or transport lag.
  • Faster DML Redirection – Improves performance when redirecting writes during role transitions.
  • Fast‑Start Failover Observer Priority (21c) – Enables prioritized observers to control failover decisions.
  • Up to four Fast‑Start Failover Observers (21c) – Provides higher availability by supporting multiple observers.
  • Rolling Upgrade with Application Continuity – Enables zero‑downtime upgrades while preserving session state.
  • Multiple ASYNC connections – Improves redo transport throughput and resiliency with parallel async paths.
  • Automatic preparation of primary and standby – Automates configuration steps to simplify Data Guard setup.
  • Data Guard Broker PL/SQL API – Allows programmatic management and automation of Data Guard operations.
  • SQLcl support for Data Guard commands (21c) – Enables managing Data Guard directly from SQLcl.
  • ORDS support for Data Guard (21c) – Exposes Data Guard management and monitoring via REST APIs.
  • Show / edit all members at once – Simplifies configuration by allowing bulk updates across members.
  • JSON output for DGMGRL – Provides machine‑readable output for easier integration and automation.
  • Prevent standby databases from becoming primary – Enforces role protection to avoid unintended failovers.
  • Configuration and member tagging – Improves organization and identification of Data Guard components.
  • Automatic standby tempfile creation – Automatically synchronizes tempfiles between primary and standby.
  • PDB Recovery Isolation – Enables recovery operations at the individual PDB level without affecting others.
  • Easy AWR snapshots on the standby – Simplifies performance diagnostics directly on standby databases.
  • Strict database validation – Ensures configuration correctness before switchover or failover operations.
  • Switchover and Failover Readiness – Clearly reports whether the environment is safe for role transitions.
  • Easier tracking of role transitions – Enhances visibility and auditing of role change events.
  • New view V$DG_BROKER_PROPERTY – Provides real‑time visibility into Data Guard Broker properties.
  • New command: VALIDATE DGConnectIdentifier – Verifies network connectivity used by Data Guard.
  • Easier checking of Fast‑Start Failover configurations – Simplifies validation of FSFO setup and health.
  • Fast‑Start Failover Lag Histogram – Visualizes redo lag trends to fine‑tune failover settings.
  • Enhanced observer diagnostic – Improves troubleshooting with richer observer health and status data.
  • Fast‑Start Failover Configuration Validation – Proactively detects configuration issues before failures occur.
  • Offload AI Inference and Vector Search to Oracle Active Data Guard – Runs AI and vector workloads on standby to offload the primary.

Monday, March 23, 2026

Key Differences & 19c Best Practices (AMM and ASMM)

Key Differences between AMM and ASMM & 19c Best Practices


AMM (Automatic Memory Management) -  (MEMORY_TARGET):

How it works: Oracle automatically distributes memory between SGA and PGA.


Pros: Simplest to configure; dynamic resizing across both areas.


Cons: Incompatible with HugePages, which are crucial for performance in large systems. Can have issues with /dev/shm on Linux.


Recommendation: Suitable for testing or small instances (< 4GB SGA).


ASMM (Automatic Shared Memory Management) - (SGA_TARGET):

How it works: Oracle automatically tunes SGA components (buffer cache, shared pool) but PGA is managed separately.


Pros: Recommended for production; supports HugePages for better performance, reduces OS paging.


Cons: Requires manual tuning of PGA_AGGREGATE_TARGET.


19c Context: Oracle 19c generally recommends ASMM (using SGA_TARGET and PGA_AGGREGATE_TARGET) for production environments over AMM to ensure optimal memory management and stability


Which is better for minimizing swap usage? ASMM vs AMM

Which is better for minimizing swap usage?


 AMM (Automatic Memory Management)

  • MEMORY_TARGET 

 ASMM (Automatic Shared Memory Management) 

  • SGA_TARGET


In most real-world Oracle deployments, using manual memory management (i.e., SGA_TARGET + PGA_AGGREGATE_TARGET) results in lower swap usage than MEMORY_TARGET / MEMORY_MAX_TARGET.


Why MEMORY_TARGET causes more swap usage

Automatic Memory Management (AMM), which uses:


MEMORY_TARGET

MEMORY_MAX_TARGET


requires a Linux system to allocate a large shared memory segment plus additional OS memory for management.

On Linux, AMM uses /dev/shm (tmpfs), and if its size is less than MEMORY_TARGET, Oracle falls back to regular pages, increasing swap pressure.

Problems with MEMORY_TARGET:


Tends to cause kernel swapping due to dynamic resizing of SGA/PGA.

Additional overhead for memory rebalancing.

On NUMA servers, AMM can mismatch memory locality → more swap.

Oracle itself recommends NOT using AMM on production systems.


Oracle Docs: AMM is mainly recommended for small dev/test systems, not production.


Why SGA_TARGET results in lower swap usage

SGA_TARGET uses Automatic Shared Memory Management (ASMM).

Memory is allocated in huge pages (if enabled), giving performance and eliminating swap spikes.

With:


SGA_TARGET (or even SGA_MAX_SIZE)

PGA_AGGREGATE_TARGET


Oracle uses memory more predictably:


Benefits:


Stable memory footprint → no resizing storms.

Huge Pages support → swap is effectively zero.

No tmpfs (/dev/shm) dependency.

Fits well with modern Linux kernel memory management.


Oracle recommends ASMM for production databases.


Winner for swap control: SGA_TARGET (ASMM) If your goal is:

  •  avoid swap
  •  maintain predictable memory usage
  •  use huge pages
  •  ensure performance stability

Use SGA_TARGET + PGA_AGGREGATE_TARGET (ASMM).


Recommended Production Setup:


MEMORY_TARGET=0

MEMORY_MAX_TARGET=0


SGA_TARGET=<value>

SGA_MAX_SIZE=<value>


PGA_AGGREGATE_TARGET=<value>


Enable Huge Pages on Linux for optimal performance.


Monday, March 16, 2026

Oracle AI Database Free support Platforms and Connectivity

Oracle AI Database 26ai – Supported Free Platforms


The Oracle AI Database 26ai Free tier can be deployed on the following platforms:


  • Oracle Linux 8 (OL8 / RHEL 8)
  • Oracle Linux 9 (OL9 / RHEL 9)
  • Oracle Linux 8 for ARM (aarch64)
  • Docker / Podman
  • Oracle VirtualBox
  • Microsoft Windows (64‑bit)



Client Tools and Languages for Connecting to Oracle AI Database Free

You can connect to Oracle AI Database Free using a wide range of tools and programming languages:

Database Tools


  • SQLcl
  • SQL*Plus


Programming Languages


  • Java
  • Python
  • Node.js
  • C# / .NET
  • PHP
  • Ruby
  • Go



Official Reference

For detailed setup instructions and downloads, please refer to the official Oracle page:

🔗 https://www.oracle.com/in/database/free/get-started/

Thursday, March 12, 2026

How to switch/connect with other database (demo)?

 


postgres=#

postgres=#

postgres=#

postgres=# \c demo

You are now connected to database "demo" as user "postgres".

demo=#

demo=#

demo=# \l demo

 demo | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           |


How to create database in PostgreSQL ?

 

postgres=#

postgres=#

postgres=# create database demo;

CREATE DATABASE

postgres=#

postgres=# \l

 demo      | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           |

 postgres  | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           |

 template0 | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           | =c/postgres          +

           |          |          |                 |                    |                    |        |           | postgres=CTc/postgres

 template1 | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           | =c/postgres          +

           |          |          |                 |                    |                    |        |           | postgres=CTc/postgres


postgres=#

PostgreSQL : 'more' is not recognized as an internal or external command, operable program or batch file.

 postgres=#

postgres=#

postgres=#

postgres=# \l

'more' is not recognized as an internal or external command,

operable program or batch file.

postgres=#

postgres=#



postgres=# \l

'more' is not recognized as an internal or external command,

operable program or batch file.

postgres=#




This happens in psql on Windows when the MORE command is missing or overridden in the system PATH.

psql uses the system pager (more) to display long output like \l, \dt, etc.



postgres=#

postgres=# \pset pager off

Pager usage is off.

postgres=#

postgres=# \l

                                                            List of databases

   Name    |  Owner   | Encoding | Locale Provider |      Collate       |       Ctype        | Locale | ICU Rules |   Access privileges

-----------+----------+----------+-----------------+--------------------+--------------------+--------+-----------+-----------------------

 postgres  | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           |

 template0 | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           | =c/postgres          +

           |          |          |                 |                    |                    |        |           | postgres=CTc/postgres

 template1 | postgres | UTF8     | libc            | English_India.1252 | English_India.1252 |        |           | =c/postgres          +

           |          |          |                 |                    |                    |        |           | postgres=CTc/postgres

(3 rows)


postgres=#

postgres=#

Oracle Data Guard 26ai New Features and Enhancements

  Oracle Data Guard 26ai (and 21c onwards)  Faster role transitions – Reduces switchover and failover time by optimizing role change workfl...