Database usage by Project

I am trying to make a list of which projects use which database connections ... we DO use the kindling tool to parse the gateway backup ... it DOES give us a list of projects, and DOES give us a separate list of database connections ... any thoughts on how to show usage?

This is essentially impossible to do because of the dynamic nature of Ignition in any other way than a "backwards" count via reference tracking at runtime, akin to the Tag Reference Tracker. We don't currently have any plans to add such a thing for databases, but it's a compelling idea that folks have brought up before.

I'm curious about the difficulty ... if a named-query was configured to use a specific database connection, wouldn't that be trackable/listable? I understand that if someone dynamically specified a datasource/connection, you'd only know in run-time ... but for the static linkages ... isn't that possible? I'm still a newbie, but for 100% of the projects we are creating, we are using static connections (either by specifying a "default" for the project, or by picking-from-the-list when we create a named-query)

In v8.1, most resources like this are still stored in binary forms that are only understood by the relevant part of the gateway. Where storage has been converted to more human-friendly (and git-friendly) formats, you can use filesystem searches like grep -rn .... to find such relationships.

(This gets dramatically easier in v8.3.)

Paul's point addresses the fact that many uses of database connections in Ignition are themselves dynamic, where the actual database connection name is carried in a script variable, not a string constant at the function call site. Static examination like grep will not show such usage.

1 Like

If you don't have any named queries using the database parameter, then yes, you could do a file based search of your named queries right now - the parameters are stored as human/machine readable JSON in the attributes of the resource.json on disk. We don't have anything to do it for you, but it's absolutely something you could script in bash/powershell/etc or do in a good text editor.

But that won't tell you about:

  1. Transaction groups
  2. Scripts running any of the other system.db methods that can interact with a database directly (there's a lot of them!)
  3. Vision components running queries indirectly, via query bindings or implicitly as part of their functionality (e.g. the easy chart)
  4. Tag historian, alarm journal, or audit profiles storing to a database
  5. Any other things I've forgotten about.