# Get database name of sql based historical provider

**URL:** <https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621>\
**Category:** Ignition\
**Tags:** ignition83, perspective\
**Created:** [January 29, 2026, 9:05am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621 "2026-01-29T09:05:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [January 29, 2026, 9:05am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/1 "2026-01-29T09:05:05Z")

</div>

Is there way to get the database name the sql based historian provider uses in scripting?

I’m making a history migration tool.

Thanks.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 29, 2026, 9:11am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/2 "2026-01-29T09:11:07Z")

</div>

Are you aware of the System Tags Folder?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/61f67994c5e9ccd1d3b04d61ef939a97cae3b665.png)

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 29, 2026, 9:12am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/3 "2026-01-29T09:12:18Z")

</div>

Scripting:

> **[system.db.getConnections | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-db/system-db-getConnections)**
>
> Returns a dataset of information about each configured database connection. Each row represents a single connection.

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [January 29, 2026, 9:32am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/4 "2026-01-29T09:32:17Z")

</div>

I might have not been as clear,

I want to get the datasource( database connection) linked to the Storage Provider (Historian)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c6cf08f1ce098b41f842226d00519b5258abb658.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/5051493abe9b0709de1399506afd991ec660ef73.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/93273c0b5abad9f292da545b3a132affd5f72453.png)

So in this example the Storage provider is “Postgres” which is connected to database connection called ‘Ignition‘.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 29, 2026, 11:21am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/5 "2026-01-29T11:21:43Z")

</div>

Did you try the code I linked to?

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

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [January 29, 2026, 11:48am UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/6 "2026-01-29T11:48:24Z")

</div>

Yes but this only returns the default database connection of the project not the database connection used by the storage provider?

---

<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:** [January 29, 2026, 12:16pm UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/7 "2026-01-29T12:16:38Z")

</div>

The Core Historian (and internal historian) do not have a database connection. The SQL Historian's name is always the same name as the database connection.

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [January 29, 2026, 12:35pm UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/8 "2026-01-29T12:35:36Z")

</div>

This is true for Ignition 8.1 but as you can see in my screenshots from 8.3, the Historian name is “Postgres” but the database connection it is using (Data Source) is “Ignition”.

---

<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:** [January 29, 2026, 12:38pm UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/9 "2026-01-29T12:38:53Z")

</div>

Ah, hadn't noticed that.

Some introspection may be needed.

---

<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 29, 2026, 4:19pm UTC](https://forum.inductiveautomation.com/t/get-database-name-of-sql-based-historical-provider/113621/10 "2026-01-29T16:19:26Z")

</div>

Right now, you could use the REST API to read the config or reach into technically unsupported territory and use the underlying `ConfigurationManager` directly. In some future 8.3 version, hopefully 8.3.5, you'll be able to use `system.config` scripting to access configuration directly.
