Stop googling SAP errors. Use our Free Essentials plan instead - no credit card needed. Start Now

Close

How To Fix STUN_ORA012 - No statistical data exists for this statement


SAP Error Message - Details

  • Message type: E = Error

  • Message class: STUN_ORA - Messages for Function Group STUN_ORA (Oracle Statistics)

  • Message number: 012

  • Message text: No statistical data exists for this statement

  • Show details Hide details
  • What causes this issue?

    The system was unable to find an entry that contained all statistical
    records in an internal table.

    System Response

    After displaying the message, the system continues processing.

    How to fix this error?

    This is due to a temporaray problem or an internal error.
    Restart the database and try to reproduce the error. If you can
    reproduce the error, contact SAP support.

    Procedure for System Administrators

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.


    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message STUN_ORA012 - No statistical data exists for this statement ?

    The SAP error message "STUN_ORA012 No statistical data exists for this statement" typically occurs in the context of Oracle databases when there is an attempt to retrieve statistical data for a SQL statement that has not been executed or for which no statistics have been collected. This can happen in various scenarios, such as when using the SQL Performance Analyzer or when trying to analyze the performance of a specific SQL statement.

    Cause:

    1. No Execution History: The SQL statement has not been executed, so there are no statistics available.
    2. Statistics Not Collected: The database may not have collected statistics for the SQL statement, which can happen if the statement is new or infrequently executed.
    3. Database Configuration: The database may not be configured to collect statistics automatically, or the statistics collection job may not have run recently.
    4. SQL Plan Management: If the SQL plan management feature is used, it may not have any plans available for the statement.

    Solution:

    1. Execute the SQL Statement: Ensure that the SQL statement has been executed at least once. This will allow the database to collect execution statistics.
    2. Collect Statistics: Use the DBMS_STATS package to manually collect statistics for the relevant tables or schemas. For example:
      EXEC DBMS_STATS.GATHER_TABLE_STATS('schema_name', 'table_name');
    3. Check Automatic Statistics Gathering: Ensure that the automatic statistics gathering job is enabled and running. You can check the status of the job in the DBA_SCHEDULER_JOBS view.
    4. Review SQL Plan Management: If using SQL Plan Management, ensure that the SQL statement is included in the SQL plan baseline.
    5. Use AWR Reports: If you have access to AWR (Automatic Workload Repository) reports, you can analyze the performance of SQL statements and see if there are any recommendations for gathering statistics.

    Related Information:

    • Oracle Documentation: Refer to the Oracle documentation for more details on statistics collection and performance tuning.
    • SAP Notes: Check SAP Notes related to performance issues and database statistics for any specific recommendations or patches.
    • Database Monitoring Tools: Utilize database monitoring tools to track SQL performance and identify statements that may require statistics collection.

    By following these steps, you should be able to resolve the "STUN_ORA012 No statistical data exists for this statement" error and improve the performance analysis of your SQL statements in SAP.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Sign up for our Free Essentials Plan.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
The AI Support Assistant is great. It provides comprehensive assistance even on the most difficult issues. I highly recommend this service.
Rate 1
John Jordan
SAP Consultant & Author