Find which Oracle SQL_ID hits the SQL*Net break/reset to client event | Tanel Poder Consulting #52
Replies: 1 comment 4 replies
-
Hi Tanel, I’m a fan of your work and troubleshooting skills. Thank you for the wonderful explanation. Please correct me if I'm wrong: Not all, but some SQL statements that fail during parsing (due to syntax errors) are typically not stored in the shared pool, so they don’t appear in v$sql or similar views. Some of them might be partially visible through the kglnaobj column in sys.x$kglob, while others are not, even though they trigger a SQL*Net break/reset to client event. In such cases, even if we manage to capture the prev_sql_id using break.sql, we still can’t retrieve the sql_fulltext unless we’re using an AFTER SERVERERROR ON DATABASE trigger or enabling errorstack tracing. This brings me to a puzzling behavior I’ve observed in our environment: "Current SQL statement is not available." Surprisingly, these statements are also not captured by the AFTER SERVERERROR ON DATABASE trigger. the trigger doesn’t even fire. Event 10035 tracing didn’t help either. They are only recorded when an errorstack is opened. At one point, I suspected silent handling in PL/SQL, so I replaced all WHEN OTHERS THEN NULL blocks with logging behavior to see if anything was being swallowed, but nothing surfaced. What would you suggest as the next steps to further investigate or capture these SQLs? My hunch is that they might be internal statements, never raised to the client, especially since no users or developers have reported related errors. But I’m wondering if there’s something I might be missing. Thanks again for your time and guidance. Best regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Find which Oracle SQL_ID hits the SQL*Net break/reset to client event | Tanel Poder Consulting
I’m finalizing things for launching my next-gen Linux Performance & Troubleshooting and Advanced Oracle Troubleshooting video courses in June, so expect much more blogging (and new scripts) to show up here. By the way, this week I’m running a spring-cleaning sale with unprecedented discounts!
Oracle’s SQL*Net break/reset to client wait event shows up whenever Oracle (SQL, PL/SQL call, etc) returns an ORA- error back to the client instead of the normal expected results (and ORA-0 under the hood): - Linux, Oracle, SQL performance tuning and troubleshooting - consulting & training.
https://tanelpoder.com/posts/find-which-oracle-sql-id-hit-sqlnet-break-reset-event/
Beta Was this translation helpful? Give feedback.
All reactions