# Indication if SQL BRIDGE is the best option

**URL:** <https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772>\
**Category:** Ignition\
**Created:** [March 29, 2023, 2:07pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772 "2023-03-29T14:07:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Bevilaqua](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@Lucas\_Bevilaqua](https://forum.inductiveautomation.com/u/Lucas_Bevilaqua)\
**Post date:** [March 29, 2023, 2:07pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/1 "2023-03-29T14:07:23Z")

</div>

A customer has several machines in his plant, with several PLC's.  
The initial idea was to insert production data for each machine into a database table respectively.  
For example:  
Machine 1: You will insert data in the respective table, such as the average speed of the machine, quantity produced, downtime, among other data at each change of production order, this data is easily available from the machine's PLC.

Doubts:  
How many PLC's can I connect with the same SQL Bridge license?  
Is SQL Bridge really the best fit?  
Transaction groups, do they need to be turned on every time I restart the computer they are installed on?  
With the SQL Bridge license, can I create an application from the ignition designer, so that every time I lose connection or power outages, it automatically starts inserting data?

---

<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:** [March 29, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/2 "2023-03-29T16:14:01Z")

</div>

> [@Lucas\_Bevilaqua](#):
>
> How many PLC's can I connect with the same SQL Bridge license?

No limit by default, as with anything else in Ignition. Just make sure you have suitably powerful servers.

> [@Lucas\_Bevilaqua](#):
>
> Is SQL Bridge really the best fit?

Not sure. You don't really describe what kind of data you are recording. Process values? Quality or other data per piece? Speed? Uptime? Fault codes?

> [@Lucas\_Bevilaqua](#):
>
> Transaction groups, do they need to be turned on every time I restart the computer they are installed on?

They start automatically with the gateway. Just like tag history with the historian.

---

<div class="post-metadata">

**Author:** ![Lucas\_Bevilaqua](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@Lucas\_Bevilaqua](https://forum.inductiveautomation.com/u/Lucas_Bevilaqua)\
**Post date:** [March 29, 2023, 4:30pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/3 "2023-03-29T16:30:51Z")

</div>

> [@pturmel](#):
>
> Not sure. You don't really describe what kind of data you are recording. Process values? Quality or other data per piece? Speed? Uptime? Fault codes?

Initially, there are few values, I believe that approximately 200 int type tags, there is no need to be quick to insert, usually the production order changes that would be the trigger for insertion occur every 2~3 hours.  
Fault codes are not needed now.

> [@pturmel](#):
>
> They start automatically with the gateway. Just like tag history with the historian.

Can login be done automatically?

---

<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:** [March 29, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/4 "2023-03-29T16:42:01Z")

</div>

> [@Lucas\_Bevilaqua](#):
>
> Can login be done automatically?

The Ignition Gateway runs as a service. Transaction groups run as part of this service. You do not need a Vision Client or Perspective session running in order for the TGs to execute.

Check with your IT on automatic service start. There are differences between Windows and Linux, but both are possible.

---

<div class="post-metadata">

**Author:** ![Alan\_Cannon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alan_cannon/32/31171_2.png) [@Alan\_Cannon](https://forum.inductiveautomation.com/u/Alan_Cannon)\
**Post date:** [March 29, 2023, 6:46pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/5 "2023-03-29T18:46:39Z")

</div>

so i have a similar ?  
can i use:

```
system.db objects
named queries

```

without the SQL Bridge Module ? the manual references transaction groups and a few other tools, but does not explicitly say anything about the system.db class

Best,  
Alan

---

<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:** [March 29, 2023, 7:02pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/6 "2023-03-29T19:02:33Z")

</div>

Those scripting functions are part of the platform. Neither the Tag Historian nor the SQL Bridge module are required.

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://forum.inductiveautomation.com/u/peter)\
**Post date:** [March 29, 2023, 7:27pm UTC](https://forum.inductiveautomation.com/t/indication-if-sql-bridge-is-the-best-option/71772/7 "2023-03-29T19:27:12Z")

</div>

> [@Alan\_Cannon](#):
>
> so i have a similar ?  
> can i use:
> 
> ```
> system.db objects
> named queries
> 
> ```
> 
> without the SQL Bridge Module ? the manual references transaction groups and a few other tools, but does not explicitly say anything about the system.db class
> 
> Best,  
> Alan

I currently a using various scripts to pull down data from 65 machines (eventually will be 100+) and insert the data in a DB via named queries without using the SQL Bridge module, even though I have it.

I have a two main types of queries. One is triggered via a GW timer event running a script, and inserts data into a database of real time values. The other is triggered from a tag change event and logs data to an archival DB at the finish of an instruction. This latter script is encapsulated in a UDT so that I only have to maintain one copy of it.

The only tricky part is that you have to have the correct context name in order to successfully call the named queries from some of the events (I think tag change, but I can't remember). This context name is simply the name of the project you are running under. I ended up hard coding it.

In my case, the sales guy sold us the SQL Bridge module because at the time we knew nothing about Ignition and we had no idea about the actual architecture we were going to implement. But in hindsight it was not needed.
