Error
Error Code: 678

SAP S/4HANA Error 678: Deprecated SQL Plan Stabilizer

📦 SAP S/4HANA
📋

Description

This error indicates that the system is attempting to use a SQL plan stabilizer feature that has been deprecated. It typically occurs after system upgrades or when database configurations are no longer aligned with current SAP S/4HANA best practices, preventing optimal query execution.
💬

Error Message

ERR_SQL_PLANSTABILIZER_DEPRECATED
🔍

Known Causes

3 known causes
⚠️
Recent System Upgrade
The error frequently appears after an SAP S/4HANA upgrade where older database features or plan stabilization methods are no longer supported.
⚠️
Outdated Database Configuration
Database parameters or settings might still be configured to utilize a deprecated plan stabilization mechanism, leading to this error.
⚠️
Custom Code References
Custom ABAP programs or applications might contain explicit references or attempts to activate the deprecated SQL plan stabilizer feature.
🛠️

Solutions

3 solutions available

1. Disable Deprecated SQL Plan Stabilizer easy

Temporarily disable the deprecated SQL Plan Stabilizer to resolve the error.

1
Access the SAP system using SAP GUI and navigate to transaction ST05 (Performance Trace).
2
Go to the 'SQL Trace' tab and ensure tracing is enabled for the relevant user or the entire system if necessary. This is to observe the SQL statements affected.
3
Access the SQL Plan Stabilizer administration transaction. This can typically be accessed via SE38 or SA38 by running the program `RSQWW_ADMIN` or by navigating through the SAP NetWeaver Administrator (NWA) under Configuration -> Infrastructure -> SQL Plan Stabilizer.
4
In the SQL Plan Stabilizer administration interface, locate the option to disable the stabilizer or specific entries. The exact location might vary slightly depending on your S/4HANA version and patch level. Look for checkboxes or buttons labeled 'Disable', 'Deactivate', or similar.
5
Save the changes. The error should now be resolved, but this is a temporary workaround.

2. Migrate to the New SQL Plan Management advanced

Replace the deprecated SQL Plan Stabilizer with the recommended SQL Plan Management.

1
Understand the differences between the deprecated SQL Plan Stabilizer and the new SQL Plan Management. The new approach typically involves capturing and managing SQL plans through the database itself (e.g., Oracle SQL Plan Management, DB2 SQL Plan Management) or using SAP's native tools for plan stability.
2
Identify the SQL statements that were being managed by the deprecated SQL Plan Stabilizer. You can use ST05 traces or the SQL Plan Stabilizer administration tool to find these.
3
For each identified SQL statement, create a corresponding plan stability entry in the new SQL Plan Management framework of your database. The process will be database-specific. For example, with Oracle, you might use `DBMS_SPM` package.
Example for Oracle (conceptual):

-- Capture a plan baseline
EXEC DBMS_SPM.load_plans_from_cursor_cache(sql_id => 'your_sql_id');

-- Verify the baseline
SELECT * FROM dba_sql_plan_baselines WHERE sql_handle = 'your_sql_handle';

-- Enable plan evolution if needed
ALTER SYSTEM SET "optimizer_capture_sql_plan_baselines"=TRUE SCOPE=BOTH;
ALTER SYSTEM SET "optimizer_use_sql_plan_baselines"=TRUE SCOPE=BOTH;
4
Once the plan stability is established in the new framework, disable or remove the entries from the deprecated SQL Plan Stabilizer to avoid conflicts and the error message.
5
Thoroughly test your S/4HANA system after the migration to ensure performance and correctness.

3. Update SAP Kernel and Database Software advanced

Upgrade to a version of SAP Kernel and database that supports the new SQL Plan Management and removes the deprecated feature.

1
Consult the SAP Support Portal (SAP ONE Support Launchpad) for the latest recommended SAP Kernel versions for your S/4HANA release. Pay attention to release notes and compatibility matrices.
2
Review the database vendor's documentation for the latest recommended patches or versions that ensure compatibility with the updated SAP Kernel and offer robust SQL plan management features.
3
Plan and execute the SAP Kernel upgrade following SAP's official guidelines. This typically involves downtime and careful coordination.
4
Apply the necessary database patches or upgrades. This also requires careful planning and potential downtime.
5
After the upgrades, verify that the deprecated SQL Plan Stabilizer is no longer present or active, and that the new SQL Plan Management is functioning correctly.
🔗

Related Errors

5 related errors