# Retrieving SQLIDs

**URL:** <https://community.dynatrace.com/t/retrieving-sqlids/20475>\
**Category:** Open Q&A\
**Tags:** databases\
**Created:** [October 5, 2020, 9:53am UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475 "2020-10-05T09:53:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![serhat\_balik](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@serhat\_balik](https://community.dynatrace.com/u/serhat_balik)\
**Post date:** [October 5, 2020, 9:53am UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/1 "2020-10-05T09:53:55Z")

</div>

Hello,

Is it possible to retrieve SQLIDs from PurePaths or somewhere else in Dynatrace?

I’ve read the documentation about Oracle Insights and it does not specifically mentions it, but I thought maybe that would help Dynatrace retrieve additional data.

[https://www.dynatrace.com/support/help/how-to-use-dynatrace/databases/analysis/database-insights/](https://www.dynatrace.com/support/help/how-to-use-dynatrace/databases/analysis/database-insights/?_ga=2.106405957.710293294.1601219387-1726706216.1600082162)

Regards,

Serhat

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 5, 2020, 10:29am UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/2 "2020-10-05T10:29:37Z")

</div>

Yes, you can retrieve SQLIDs in Oracle Insights. Click the “View Statements” button and they will be available there.

 ![26851-1601893735185.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/55178c452690c06fb596ad3cdda087ae36c0db08.png)

---

<div class="post-metadata">

**Author:** ![serhat\_balik](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@serhat\_balik](https://community.dynatrace.com/u/serhat_balik)\
**Post date:** [October 5, 2020, 10:40am UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/3 "2020-10-05T10:40:55Z")

</div>

Hey Antonio,

Do you think is it possible to do this without installing Oracle Insights?

One thing that comes up to my mind is to post this data and retrieve it inside user sessions. I would like to hear your opinions.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 5, 2020, 11:05am UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/4 "2020-10-05T11:05:59Z")

</div>

I don’t think so. SQLIDs are internal stuff from Oracle, and applications shouldn’t have access to it. So don’t expect to get them from the Databases menu in the Dynatrace platform.

So I’m not sure what you mean when you refer to “post this data”. Does your application have access to it? If so, and I would love to know how, you could use Request Attributes or even post it into User Sessions as you refer.

---

<div class="post-metadata">

**Author:** ![serhat\_balik](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@serhat\_balik](https://community.dynatrace.com/u/serhat_balik)\
**Post date:** [October 5, 2020, 11:26am UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/5 "2020-10-05T11:26:00Z")

</div>

I mean retrieving and posting the SQLID from development side and retrieving it using Key Attributes inside User Sessions.

I am new to Dynatrace and still in the phase of learning basic features. It is very possible that some stuff I mention might not make sense 🙂

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 5, 2020, 12:34pm UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/6 "2020-10-05T12:34:35Z")

</div>

I’m just curious how you got the SQLIDs from the application side, but if you do, there is no doubt you can use them. It’s not out of the box, though.

---

<div class="post-metadata">

**Author:** ![serhat\_balik](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@serhat\_balik](https://community.dynatrace.com/u/serhat_balik)\
**Post date:** [October 5, 2020, 12:53pm UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/7 "2020-10-05T12:53:15Z")

</div>

Something similar to this [Link](https://stackoverflow.com/questions/42800041/how-to-reliably-get-the-sql-id-of-a-query)

Getting this ID after every statement and storing it in a variable or property, then posting it similar to username, userID, etc into user sessions and catching it there. It might seem like a hacky solution, but this is what comes up to my mind as a solution within my limited knowledge.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 5, 2020, 1:18pm UTC](https://community.dynatrace.com/t/retrieving-sqlids/20475/8 "2020-10-05T13:18:19Z")

</div>

Your link is interesting. Didn’t know about the SQL\*Plus trick 🙂

Now, if you’ve been interacting with the V$% performance views, that’s exactly how Dynatrace does it with Oracle Insights.

Concerning the link between Purepaths and SQLIDs in Oracle Insights, it is not yet possible, but you can vote in a RFE that I created some time ago:

> **[Login | Dynatrace](https://sso.dynatrace.com/action/signin?goto=https%3A%2F%2Fsso.dynatrace.com%3A443%2Foauth2%2Fauthorize%2Fredirect%3FoAuth2CtxUuid%3D839ff74b-bbef-49e4-801f-dff16dcff891&oAuth2RedirectUri=https%3A%2F%2Fcommunity.dynatrace.com%2Fauth%2Foauth2callback)**

I would suggest you try Oracle Insights a try. It has been very helpful to me.
