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.
Diagnostic Disambiguation Matrix
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.
Not an error belonging to an external database engine or unrelated subsystem; native to this catalog.
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.
▸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
- 1Query DBA_SQL_PLAN_BASELINES for ENABLED, ACCEPTED, FIXED, REPRODUCED, LAST_EXECUTED, and LAST_VERIFIED on the affected SQL_HANDLE.
- 2Verify SHOW PARAMETER optimizer_use_sql_plan_baselines and database edition (EE vs. SE2).
- 3Inspect the stored outline via DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE and verify every referenced index exists and is VALID/VISIBLE in DBA_INDEXES.
- 4Check the Note section of DBMS_XPLAN.DISPLAY_CURSOR to confirm whether the baseline is actually being used.
-- 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
- •Related Terms: SQL Plan Baseline, SQL Plan Management, Baseline Evolution, SQL Management Base, Automatic SQL Plan Management, Real-Time SQL Plan Management
- •Main Technical Guide: Oracle SQL Plan Regression: Detection, Diagnosis and Stabilization
- •Official Documentation: Oracle Documentation
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.
- 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
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
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
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.
More ORACLE Diagnostic Playbooks
Battle-tested triage guides for production incidents.
Oracle ORA-01653: Tablespace Extension & Step-by-Step Fix
Distinguishing ORA-01653, 01654, and 01652, tablespace capacity monitoring, datafile autoextend, and safe sizing with MAXSIZE.
Oracle ORA-00001: unique constraint violated Triage & Fix
Troubleshooting unique key collisions caused by out-of-sync sequences and bulk imports; sequence fast-forwarding and DML error logging.
Oracle ORA-00060: deadlock detected while waiting for resource Triage
Root cause analysis of cross-dependency deadlocks and missing foreign key index table locks via trace logs and serialized DML execution.