Showing posts with label ORACLE DATABASE. Show all posts
Showing posts with label ORACLE DATABASE. Show all posts

Wednesday, August 26, 2026

what is catcon.pl (Catalog Container Script) and why very useful for Oracle Multitenant Database ?

 catcon.pl (Catalog Container Script) is an Oracle utility introduced with the Multitenant Architecture (CDB/PDB) to execute SQL scripts across one or more containers (CDB root, PDBs, or all PDBs).

It is heavily used during:

  • Database upgrades
  • Patching (RU, RUR, OJVM)
  • Running Oracle supplied scripts
  • Component installation
  • Post-upgrade tasks
  • Custom DBA scripts across all PDBs

Why Oracle Created catcon.pl

Before Multitenant, if you had:

ORCL

you ran a script once:

@script.sql

With Multitenant:

CDB1
├── PDB1
├── PDB2
├── PDB3
└── PDB4

The script may need to run in:

  • CDB$ROOT
  • PDB1
  • PDB2
  • PDB3
  • PDB4

Instead of connecting manually to each container, Oracle uses catcon.pl to automate the execution.


Location

Usually located under:

$ORACLE_HOME/rdbms/admin

Check:

find $ORACLE_HOME -name catcon.pl

Common path:

$ORACLE_HOME/rdbms/admin/catcon.pl


Basic Syntax

perl catcon.pl [options] script.sql

Example:

$ORACLE_HOME/perl/bin/perl </span>
$ORACLE_HOME/rdbms/admin/catcon.pl </span>
-b test </span>
-d /tmp </span>
test.sql

Where:

  • -b = base name for logs
  • -d = script directory
  • test.sql = SQL script to execute

Execute Script on All PDBs

Example:

$ORACLE_HOME/perl/bin/perl </span>
$ORACLE_HOME/rdbms/admin/catcon.pl </span>
-b gather_stats </span>
-d /tmp </span>
gather_stats.sql

The script runs across all open containers.


Run Script Only in Specific PDB

$ORACLE_HOME/perl/bin/perl </span>
$ORACLE_HOME/rdbms/admin/catcon.pl </span>
-c 'PDB1' </span>
-b test </span>
-d /tmp </span>
script.sql

Here:

PDB1 only

is processed.


Run in Multiple PDBs

-c 'PDB1 PDB2 PDB3'

Example:

catcon.pl -c 'PDB1 PDB2 PDB3' script.sql


Exclude Specific PDBs

-C 'PDB$SEED'

Example:

catcon.pl -C 'PDB$SEED' script.sql
``


Common Options

OptionDescription
-bBase log file name
-dScript location
-cInclude containers
-CExclude containers
-nParallel execution
-lLog directory
-uUsername
-pPassword

Parallel Execution

Suppose you have 20 PDBs.

Without parallelism:

catcon.pl script.sql

Runs one at a time.

Use:

catcon.pl -n 8 script.sql

to execute in parallel across 8 PDBs.


Example: Gather Dictionary Statistics

Oracle commonly uses:

$ORACLE_HOME/perl/bin/perl </span>
$ORACLE_HOME/rdbms/admin/catcon.pl </span>
-n 4 </span>
-l /tmp/logs </span>
-b gatherstats </span>
-d $ORACLE_HOME/rdbms/admin </span>
gather_stats.sql


During Database Upgrade

After upgrading Oracle software, Oracle internally runs scripts such as:

catupgrd.sql
utlrp.sql

using catcon.

Example:

catctl.pl

internally calls:

catcon.pl

to process all PDBs.

Relationship:

catctl.pl
|
+-- catcon.pl
|
+-- Executes scripts in all containers


Example: Recompile Invalid Objects in All PDBs

Instead of:

ALTER SESSION SET CONTAINER=PDB1;
@utlrp.sql

ALTER SESSION SET CONTAINER=PDB2;
@utlrp.sql

Use:

$ORACLE_HOME/perl/bin/perl </span>
$ORACLE_HOME/rdbms/admin/catcon.pl </span>
-b utlrp </span>
-d $ORACLE_HOME/rdbms/admin </span>
utlrp.sql
``

Oracle recompiles invalid objects in all PDBs automatically.


Log Files

Suppose:

-b test
-l /tmp/logs

Oracle generates:

test0.log
test1.log
test2.log
test3.log
``

along with spool files for each container.

Very useful during:

  • Upgrades
  • PSU/RU patching
  • Component installation

How catcon Knows the Current Container

Within the SQL script, you can identify the current container:

SELECT SYS_CONTEXT('USERENV','CON_NAME')
FROM dual;
``

When executed through catcon, each container processes the script independently.


Typical Oracle Scripts Executed with catcon

utlrp.sql
catalog.sql
catproc.sql
utluiobj.sql
dbmsupgnv.sql
gather_stats.sql


Best Practices for DBAs

Execute on all open PDBs

catcon.pl -n 8 script.sql

Keep separate log directory

-l /u01/logs

Validate PDB status before execution

SHOW PDBS;

Review logs after completion

grep -i "ORA-" *.log

Exclude PDB$SEED unless Oracle documentation requires it

-C 'PDB$SEED'


catcon.pl vs catctl.pl

UtilityPurpose
catcon.plExecute scripts across CDB/PDBs
catctl.plDatabase upgrade orchestration tool
dbupgradeWrapper around catctl.pl
datapatchApplies SQL patch changes using catcon internally

In One Line

catcon.pl is Oracle's Multitenant utility that executes SQL scripts simultaneously across one or more PDBs/CDB containers, making patching, upgrades, and administrative operations manageable in environments with many PDBs.

Saturday, August 22, 2026

10000 foot level overview - High-Level Oracle 26ai Database overview and enhancement


Oracle AI Database 26ai

AI-Native, Secure, Highly Available and Developer-Friendly Database

Executive Summary

Oracle AI Database 26ai is Oracle’s long-term support, AI-native database release. It integrates AI, application development, security, high availability, analytics, and distributed data management into a single converged platform.

Key Value Proposition

  • Build enterprise AI applications directly on business data
  • Develop modern applications using SQL, JSON, Graph, Vector and JavaScript
  • Protect data consistently across users, applications and AI agents
  • Deliver mission-critical availability and global scalability
  • Reduce data movement and platform complexity

1. AI and Generative AI

Major Capabilities

  • AI Vector Search
    Performs semantic searches based on meaning rather than exact keywords.

  • Unified Hybrid Vector Search
    Combines vector, relational, text, JSON, graph and spatial searches in a single query.

  • Enterprise RAG
    Uses private business data to improve the accuracy and relevance of LLM-generated answers.

  • Select AI
    Enables users to query enterprise data using natural language.

  • Select AI Agent
    Supports governed AI agents that can retrieve information, execute database tools and perform business actions.

  • Model Context Protocol integration
    Allows AI assistants and agent frameworks to securely discover and use database tools.

  • Private Agent Factory
    Provides low-code and no-code capabilities for building private enterprise AI agents.

  • In-Database Machine Learning
    Allows organizations to train and score ML models without moving sensitive data outside the database.

Business Value

Bring AI to the data instead of moving enterprise data to separate AI platforms.


2. Modern Application Development

Major Capabilities

  • JSON-Relational Duality Views
    Applications can access the same data as JSON documents or relational tables without creating duplicate copies.

  • JavaScript Stored Procedures
    Developers can implement server-side application logic using JavaScript.

  • Operational Property Graphs
    Graph analysis can be performed directly on operational relational data using SQL.

  • Lock-Free Reservations
    Improves concurrency for highly contested data such as account balances, inventory and seat reservations.

  • Priority Transactions
    Protects critical business transactions by automatically resolving lower-priority blocking transactions.

  • Data Use Case Domains
    Centralizes reusable business definitions such as email, currency, URL and product identifiers.

  • Data Annotations
    Adds business meaning to database objects, helping AI systems better understand enterprise data.

  • Assertions
    Enforces complex business rules across multiple tables using declarative database constraints.

  • Enhanced SQL
    Includes Boolean data types, simplified queries, direct joins for updates and deletes, and tables with up to 4,096 columns.

Business Value

Accelerates application development while reducing middleware, ORM complexity and duplicate data stores.


3. Microservices and Event-Driven Applications

Major Capabilities

  • Transactional Event Queues
  • Kafka-compatible APIs
  • Database-supported Saga transactions
  • REST and JSON APIs
  • MongoDB-compatible access
  • Redis-compatible caching
  • Transaction-aware messaging
  • Lock-free concurrency controls

Business Value

Enables reliable microservices and event-driven applications while maintaining transactional consistency.


4. High Availability and Scalability

Major Capabilities

  • Oracle Real Application Clusters
    Provides active-active instance availability and horizontal database scaling.

  • Oracle Data Guard
    Delivers disaster recovery and standby database protection.

  • Active Data Guard
    Offloads read-only workloads, reporting and backups to standby databases.

  • Application Continuity
    Replays eligible application requests following recoverable failures.

  • Transaction Guard
    Determines the reliable outcome of transactions after interruptions.

  • True Cache
    Provides an automatically managed, consistent in-memory cache for read-intensive applications.

  • Online Maintenance
    Supports rolling patching, application upgrades and selected schema changes with minimal disruption.

Business Value

Maintains application availability during failures, maintenance and infrastructure changes.


5. Globally Distributed Database

Major Capabilities

  • Database Sharding
    Distributes data across multiple databases for horizontal scalability and fault isolation.

  • Directory-Based Sharding
    Provides flexible control over where tenant or customer data is stored.

  • Raft Replication
    Delivers built-in consensus-based replication and rapid failover for sharded environments.

  • Automatic Data Movement
    Automatically relocates data when a sharding key changes.

  • Geographic Data Distribution
    Helps address data residency, latency and regional availability requirements.

Business Value

Supports globally distributed applications with scale, local performance and regional fault isolation.


6. Security and Data Protection

Major Capabilities

  • Deep Data Security
    Enforces authorization at the row, column or cell level for users, applications and AI agents.

  • SQL Firewall
    Detects and blocks unauthorized SQL statements and SQL injection attacks.

  • Schema-Level Privileges
    Simplifies access management without granting broad system privileges.

  • Developer Role
    Provides developers with a predefined least-privilege role.

  • Multi-Factor Authentication

  • TLS 1.3

  • OAuth 2.0

  • Microsoft Entra ID integration

  • Constrained Kerberos delegation

  • Read-Only Users and Sessions

  • Longer Password Support

Existing Enterprise Controls

  • Transparent Data Encryption
  • Database Vault
  • Data Redaction
  • Virtual Private Database
  • Unified Auditing
  • Fine-Grained Auditing
  • Privilege Analysis
  • Oracle Key Vault integration

Business Value

Protects enterprise data at its source, regardless of whether it is accessed by a user, application, analytics tool or AI agent.


7. Analytics and Lakehouse

Major Capabilities

  • Autonomous AI Lakehouse
  • Apache Iceberg support
  • Vector search over lakehouse data
  • SQL analytics
  • Graph analytics
  • Spatial analytics
  • JSON analytics
  • Text search
  • In-database machine learning

Business Value

Combines operational data, analytics, AI and open lakehouse data without creating multiple isolated platforms.


8. Performance and Optimization

Major Capabilities

  • True Cache for read scalability
  • Lock-Free Reservations for high-concurrency workloads
  • Improved Hybrid Columnar Compression
  • Wide tables with up to 4,096 columns
  • Consolidated background processes
  • RAC-based scale-out
  • Sharding-based horizontal scaling
  • Exadata optimization

Business Value

Improves transaction throughput, query performance, storage efficiency and application response time.


9. Manageability and DevOps

Major Capabilities

  • Multitenant CDB and PDB architecture
  • Automated provisioning and cloning
  • Fleet patching and standardized maintenance
  • Container images for development and CI/CD
  • Automated backup and recovery
  • Automatic performance diagnostics
  • Autonomous tuning, indexing and scaling
  • Simplified transition from Oracle Database 23ai
  • Enterprise monitoring and observability

Business Value

Reduces operational effort and enables consistent database management across on-premises, cloud and multicloud environments.


Key Features at a Glance

CategoryKey Features
AIVector Search, Hybrid Search, RAG, Select AI, AI Agents and MCP
ApplicationsJSON Duality, JavaScript, Graph, Domains, Assertions and enhanced SQL
MicroservicesKafka APIs, TxEventQ, Sagas, REST, Redis and MongoDB-compatible APIs
High AvailabilityRAC, Data Guard, Active Data Guard, Application Continuity and True Cache
Distributed DatabaseSharding, Raft Replication and geographic data distribution
SecurityDeep Data Security, SQL Firewall, MFA, TLS 1.3 and Entra ID
AnalyticsAutonomous AI Lakehouse, Iceberg, Graph, Spatial, JSON and ML
PerformanceTrue Cache, HCC, lock-free transactions, RAC and Exadata
OperationsMultitenant, automation, containers, fleet management and autonomous operations

Top Features for Enterprise Adoption

Immediate Priorities

  1. SQL Firewall and schema-level privileges
  2. Deep Data Security for applications and AI agents
  3. Application Continuity and Data Guard improvements
  4. JSON-Relational Duality for modern applications
  5. AI Vector Search for enterprise RAG

Strategic Priorities

  1. True Cache for read-intensive workloads
  2. Select AI and Select AI Agent
  3. Transactional Event Queues and Kafka APIs
  4. Autonomous AI Lakehouse and Apache Iceberg
  5. Sharding with Raft replication

Recommended Closing Slide

Why Oracle AI Database 26ai?

One Database for Modern Enterprise Workloads

  • AI-native: Enterprise RAG, vector search and AI agents
  • Developer-friendly: SQL, JSON, JavaScript, Graph and REST
  • Mission-critical: RAC, Data Guard and Application Continuity
  • Secure by design: Security enforced directly where the data resides
  • Globally scalable: Sharding and distributed replication
  • Converged: Operational, analytical, AI and lakehouse workloads on one platform

Oracle AI Database 26ai brings AI to trusted enterprise data while preserving security, consistency, scalability and availability.


Friday, August 21, 2026

Oracle Database Patches and Enterprise Patching Policy

 

Oracle Database Patches and Enterprise Patching Policy

Below is a practical review of Oracle Database patch types, followed by a step-by-step patching policy suitable for an enterprise database estate. The approach emphasizes security, availability, rollback capability, audit evidence, RAC/Data Guard coordination, and repeatable automation.

Important: Patch instructions differ by Oracle release, operating system, architecture, and deployment model. The patch README and applicable My Oracle Support, or MOS, notes must remain the final authority for every implementation.


1. Oracle patching concepts

Oracle patch maintenance falls into two broad categories:

Proactive maintenance

Proactive patching applies Oracle-recommended cumulative updates before a known problem affects the environment. For Oracle Database 19c and later, the principal proactive mechanisms are quarterly Release Updates and, where supported, Monthly Recommended Patches. 

Reactive maintenance

Reactive patching addresses a particular defect or urgent problem, usually through an interim or one-off patch. These patches are produced for a specific bug, database version, platform, and configuration, and may later be included in an RU. 

Recommended policy: Use RUs and supported MRPs as the standard maintenance path. Use one-off patches only when required by Oracle Support, a documented critical defect, or an approved security exception.


2. Oracle Database patch types

2.1 Release Update, or RU

An RU is Oracle’s primary cumulative quarterly database patch bundle for currently supported database releases.

It generally includes:

  • Security fixes
  • Optimizer and database engine fixes
  • Reliability and availability fixes
  • Data Guard, RAC, ASM, RMAN, and other component fixes
  • Fixes from previous RUs
  • SQL changes that may require datapatch

Oracle no longer delivers traditional patch sets for current releases. Quarterly RUs are the normal proactive maintenance mechanism. 

Recommended usage

  • Make the RU the baseline patch for all production databases.
  • Do not remain indefinitely on the base release, such as 19.3.
  • Prefer a recent and internally certified RU.
  • Avoid allowing different databases in the same service stack to drift across many RU levels.
  • Patch Grid Infrastructure and database homes according to the combination and sequence prescribed in the patch README.

Example version interpretation

For a database showing a version such as:

19.28.0.0.0
``

19 represents the major release family and 28 identifies the RU level.


2.2 Monthly Recommended Patch, or MRP

An MRP provides Oracle-recommended fixes on top of the current RU. Oracle introduced MRPs as a more frequent proactive maintenance option, initially for Oracle Database 19c on Linux x86-64. Availability must therefore be verified for the exact database release and operating-system platform. 

Recommended usage

Use MRPs when:

  • The platform and release support them.
  • The organization can test monthly maintenance.
  • A recommended fix is needed before the next quarterly RU.
  • Security or operational risk justifies a monthly cadence.

Suggested policy

  • Critical internet-facing or high-risk systems: Evaluate each applicable MRP.
  • Standard production systems: Quarterly RU as the minimum; use an MRP where risk analysis identifies a need.
  • Low-criticality systems: Keep aligned with the approved RU baseline.

MRPs should not be treated as a substitute for moving to the next quarterly RU.


2.3 Critical Patch Update, or CPU

A CPU is Oracle’s security advisory and security-fix delivery program across Oracle products. CPUs normally occur on the third Tuesday of January, April, July, and October. The advisory identifies affected products, vulnerabilities, severity, affected versions, and links to patch availability documentation.

For Oracle Database, the security fixes announced in a CPU are normally delivered through the applicable database patch bundle, commonly the RU, rather than as a completely separate database maintenance strategy.

Policy implication

When a CPU is released:

  1. Security must review the advisory.
  2. The DBA team must identify affected versions and components.
  3. The team must download the relevant Patch Availability Document from MOS.
  4. Risk must be assessed using:
    • CVSS score
    • Remote exploitability
    • Authentication requirement
    • Exposure of the listener or database service
    • Usage of affected components
    • Availability of mitigation
  5. Applicable patches must enter expedited testing.

Oracle advises customers to use actively supported releases and apply security patches without delay. 


2.4 Security Patch Update, or SPU

SPU is historically associated with the security-only database patch stream and may still appear in MOS references, older releases, and patch-selection documentation. It contains a narrower set of fixes than a full proactive bundle.

Recommended usage

For modern supported databases, an RU should generally be preferred because it provides cumulative security and reliability fixes. Select an SPU only when:

  • It is the applicable Oracle-supported delivery method for that release or platform.
  • Oracle Support directs the organization to use it.
  • An approved exception prevents adoption of the RU.

Do not mix RU, PSU, BP, or SPU streams without checking the README and MOS conflict guidance.


2.5 Patch Set Update, or PSU

PSUs are cumulative patch bundles used primarily with older Oracle release families. They include security fixes and selected high-impact fixes.

For 12.2 and later release families, Oracle moved to the RU model. Older databases may still have PSU or Bundle Patch terminology. 

Policy implication

A database that depends on PSUs should be classified as a legacy platform and placed on an upgrade or retirement roadmap.


2.6 Bundle Patch, or BP

A Bundle Patch groups fixes for a specific platform or product configuration. The term is commonly encountered with:

  • Older Windows database releases
  • Engineered systems
  • Grid Infrastructure
  • Specific components or products

Bundle Patches are normally cumulative within their patch stream.

Policy implication

Never assume that a BP, PSU, SPU, and RU are interchangeable. The DBA must confirm the correct patch stream for the product, release, and platform in MOS.


2.7 Interim or one-off patch

A one-off patch fixes a particular Oracle bug. It is usually associated with:

  • An Oracle Service Request
  • A specific bug number
  • A particular RU level
  • A particular operating-system platform

One-off patches are reactive and may conflict with an RU, MRP, OJVM patch, or another one-off patch. Oracle therefore requires interim patch conflict analysis before maintenance.

Recommended control

Every one-off patch should have:

  • Oracle SR number
  • Bug number
  • Business justification
  • Patch ID
  • Applicable RU
  • Platform
  • Conflict-check result
  • Expiry or removal plan
  • Confirmation whether the fix is included in a later RU

One-offs should not become permanent undocumented dependencies.


2.8 Oracle JavaVM, or OJVM patch

An OJVM patch addresses vulnerabilities and defects in the Java Virtual Machine component installed inside Oracle Database.

Important considerations

  • Determine whether OJVM is installed and used.
  • Review whether the patch supports rolling or requires non-rolling maintenance.
  • Check for Java-dependent applications and invalid objects.
  • Run all required SQL patching steps.
  • Validate JAVAVM and related components after patching.

Do not assume a database RU automatically resolves every separately delivered OJVM requirement. Always inspect the RU and OJVM README.


2.9 Grid Infrastructure Release Update

A Grid Infrastructure RU patches components such as:

  • Clusterware
  • Oracle Restart
  • ASM
  • ACFS
  • Cluster communication components
  • GI-managed listeners and resources

For RAC environments, OPatchAuto can orchestrate prerequisite checks, stopping and starting services, patch application, post-checks, and rollback. Oracle recommends Fleet Patching and Provisioning for larger RAC, Exadata, and Data Guard estates.

Key rule

The Grid home and database homes are separate software inventories. Both need to be assessed and patched where applicable.


3. Recommended enterprise patching policy

3.1 Patch cadence

EnvironmentTarget cadenceSuggested completion target
Sandbox / laboratoryAs soon as patch is available3 to 5 business days
DevelopmentEvery quarterly RUWithin 7 to 10 days
Test / SITEvery quarterly RUWithin 14 days
UAT / pre-productionEvery quarterly RUWithin 21 days
Critical productionEvery quarterly RUWithin 30 days
Standard productionEvery quarterly RUWithin 30 to 45 days
Security emergencyOut-of-bandBased on risk, normally 24 hours to 7 days
Supported MRP candidatesMonthly assessmentRisk-based

Oracle’s CPU calendar is quarterly, but Security Alerts can be published outside the normal schedule for particularly critical vulnerabilities or active exploitation. 


3.2 Patch currency standard

Use an organizational standard such as:

Production databases must be on the approved current RU or, temporarily, no more than one RU behind. Any database more than one RU behind requires a documented security exception, compensating controls, business-owner approval, and a remediation date.

For highly exposed systems, the organization may adopt a stricter standard:

Internet-facing, regulated, or Tier-0 databases must be moved to the approved current RU within 30 days, or faster when the CPU risk assessment requires it.


3.3 Preferred deployment model

Oracle recommends using a new Oracle home and performing out-of-place patching because this simplifies maintenance and reduces the risk associated with modifying the active home.

Out-of-place patching

  1. Install or clone a new Oracle home.
  2. Apply the approved RU and required one-offs.
  3. Validate the new home.
  4. Switch the database to the new home.
  5. Execute datapatch.
  6. Retain the previous home for an approved fallback period.

Why it is better

  • Cleaner rollback
  • Reduced risk of corrupting the active home
  • Repeatable gold-image deployment
  • Easier standardization
  • Shorter database outage
  • Better separation between preparation and cutover

For a large RAC, Exadata, or Data Guard estate, Oracle recommends Fleet Patching and Provisioning. 


4. Step-by-step Oracle Database patching procedure

Phase 1: Discovery and scope definition

Step 1: Build the database inventory

Collect:

  • Hostname and operating system
  • Database name and DB unique name
  • Database release and RU
  • Oracle home
  • Grid home
  • RAC or single instance
  • CDB and PDB architecture
  • Data Guard configuration
  • GoldenGate usage
  • ASM and ACFS usage
  • OJVM installation status
  • One-off patches
  • Business owner
  • Criticality and RTO/RPO
  • Maintenance window

Useful discovery commands:

$ORACLE_HOME/OPatch/opatch version
$ORACLE_HOME/OPatch/opatch lsinventory -detail
$ORACLE_HOME/OPatch/opatch lspatches

Database checks:

SELECT banner_full
FROM v$version;

SELECT name, open_mode, database_role
FROM v$database;

SELECT con_id, name, open_mode
FROM v$pdbs
ORDER BY con_id;

SELECT comp_id, comp_name, version_full, status
FROM dba_registry
ORDER BY comp_id;

SELECT patch_id,
patch_type,
action,
status,
action_time,
description
FROM dba_registry_sqlpatch
ORDER BY action_time DESC;

DBA_REGISTRY_SQLPATCH records SQL patch apply and rollback attempts, status, patch type, time, and log location, and is maintained by datapatch.


Phase 2: Patch selection

Step 2: Select the target RU

Use MOS as the patch source of truth. Search by:

  • Product
  • Release
  • Platform
  • Patch type
  • Language, if applicable

Download:

  • Database RU
  • Grid Infrastructure RU
  • OJVM patch, if required
  • Latest supported OPatch version
  • Required one-off or merge patches
  • Patch README
  • Known-issues notes

Oracle recommends obtaining patches through MOS and reviewing the exact README for downloading, prerequisites, application, and post-patch instructions.

Step 3: Review known issues

Check:

  • RU known issues
  • Platform-specific defects
  • Data Guard and RAC restrictions
  • OJVM restrictions
  • Optimizer changes
  • RMAN issues
  • Data Pump issues
  • GoldenGate compatibility
  • Application certification
  • Required post-install fixes
  • Superseded one-offs

If a new RU has a serious known issue for your configuration, choose the preceding approved RU plus the required correction, but document the decision.


Phase 3: Conflict and readiness analysis

Step 4: Verify OPatch

$ORACLE_HOME/OPatch/opatch version
$ORACLE_HOME/OPatch/opatch lsinventory

Use the OPatch version specified in the patch README. Oracle recommends using the latest applicable OPatch release. 

Step 5: Run conflict analysis

For a database home:

$ORACLE_HOME/OPatch/opatch prereq </span>
CheckConflictAgainstOHWithDetail </span>
-phBaseDir /stage/patch_directory

For a system patch or GI/RAC patch:

$GRID_HOME/OPatch/opatchauto apply </span>
/stage/patch_directory </span>
-analyze

Resolve conflicts by:

  • Removing an obsolete one-off
  • Obtaining a replacement one-off for the target RU
  • Requesting a merge patch
  • Raising an Oracle SR
  • Moving to a later RU that already includes the fix

Do not proceed with an unresolved conflict.

Step 6: Verify disk space

Check:

  • Oracle home
  • Grid home
  • Central inventory
  • Patch stage
  • /tmp
  • Database filesystem
  • Archive log destination
  • FRA
  • ASM disk groups

Oracle’s maintenance guidance explicitly requires system dependency and free-space checks before patch application.


Phase 4: Backup and recovery preparation

Step 7: Prepare rollback capability

At minimum:

  • Current RMAN backup
  • Validated restore capability
  • Control-file and SPFILE backup
  • Oracle home backup or retained old home
  • Grid home backup, where applicable
  • Central inventory backup
  • Listener and network configuration backup
  • Password file backup
  • Wallet and TDE keystore backup
  • OCR and voting-disk health check for RAC
  • Data Guard synchronization check
  • Recovery runbook

Oracle strongly recommends backing up Oracle home binaries, Grid home binaries, and the central Oracle inventory before applying an RU or interim patch. 

Example RMAN preparation:

BACKUP DATABASE PLUS ARCHIVELOG;
BACKUP CURRENT CONTROLFILE;
BACKUP SPFILE;
RESTORE DATABASE VALIDATE;

A backup is not sufficient unless its restore path has been tested.


Phase 5: Rehearsal and approval

Step 8: Patch non-production first

Follow the promotion sequence:

Sandbox -> Development -> SIT -> UAT -> Pre-production -> Production

Test:

  • Database startup and shutdown
  • Application connectivity
  • Critical SQL
  • Batch processes
  • RMAN backup and restore
  • Data Guard transport and apply
  • RAC service relocation
  • Listener registration
  • OEM monitoring
  • GoldenGate replication
  • Data Pump
  • Scheduler jobs
  • OJVM applications
  • Performance baselines

Step 9: Conduct change review

The change record should contain:

  • Patch IDs
  • Source and target RU
  • Affected systems
  • README
  • Conflict report
  • Test evidence
  • Backup evidence
  • Implementation plan
  • Outage estimate
  • Rollback criteria
  • Rollback steps
  • Business validation plan
  • DBA, application, infrastructure, security, and service-owner contacts

Phase 6: Production implementation

Step 10: Complete pre-patch health checks

Check for:

  • Invalid database components
  • Invalid objects
  • Failed scheduler jobs
  • Tablespace issues
  • FRA pressure
  • Archive destinations
  • Data Guard lag
  • RAC resource state
  • Blocking transactions
  • Backup failures
  • Existing alert-log errors

Example queries:

SELECT comp_id, comp_name, version_full, status
FROM dba_registry
WHERE status <> 'VALID';

SELECT owner, object_type, COUNT(*)
FROM dba_objects
WHERE status = 'INVALID'
GROUP BY owner, object_type
ORDER BY owner, object_type;

SELECT dest_id, status, error
FROM v$archive_dest_status
WHERE status <> 'INACTIVE';

SELECT job_name, status, actual_start_date, run_duration
FROM dba_scheduler_job_run_details
WHERE actual_start_date > SYSDATE - 1
ORDER BY actual_start_date DESC;

Record existing faults so they are not incorrectly attributed to the patch.

Step 11: Stop or relocate services

Coordinate:

  • Application connections
  • Connection pools
  • Database services
  • GoldenGate
  • Monitoring
  • Backup jobs
  • Batch jobs
  • Data Guard Broker
  • RAC services

When GoldenGate is used, Oracle’s patch-maintenance guidance says its processes must be shut down before patching the database. 

Step 12: Apply the binary patch

The exact command must come from the patch README.

Typical single-instance in-place pattern:

cd $ORACLE_HOME/OPatch
./opatch apply

Typical GI/RAC pattern:

$GRID_HOME/OPatch/opatchauto apply /stage/patch_directory

OPatch applies and rolls back patches in an Oracle home. OPatchAuto can perform prechecks, stop and start resources, apply patches, conduct post-checks, and perform rollback orchestration. 

Step 13: Run datapatch

After the database and required PDBs are open in the mode prescribed by the README:

$ORACLE_HOME/OPatch/datapatch -verbose

When OPatch is used for database maintenance, datapatch must be run to load applicable SQL changes into the database. 

For multitenant environments:

  • Confirm all required PDBs are open.
  • Confirm each PDB receives the SQL patch.
  • Check for PDBs that were closed or unavailable during datapatch.
  • Rerun datapatch if directed after opening missed PDBs.

Phase 7: Validation

Step 14: Validate binary inventory

$ORACLE_HOME/OPatch/opatch lsinventory
$ORACLE_HOME/OPatch/opatch lspatches

In RAC, validate every node and every relevant home.

Step 15: Validate SQL patch registry

SELECT patch_id,
patch_type,
action,
status,
action_time,
description
FROM dba_registry_sqlpatch
ORDER BY action_time DESC;

The expected result is normally:

ACTION = APPLY
STATUS = SUCCESS

Any WITH ERRORS status requires log review and remediation. 

Step 16: Validate database health

SELECT comp_id, comp_name, version_full, status
FROM dba_registry
ORDER BY comp_id;

SELECT owner, object_type, COUNT(*)
FROM dba_objects
WHERE status = 'INVALID'
GROUP BY owner, object_type;

SELECT instance_name, status, database_status
FROM gv$instance;

SELECT name, open_mode
FROM v$pdbs
ORDER BY con_id;

Also review:

  • Alert log
  • Listener log
  • Patch logs
  • CRS resources
  • ASM state
  • Data Guard transport and apply lag
  • Application smoke tests
  • Critical execution plans
  • Backup operation
  • Monitoring alerts
  • Performance compared with baseline

5. Data Guard patching best practices

For Data Guard:

  1. Confirm zero or acceptable transport and apply lag.
  2. Validate broker configuration.
  3. Patch the standby side first where supported.
  4. Restart and validate standby apply.
  5. Perform switchover if the chosen strategy requires it.
  6. Patch the former primary.
  7. Validate both directions of the configuration.
  8. Run datapatch in accordance with the README and the selected Data Guard procedure.
  9. Test failover and service behavior where possible.

Oracle prefers out-of-place maintenance using a new Oracle home and recommends Fleet Patching and Provisioning for Data Guard estates. OPatchAuto remains an available alternative for relevant configurations. 

Do not independently activate standby databases merely to run SQL patching unless the documented procedure specifically requires it.


6. RAC patching best practices

For RAC:

  • Use rolling patching only if the patch is explicitly certified as rolling.
  • Run conflict checks against both Grid and database homes.
  • Check opatch lsinventory on every node.
  • Confirm CRS resources before and after each node.
  • Drain or relocate services before stopping an instance.
  • Validate SCAN listeners and local listeners.
  • Review service failover and connection-pool behavior.
  • Verify the patch inventory is consistent across all nodes.
  • Run SQL patching once according to the README, not separately and blindly from every node.

Oracle recommends FPP to simplify RAC maintenance, while OPatchAuto remains an orchestration option. Out-of-place patching with a new home is the preferred maintenance model. 


7. Rollback policy

Rollback must be defined before entering the maintenance window.

Typical rollback triggers

  • Database cannot start
  • RAC resource remains unstable
  • Data Guard transport or apply cannot be restored
  • datapatch fails and cannot be corrected
  • Critical application smoke test fails
  • Severe performance regression
  • Data corruption symptoms
  • Maintenance window is exceeded
  • Oracle Support recommends rollback

Preferred rollback sequence for out-of-place patching

  1. Stop application access.
  2. Return the database configuration to the previous Oracle home.
  3. Restart the database from the old home.
  4. Roll back SQL changes if they were applied and the README requires it.
  5. Validate services and application operation.
  6. Record all commands and errors.
  7. Raise or update the Oracle SR.

Typical in-place binary rollback may use:

$ORACLE_HOME/OPatch/opatch rollback -id PATCH_ID

System patch rollback may use:

$GRID_HOME/OPatch/opatchauto rollback /stage/patch_directory

Exact rollback commands and SQL sequencing must come from the applicable README.


8. Governance, evidence, and KPIs

Required patch evidence

Retain:

  • Before-and-after opatch lsinventory
  • Before-and-after opatch lspatches
  • datapatch logs
  • DBA_REGISTRY_SQLPATCH results
  • Database component status
  • Invalid-object comparison
  • Backup record
  • Conflict-check output
  • Change approval
  • Test results
  • Application-owner validation
  • Alert-log review
  • Data Guard or RAC validation
  • Rollback decision record
  • Updated CMDB

Recommended KPIs

  • Percentage of databases on approved RU
  • Percentage more than one RU behind
  • Median days from RU release to production
  • Critical-patch SLA compliance
  • Patch success rate
  • Rollback rate
  • datapatch failure rate
  • Inventory mismatch count
  • Number of undocumented one-offs
  • Number of unsupported database releases
  • Number of outstanding security exceptions
  • Percentage of restore tests completed

9. Recommended policy statement

A concise organization-level policy could be:

Oracle Database environments shall be maintained on an actively supported Oracle release and an approved recent Release Update. Quarterly RUs shall be assessed immediately after release, tested through the defined environment sequence, and deployed to critical production systems within 30 days and standard production systems within 45 days. Critical security vulnerabilities, Security Alerts, and actively exploited issues shall follow the emergency patching process. Out-of-place patching shall be the preferred deployment method. Every patch implementation shall include conflict analysis, current recovery capability, non-production testing, documented rollback criteria, binary and SQL patch validation, application-owner sign-off, and retention of audit evidence.


10. Practical recommendation for your database estate

As a Database Architect, I recommend structuring the program around five controls:

  1. One approved RU baseline per database release and platform
  2. Out-of-place gold-image patching as the default
  3. Quarterly release train with monthly security review
  4. Central register for one-offs, conflicts, and exceptions
  5. Automated evidence collection for SOX and operational audits

The most important architectural improvement is to move away from individually patching every Oracle home manually. Maintain certified gold images containing:

  • Required RU
  • Approved OJVM patch
  • Required one-offs
  • Correct OPatch release
  • Standard configuration
  • Antivirus exclusions, if applicable
  • Verification manifest and checksum
  • Test and approval reference

This reduces configuration drift, patch conflicts, execution errors, and outage duration while producing stronger audit evidence. Oracle’s current maintenance guidance similarly favors out-of-place patching and recommends FPP for large RAC, Exadata, and Data Guard deployments. 

Review summary

This framework separates proactive, reactive, security, and component-specific patches, then ties each category to a controlled lifecycle. The most important best-practice improvements are adopting quarterly RUs as the standard, preferring out-of-place patching, validating both binary and SQL registries, and treating backup verification and rollback as mandatory entry criteria rather than optional DBA activities.

Monday, August 10, 2026

Common Oracle Database TNS Listener Errors ORA-XXX


Client → TNS Resolution → Network → Listener → Database Service → Database Instance

Common Oracle TNS Listener Errors

Error CodeError MessageCauseSolution
ORA-12154TNS: Could not resolve the connect identifier specifiedWrong service alias, missing tnsnames.ora, bad TNS_ADMINVerify tnsnames.ora, service name, and run tnsping
ORA-12170TNS: Connect timeout occurredNetwork/firewall issue, listener unreachableCheck network connectivity, firewall, listener status
ORA-12203TNS: Unable to connect to destinationInvalid host or portVerify hostname, port, and listener
ORA-12224TNS: No listenerListener process not availableStart listener using lsnrctl start
ORA-12500TNS: Listener failed to start a dedicated server processResource shortage or OS limitsCheck processes, memory, and database alert log
ORA-12505Listener does not currently know of SID given in connect descriptorIncorrect SID specifiedVerify SID and register instance with listener
ORA-12514Listener does not currently know of service requestedService name not registeredCheck SERVICE_NAME, lsnrctl services, and registration
ORA-12516Listener could not find available handlerMaximum sessions/processes reachedIncrease processes parameter or free resources
ORA-12518Listener could not hand off client connectionDedicated server process creation failureCheck OS resources and listener logs
ORA-12519No appropriate service handler foundDatabase overloadedIncrease session/process limits
ORA-12520Listener could not find available handlerShared server issueCheck dispatcher/shared server configuration
ORA-12521Listener does not currently know of instance requestedInstance not registeredVerify LOCAL_LISTENER and service registration
ORA-12525TNS: Listener has not received client's request in time allowedSlow network/client timeoutCheck network latency and timeout settings
ORA-12528Listener: all instances are blocking new connectionsDatabase starting or restricted modeOpen database normally
ORA-12537TNS: Connection closedListener terminated session unexpectedlyCheck firewall, listener log, SQLNET parameters
ORA-12541TNS: No ListenerListener stopped or wrong portRun lsnrctl status/start; verify port/host 
ORA-12543TNS: Destination host unreachableDNS/network routing problemVerify hostname and network connectivity
ORA-12545Connect failed because target host/object does not existWrong hostname/IPCheck host name resolution
ORA-12547TNS: Lost contactServer process crashedReview listener log and alert log
ORA-12560TNS: Protocol adapter errorOracle services not running or ORACLE_HOME issueStart Oracle services and verify environment variables
ORA-12564TNS: Connection refusedListener rejected connectionVerify listener and service status
ORA-12571TNS: Packet writer failureNetwork interruptionCheck firewall, network devices, VPN
ORA-12572TNS: Packet reader failureNetwork corruptionVerify network stability
ORA-12592TNS: Bad packetInvalid network packet receivedCheck client/server version compatibility
ORA-12599TNS: Cryptographic checksum mismatchSQLNET encryption mismatchAlign sqlnet.ora encryption settings
ORA-12637Packet receive failedNetwork/SSL issueVerify SQLNET and network settings
ORA-12638Credential retrieval failedAuthentication problemCheck OS authentication and SQLNET settings

Listener-Specific TNS Errors

TNS ErrorDescriptionFix
TNS-01101Listener name not recognizedVerify listener name in listener.ora
TNS-01106Listener using listener name already existsStop duplicate listener
TNS-01150Listener failed to startCheck port conflicts and configuration
TNS-01151Missing listener nameCorrect listener configuration
TNS-01189Listener could not authenticate userVerify listener password/security
TNS-01190User not authorized to execute commandUse correct OS user or credentials

Essential Listener Troubleshooting Commands

# Check listener status
lsnrctl status

# Start listener
lsnrctl start

# Stop listener
lsnrctl stop

# Reload listener
lsnrctl reload

# Check registered services
lsnrctl services

# Test TNS alias
tnsping <service_name>


Most Frequently Seen DBA Issues

1. ORA-12154

tnsping ORCL

Check:

  • tnsnames.ora
  • sqlnet.ora
  • TNS_ADMIN

2. ORA-12514

lsnrctl services

Check:

show parameter service_names;
alter system register;

3. ORA-12541

lsnrctl status
lsnrctl start

Verify:

  • Host
  • Port
  • Listener running status

4. ORA-12516 / ORA-12519

show parameter processes;

Increase:

alter system set processes=1000 scope=spfile;

5. ORA-12528

select status from v$instance;

Database may be in:

  • STARTUP
  • MOUNT
  • RESTRICTED mode

For a Database Architect/Oracle DBA, the "Top 10" listener errors you encounter in production are typically:

ORA-12154, ORA-12170, ORA-12505, ORA-12514, ORA-12516, ORA-12519, ORA-12520, ORA-12528, ORA-12541, ORA-12545. 


what is catcon.pl (Catalog Container Script) and why very useful for Oracle Multitenant Database ?

  catcon.pl (Catalog Container Script) is an Oracle utility introduced with the Multitenant Architecture (CDB/PDB) to execute SQL scripts ...