# View Named Query compiled string

**URL:** <https://forum.inductiveautomation.com/t/view-named-query-compiled-string/69317>\
**Category:** Ignition\
**Tags:** namedqueries\
**Created:** [February 1, 2023, 10:49pm UTC](https://forum.inductiveautomation.com/t/view-named-query-compiled-string/69317 "2023-02-01T22:49:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derek\_Reees](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Derek\_Reees](https://forum.inductiveautomation.com/u/Derek_Reees)\
**Post date:** [February 1, 2023, 10:49pm UTC](https://forum.inductiveautomation.com/t/view-named-query-compiled-string/69317/1 "2023-02-01T22:49:19Z")

</div>

Is it possible to view the SQL string being generated for a named query? I have tried using the xEvent profiler on SSMS but it doesn't look like it is hitting my DB. I know the connection works because I can delete my where clause and the query runs. Any ideas?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 1, 2023, 10:50pm UTC](https://forum.inductiveautomation.com/t/view-named-query-compiled-string/69317/2 "2023-02-01T22:50:36Z")

</div>

The `gateway.database.selects` or `gateway.database.updates` loggers on TRACE will have the full body of **every** query issued by the gateway against **all** of your database connections.
