# How get the IP of the databases connection?

**URL:** <https://forum.inductiveautomation.com/t/how-get-the-ip-of-the-databases-connection/84408>\
**Category:** Ignition\
**Tags:** database, ignition81, scripting\
**Created:** [January 17, 2024, 7:53pm UTC](https://forum.inductiveautomation.com/t/how-get-the-ip-of-the-databases-connection/84408 "2024-01-17T19:53:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [January 17, 2024, 7:53pm UTC](https://forum.inductiveautomation.com/t/how-get-the-ip-of-the-databases-connection/84408/1 "2024-01-17T19:53:03Z")

</div>

Hi!,  
I need obtain the IP of a databases connection.  
I intented use system.db.getConnectionInfo("my\_DB"), but the dataset return that not have the IP.  
Any idea?

---

<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:** [January 17, 2024, 8:05pm UTC](https://forum.inductiveautomation.com/t/how-get-the-ip-of-the-databases-connection/84408/2 "2024-01-17T20:05:32Z")

</div>

Why do you need the actual IP of the database?

---

<div class="post-metadata">

**Author:** ![Jorge\_Dalzotto](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jorge\_Dalzotto](https://forum.inductiveautomation.com/u/Jorge_Dalzotto)\
**Post date:** [January 18, 2024, 11:33am UTC](https://forum.inductiveautomation.com/t/how-get-the-ip-of-the-databases-connection/84408/3 "2024-01-18T11:33:23Z")

</div>

Hi, because, I'm working with Server and DBs replications and I want to make screen with information about connection status and connection info. The project is a general project for many costumer therefore I want not a static text, I want a dinamic field with this info.

---

<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:** [January 18, 2024, 3:46pm UTC](https://forum.inductiveautomation.com/t/how-get-the-ip-of-the-databases-connection/84408/4 "2024-01-18T15:46:40Z")

</div>

There are system tags automatically created with status information on each DB you can use to create a live display.

There's no single hostname field because a database connection doesn't necessarily imply a _remote_ connection or a hostname at all; look at SQLite or HSQLDB for two examples of local only DBs which have no concept of a hostname.

With sufficient scripting effort, you _could_ retrieve the connection URLs for each DB from the internal database; if you _really_ need to do this, that would be your starting point, and you'd have to parse out an IP address or hostname. Consider searching on the forum for some examples code to get started, I'm sure it already exists.
