Search for Customized Database Connections

Hey there everyone.
Is it possible to find all the places within a project where an SQL binding DOESN'T use the project's default database? We're re-pointing an existing application to use a different database, and there are all sorts of SQL bindings that explicitly specify the old database... how can I easily find them all? We're using Ignition 8.1.18. Thanks in advance!

Frank.

This works in the version I have 8.1.30 - if you open the designer you can ctrl+F and type in the database connection name and see what hits you get. Built into the find tool you can replace that text with other text or no text if you wanted to use the projects default DB connection.

1 Like

Good to know! Anyone know a way to do this in 8.1.18, or is upgrading my only option?

Looks like youre in luck: Find and Replace | Ignition User Manual

image

I recommend changing the database connection to "Parameter", then create a memory tag to hold the name of the database (I use "database").
In your bindings that use Named Queries, point to the database tag to that parameter.
In scripts, get the database name from the tag and then add {'database':yourDbName'} it to any parameters when you execute the Named Query for data.

This gives you the advantage of being able to change from a DEV database to a Test or Production database by simply updating the value of the database name in your database tag.
It also comes in handy if you duplicate your application to another server and the database has a different name on the new server.