tracing specific sql_id in 12.2

From: Noveljic Nenad <>
Date: Tue, 12 Dec 2017 15:02:52 +0000
Message-ID: <30134_1513090978_5A2FEFA2_30134_2171_1_ECDEF0CC6716EC4596FCBC871F48292AB19215DC_at_ZRH-S231>

Has somebody tried tracing a specific sql_id in Oracle 12.2? The feature doesn't seem to work properly.

Here's the test case:

Session 1:
alter system set events='sql_trace[sql: 2asugy1n1r7y7] level=12' ; SQL> alter system set events='sql_trace[sql: 2asugy1n1r7y7] level=12' ;

System altered.

SQL> quit

Session 2:
connect / as sysdba
SQL> oradebug setmypid
Statement processed.
SQL> oradebug eventdump session
sql_trace[sql: 2asugy1n1r7y7] level=12

SQL> select count(*) from v$sql where sql_id='2asugy1n1r7y7';



SQL> select /* test_trace */ 1 from dual ;



SQL> select count(*) from v$sql where sql_id='2asugy1n1r7y7';



Unlike 12.1, the SQL doesn't get traced on a 12.2 database unless ran in the same session where the "alter system set events" was executed .


Home page:

Please consider the environment before printing this e-mail. Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken.

<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">p { font-family: Arial;font-size:9pt }</style>
<br>Important Notice</br>
<br>This message is intended only for the individual named. It may contain confidential or privileged information. If you are not the named addressee you should in particular not disseminate, distribute, modify or copy this e-mail. Please notify the sender immediately by e-mail, if you have received this message by mistake and delete it from your system.</br>
<br>E-mail transmission may not be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also processing of incoming e-mails cannot be guaranteed. All liability of the Vontobel Group and its affiliates for any damages resulting from e-mail use is excluded. You are advised that urgent and time sensitive messages should not be sent by e-mail and if verification is required please request a printed version.<br/>

Received on Tue Dec 12 2017 - 16:02:52 CET

Original text of this message