dataiotech Labs
dbaguide.com · Senior DBA & SRE Diagnostic Standard v2.0
Home/Error Library/ORACLE/oracle-perf-ora-cat-22-sql-plan-baseline-unaccepted-non-reproducible
Oracle
Oracle 19c (manual SPM; Auto SPM RU 19.22+ EE), 26ai (including Real-Time SPM EE)SEVERITY: P1 HIGH
6 min read
SQL Plan Baseline Unaccepted / Non-Reproducible Plan [Cursor Condition]

Cursor Condition · SQL Plan Baseline Unaccepted / Non-Reproducible Plan

A cursor/SPM condition where either a superior new candidate plan remains unused in plan history as ACCEPTED='NO' awaiting Baseline Evolution, or an existing accepted SQL Plan Baseline fails to reproduce (REPRODUCED='NO') due to dropped/invisible indexes, schema changes, or upgrade transformation shifts. When an accepted baseline cannot reproduce, the CBO bypasses it and falls back to unconstrained costing, risking regression.

Reviewed by:Senior Oracle DBA (dataiotech Labs)

Diagnostic Disambiguation Matrix

When It Occurs

Verified operational error scenario under Oracle 19c (manual SPM; Auto SPM RU 19.22+ EE), 26ai (including Real-Time SPM EE): A cursor/SPM condition where either a superior new candidate plan remains unused in plan history as ACCEPTED='NO' awaiting Baseline Evolution, or an existing accepted SQL Plan Baseline fails to reproduce (REPRODUCED='NO') due to dropped/invisible indexes, schema changes, or upgrade transformation shifts. When an accepted baseline cannot reproduce, the CBO bypasses it and falls back to unconstrained costing, risking regression.

When This Is NOT The Error

Not an error belonging to an external database engine or unrelated subsystem; native to this catalog.

First 60 Seconds Emergency Protocol (Read-Only Safety Rule):

The error string is a symptom, not the root cause. Do not restart database servers blindly! Execute the read-only diagnostic queries below to determine the actual failure mode before attempting session terminations or configuration changes.

NOTE
Entry Type (ORA-CAT-22): Cursor Condition Licensing Requirement: Core Enterprise Edition (full SPM; Auto SPM included from RU 19.22+ & 26ai; Real-Time SPM included in 26ai EE). Standard Edition 2 (SE2) is restricted to 1 baseline per SQL statement without evolution. · Required Privileges: SELECT on DBA_SQL_PLAN_BASELINES, DBA_INDEXES, V$SQL; EXECUTE on DBMS_XPLAN (ADMINISTER SQL MANAGEMENT OBJECT for DBMS_SPM remediation)

▸1. Description & Context

A cursor/SPM condition where either a superior new candidate plan remains unused in plan history as ACCEPTED='NO' awaiting Baseline Evolution, or an existing accepted SQL Plan Baseline fails to reproduce (REPRODUCED='NO') due to dropped/invisible indexes, schema changes, or upgrade transformation shifts. When an accepted baseline cannot reproduce, the CBO bypasses it and falls back to unconstrained costing, risking regression.

Severity Context: Medium / High — REPRODUCED=NO silently disables regression protection, while unreviewed ACCEPTED=NO plans can prevent beneficial new indexes from taking effect.

▸2. Possible Causes (Confirm Root Cause via Evidence)

  • •Possible cause (must be verified): An index referenced by the baseline outline was dropped, renamed, marked UNUSABLE, or set INVISIBLE.
  • •Possible cause: Schema changes or major release upgrades (e.g., 19c to 26ai) invalidating stored outline transformation hints.
  • •Possible cause: OPTIMIZER_USE_SQL_PLAN_BASELINES=FALSE, or SE2 single-baseline limits blocking additional plans and evolution.
  • •Possible cause: A newly created beneficial index being ignored because the candidate plan remains ACCEPTED='NO' pending evolution.

▸3. Read-Only Diagnostic Steps

  1. 1Query DBA_SQL_PLAN_BASELINES for ENABLED, ACCEPTED, FIXED, REPRODUCED, LAST_EXECUTED, and LAST_VERIFIED on the affected SQL_HANDLE.
  2. 2Verify SHOW PARAMETER optimizer_use_sql_plan_baselines and database edition (EE vs. SE2).
  3. 3Inspect the stored outline via DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE and verify every referenced index exists and is VALID/VISIBLE in DBA_INDEXES.
  4. 4Check the Note section of DBMS_XPLAN.DISPLAY_CURSOR to confirm whether the baseline is actually being used.
sql
-- ORA-CAT-22 | Core Enterprise Edition (full SPM; Auto SPM included from RU 19.22+ & 26ai; Real-Time SPM included in 26ai EE). Standard Edition 2 (SE2) is restricted to 1 baseline per SQL statement without evolution. | Syntax-Reviewed (Not Runtime-Tested) -- READ-ONLY | License-free core DBA_ view SELECT sql_handle, plan_name, origin, enabled, accepted, fixed, reproduced, last_executed, last_verified FROM dba_sql_plan_baselines WHERE reproduced = 'NO' OR (enabled = 'YES' AND accepted = 'NO') ORDER BY created DESC FETCH FIRST 30 ROWS ONLY;

▸4. Controlled Remediation Options

  • •For REPRODUCED=NO, restore missing/invisible indexes or capture a validated replacement baseline (using DBMS_SPM.ADD_VERIFIED_SQL_PLAN_BASELINE on 26ai EE) and disable/drop the obsolete baseline.
  • •For faster ACCEPTED=NO plans after intentional indexing, run DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE on EE (on SE2, drop the single old baseline before loading the new one).
  • •Monitor Automatic SPM / Real-Time SPM (19c RU 19.22+ / 26ai EE) and SYSAUX SQL Management Base (SMB) space allocation regularly.

▸5. Related Terms & References

NEW CONCEPTENGINEERING MASTERY
Senior Interview Ready

ORACLE Diagnostic Standards, Operational Reliability, and Interview Readiness.

This error is not merely a config typo; it is a lesson in consistency models, concurrency architectures, and capacity planning.

Measurable Learning Objectives:
  • Articulate error symptoms, distinguishing diagnostics, and safe recovery steps.
  • Implement architectural safeguards to permanently eliminate root causes.

What Senior Interviews Ask About This Error?

Q1When this error (SQL Plan Baseline Unaccepted / Non-Reproducible Plan [Cursor Condition]) surfaces in production, what must be inspected within the first 60 seconds?
Mid
Senior Engineer & Architect Response:

Before restarting servers blindly, inspect active sessions, locks, and recent engine logs to identify the true failure mode.

Q2Which metrics should be integrated into alerting to prevent recurrence of this issue?
Senior
Senior Engineer & Architect Response:

Set up early warning metrics targeting connection pools, memory grants, disk headroom, or lock queues with actionable thresholds.

Q3How should applications defensively guard against this database failure?
Junior
Senior Engineer & Architect Response:

Implement idempotent retry loops with backoff, strict query timeouts, verified connection pool bounds, and structured error logging.

Senior DBA & SRE Career Roadmap

Explore database reliability milestones, incident response protocols, and architectural leadership.

View Roadmap

More ORACLE Diagnostic Playbooks

Battle-tested triage guides for production incidents.

View All
dbaguide.com · Cursor Condition: SQL Plan Baseline Unaccepted (ACCEPTED=NO) or Non-Reproducible (REPRODUCED=NO) · Kanıt Odaklı Teşhis Standardı
Last Updated: November 2, 2026 · Format v2.0