# Remote History Provider Transaction Group Data source

**URL:** <https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274>\
**Category:** Ignition\
**Tags:** database, perspective, ignition81\
**Created:** [March 16, 2022, 6:18pm UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274 "2022-03-16T18:18:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 16, 2022, 6:18pm UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/1 "2022-03-16T18:18:55Z")

</div>

Hi everyone!

I setup a Gateway Network and Remote History Provider. On the Remote Gateway the security for that database is Query and Storage.

I can see the connection works because I’m able to use Tag History/Historian.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3d544305699c8b43ab4773fdd4068cd246f3b23a.png)  
Even though it wasn’t in the database I wanted. It’s using the SQL Lite of Remote Gateway.

So I went to Transaction Groups to see if I can pick the database there but it’s not an option in my Data source.

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

Anyone knows what I am missing? Could it be the firewall blocking the connection?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 16, 2022, 6:26pm UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/2 "2022-03-16T18:26:29Z")

</div>

There is a difference between a history “Provider” and a “Data Source”.

A history provider is only available to the Tag Historian, even if that history provider is configured to use the same database that you want to connect to. You first have to configure a connection to that Database as a Data Source.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 16, 2022, 7:24pm UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/3 "2022-03-16T19:24:26Z")

</div>

> [@lrose](#):
>
> A history provider is only available to the Tag Historian

Ok, I missed that one. So why it's only logging the SQL Lite instead of the SQL Express? I'm not connected to the Remote Gateway right now so I can't double check.

> [@lrose](#):
>
> even if that history provider is configured to use the same database that you want to connect to.

I guess that means I have to connect my Local Gateway to the remote database.

> [@lrose](#):
>
> You first have to configure a connection to that Database as a Data Source.

Config -\> Database -\> Database Connections

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

When I setup this connection then its a matter of firewall or something like that.

Maybe I'm wrong, but now I'm thinking that the real benefit of Remote History Provider is the query part and not the storage. If I had setup an explicit connection from the beginning I should have been able to use the database for Tag Historian and Transaction Groups.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 16, 2022, 7:40pm UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/4 "2022-03-16T19:40:38Z")

</div>

> [@tupanaster](#):
>
> Ok, I missed that one. So why it’s only logging the SQL Lite instead of the SQL Express? I’m not connected to the Remote Gateway right now so I can’t double check.

By default there is a connection to Sample\_SQLite\_Database. SQL Express is not, and an installation of SQL Express would have to be provided by the end user and a connection added to the gateway to be used.

> [@tupanaster](#):
>
> I guess that means I have to connect my Local Gateway to the remote database

Yes a connection must be set up for the Remote Database on the Local Gateway in order for there to be a data source available for Transaction Groups.

> [@tupanaster](#):
>
> When I setup this connection then its a matter of firewall or something like that.

For the connection to work there must be network connectivity from the Gateway to the Database. That can be on a LAN or through a Firewall.

> [@tupanaster](#):
>
> Remote History Provider is the query part and not the storage.

Remote History Providers are different than Data sources. A Remote History Provider gives a remote gateway access to a History Provider configured on a Remote Gateway over the GAN. By default it will create a store and forward pipeline for sending data to a remote gateway, but can be configured for Read Only access allowing only querying historical data.

> [@tupanaster](#):
>
> If I had setup an explicit connection from the beginning I should have been able to use the database for Tag Historian and Transaction Groups.

You can add a database connection to the Gateway and also add a Datasource History Provider which will allow you to use the same database for both the Tag Historian and Transaction Groups.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 17, 2022, 8:23am UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/5 "2022-03-17T08:23:14Z")

</div>

> [@lrose](#):
>
> and an installation of SQL Express would have to be provided by the end user and a connection added to the gateway to be used.

You are right. SQL Lite comes with the installation for quick temporal storage.  
Now that I'm back at the server I can see I made a mistake.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/f/3f88cfb71788361053cf2f79a22a855bde0385dc.png)  
I just created that new newDatabase to see that its empty. The table above was the one from yesterday used for testing. I would assume that those tables were made when I set the Local Gateway to start storing remotely using Tag Historian.

> [@lrose](#):
>
> You can add a database connection to the Gateway and also add a Datasource History Provider which will allow you to use the same database for both the Tag Historian and Transaction Groups.

It is common to do it that way?  
Now that I'm clear that Remote History Provider is only for Tag Historian, I would pick a separate database for Transaction Groups.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 17, 2022, 11:45am UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/6 "2022-03-17T11:45:03Z")

</div>

> [@tupanaster](#):
>
> I would assume that those tables were made when I set the Local Gateway to start storing remotely using Tag Historian.

It did.

> [@tupanaster](#):
>
> It is common to do it that way?

I would say it is uncommon **not** to do it that way.

> [@tupanaster](#):
>
> I would pick a separate database for Transaction Groups.

Just want to make sure you also understand that you can have a Database Connection configured on the gateway to the same database. There is no need for multiple databases unless you are looking for that kind of segregation.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [March 17, 2022, 12:43pm UTC](https://forum.inductiveautomation.com/t/remote-history-provider-transaction-group-data-source/57274/7 "2022-03-17T12:43:46Z")

</div>

> [@lrose](#):
>
> I would say it is uncommon **not** to do it that way.

Got it.

> [@lrose](#):
>
> Just want to make sure you also understand that you can have a Database Connection configured on the gateway to the same database.

Crystal clear.

Thank you again @lrose

Hopefully, this post will be helpful to anyone starting out with connecting gateways.
