# How does drvid in sqlth\_partitions relate to scid and to entries in sqlth\_te?

**URL:** <https://forum.inductiveautomation.com/t/how-does-drvid-in-sqlth-partitions-relate-to-scid-and-to-entries-in-sqlth-te/23840>\
**Category:** Ignition\
**Created:** [April 4, 2019, 12:19am UTC](https://forum.inductiveautomation.com/t/how-does-drvid-in-sqlth-partitions-relate-to-scid-and-to-entries-in-sqlth-te/23840 "2019-04-04T00:19:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [December 21, 2022, 9:33pm UTC](https://forum.inductiveautomation.com/t/how-does-drvid-in-sqlth-partitions-relate-to-scid-and-to-entries-in-sqlth-te/23840/5 "2022-12-21T21:33:31Z")

</div>

It's not represented as a(n) SQL relationship, but there are always at least two records in `sqlth_drv`:

> [@Can I have two gateways using the same SQL database for historic logging?](https://forum.inductiveautomation.com/t/can-i-have-two-gateways-using-the-same-sql-database-for-historic-logging/56816/2):
>
> Not a problem at all (as long as they have distinct gateway names). The historian already uniquely identifies every record by what system and tag provider it came from. Check sqlth\_drv, there will be at least two records (one null, one probably with an entry for default) for each gateway you connect to a given historian.

Each tag provider you add to a given gateway will create a new row in `sqlth_drv` with the gateway name and provider name. When it comes time to retrieve history, the historian "knows" to look for the entry with a null provider.

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-does-drvid-in-sqlth-partitions-relate-to-scid-and-to-entries-in-sqlth-te/23840)._
