# Find tool not finding database references?

**URL:** <https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [March 3, 2025, 4:38pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159 "2025-03-03T16:38:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingraham](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@ingraham](https://forum.inductiveautomation.com/u/ingraham)\
**Post date:** [March 3, 2025, 4:38pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/1 "2025-03-03T16:38:31Z")

</div>

I've inherited a project, and it has a database connection. In status, I can see that it is in fact getting queries, albeit quite slowly (less than one transaction per second.) However, when I try to use the Find tool to see where the queries are coming from, it comes up with nothing. I'm supposed to update a 7.9.x gateway to 8.1.45. I've tried Find on both. What could I be missing? How can I find where these queries are? Any help would be greatly appreciated. Thanks.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/e/2eddb55dca1b9735e624f40c60950d539b7b6f14.png)

---

<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:** [March 3, 2025, 5:00pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/2 "2025-03-03T17:00:20Z")

</div>

Vision windows/templates are not _fully_ searched, unfortunately, unless they're actually already open in the designer (despite what the open/all windows dropdown might lead you to believe). This is for complicated to explain legacy baggage reasons.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 3, 2025, 5:09pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/3 "2025-03-03T17:09:11Z")

</div>

For this kind of problem, I've always found it easiest to have the database itself log the queries it is processing.

---

<div class="post-metadata">

**Author:** ![ingraham](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@ingraham](https://forum.inductiveautomation.com/u/ingraham)\
**Post date:** [March 3, 2025, 5:57pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/4 "2025-03-03T17:57:40Z")

</div>

@pturmel While that's a good idea, it doesn't help me find where they're coming from.

---

<div class="post-metadata">

**Author:** ![ingraham](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@ingraham](https://forum.inductiveautomation.com/u/ingraham)\
**Post date:** [March 3, 2025, 6:03pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/5 "2025-03-03T18:03:30Z")

</div>

@paul-griffith Thanks. I'm trying that now. Unfortunately, since I'm doing this in an offline project that doesn't have access to the database, I'm getting so many errors per second that I can't get the Find dialog up with more than a couple of windows open, so I guess I have to go through them one at a time.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 3, 2025, 6:08pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/6 "2025-03-03T18:08:35Z")

</div>

> [@ingraham](#):
>
> it doesn't help me find where they're coming from

??

Most parts of Ignition have very specific query structures that show up clearly in DB logs. Knowing what is being queried often leads to the source.

For Vision, consider setting the project storage mode to XML instead of auto or binary, and opening then saving every window and template. You can then use `grep` in your gateway filesystem to locate suspicious SQL or NQ names.

---

<div class="post-metadata">

**Author:** ![ingraham](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@ingraham](https://forum.inductiveautomation.com/u/ingraham)\
**Post date:** [March 3, 2025, 9:53pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/7 "2025-03-03T21:53:47Z")

</div>

> [@pturmel](#):
>
> setting the project storage mode to XML...

Thanks. This is definitely the kind of thing I want. Unfortunately, I went through one whole project and found nothing. There are 3 others, but I thought they were nearly identical. Actually, there are also 2 more projects that look like they were temporary projects someone was trying something out on, rather than something running on clients. But I guess I'm going to do a lot of open, close, save, lather, rinse, repeat.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 3, 2025, 9:55pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/8 "2025-03-03T21:55:28Z")

</div>

Are you sure it is coming from a project? Query tags, perhaps? Or `runScript()` running `system.db.*` ?

---

<div class="post-metadata">

**Author:** ![ingraham](https://avatars.discourse-cdn.com/v4/letter/i/3ab097/32.png) [@ingraham](https://forum.inductiveautomation.com/u/ingraham)\
**Post date:** [March 3, 2025, 11:10pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/9 "2025-03-03T23:10:08Z")

</div>

There are some query tags, but again Find didn't show any pointed at that database. I checked the gateway scripts and didn't see anything. I did, however, figure out that I'm dumb. The database I'm looking for is actually the default; I thought the default was a different database. So now it's anything on any window, and I can't search for the database connection name, because everything is just using default. Further, everything is using createSProcCall and execSProcCall, so searching for "SELECT " wasn't finding anything. At any rate, I appreciate all the help. Being able to grep the xml files was definitely key. (Actually, Select-String in Powershell, because I'm on Windows.)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 3, 2025, 11:25pm UTC](https://forum.inductiveautomation.com/t/find-tool-not-finding-database-references/103159/10 "2025-03-03T23:25:31Z")

</div>

> [@ingraham](#):
>
> on Windows

My condolences.
