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=#

Wednesday, March 11, 2026

Important Oracle Database License Audit Checklist

 Oracle Database License Audit Checklist 


1. Perform a Comprehensive Oracle Environment Inventory (On‑Prem & Cloud)

  • Catalog every Oracle database deployment, including production, development, testing, and disaster‑recovery environments.
  • Include all infrastructure types: physical servers, virtual machines, containers, and cloud-hosted databases.
  • Record the database edition (Standard Edition, Enterprise Edition) and version (e.g.11g,19c, 21c).



2. Verify License Entitlements and Agreements

  • Map each deployment to its corresponding license type (NUP, Processor‑based).
  • Use Oracle’s Core Factor Table to correctly calculate processor requirements.
  • Review legacy contracts, existing ULAs, and any embedded licensing rights that may impact compliance.



3. Assess Feature and Option Usage

  • Use automated tools/scripts to detect usage of chargeable features such as RAC, Partitioning, Advanced Compression, etc.
  • Confirm that all enabled features are properly licensed or disable those not in use.



4. Evaluate Virtualization and Cloud Architectures

  • Track virtual machine movement across hypervisors (e.g. VMware vSphere, Nutanix ).
  • Ensure hard partitioning or affinity rules are documented and enforced where required.
  • Review Oracle workloads running on public cloud IaaS platforms like AWS, Azure, or OCI to confirm licensing alignment.



5. Prepare an Accurate and Audit‑Ready Data Package

  • Validate all data generated by LMS (License Management Services) scripts before sharing externally.
  • Avoid running Oracle‑provided audit scripts without expert review.
  • Document all licensing interpretations, configuration decisions, and control measures for audit transparency.



Note :- 

We have to very careful run any script in environment before review with experts ...... 

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 a...