Re: tracing sql by force matching signature

From: Mohamed Houri <mohamed.houri_at_gmail.com>
Date: Tue, 1 Feb 2022 09:17:24 +0100
Message-ID: <CAJu8R6jCFxt4F7Gc6O9hHFN4EiMWieVk7Nu5mNSYPH0nRCF8Fw_at_mail.gmail.com>



Hello Mikhail

Thanks very much for your help

Yes it works for me when executed under 21c

*SQL> alter system set events 'sql_trace {eq: 8713525284261072007,refn(refp(refp(refp(varaddr("ksmuh_p"), 16), 2424), 16), 8, 408)}';System altered.SQL> select count(1) from t1 where n1=100; SQL> alter system set events 'sql_trace off';*

Best regards

Le lun. 31 janv. 2022 à 20:05, Mikhail Velikikh <mvelikikh_at_gmail.com> a écrit :

> Hello,
>
> You can try to trace it as follows:
>
> alter session set events 'sql_trace {eq:
> 4343055653486697370,refn(refp(refp(refp(varaddr("ksmuh_p"), 16), 2424),
> 16), 8, 408)}';
>
> Replace the first argument of the eq filter (4343%) with your signature.
> A complete example demonstrating that it works is available at the link
> below:
>
> https://gist.github.com/mvelikikh/eee1de10c00c07f6a81743c4b935f833#file-sql_trace_filter_by_force_matching_signature-sql
>
> It works in 19.13 and 21.5 based on my tests. It might not work in earlier
> versions since it relies on chunks KGLOB and kksp within heap 0 - their
> structure might be different across versions.
>
> Thanks,
> Mikhail.
>
>
> On Fri, 28 Jan 2022 at 14:57, Mohamed Houri <mohamed.houri_at_gmail.com>
> wrote:
>
>> Hello,
>>
>> Is it possible to trace a SQL query by its force matching signature?
>>
>> Thanks
>>
>> --
>>
>> Houri Mohamed
>>
>> Oracle DBA-Developer-Performance & Tuning
>>
>> Visit My - Blog <http://www.hourim.wordpress.com/>
>>
>> Let's Connect - <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>*Linkedin
>> Profile <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>*
>>
>> My Twitter <https://twitter.com/MohamedHouri> - MohamedHouri
>> <https://twitter.com/MohamedHouri>
>>
>>

-- 

Houri Mohamed

Oracle DBA-Developer-Performance & Tuning

Visit My         - Blog <http://www.hourim.wordpress.com/>

Let's Connect -
<http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>*Linkedin
Profile <http://fr.linkedin.com/pub/mohamed-houri/11/329/857/>*

My Twitter <https://twitter.com/MohamedHouri>      - MohamedHouri
<https://twitter.com/MohamedHouri>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 01 2022 - 09:17:24 CET

Original text of this message