# 7.3.3 DB driven real Time Tag provider

**URL:** <https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964>\
**Category:** Ignition\
**Created:** [February 7, 2012, 8:56pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964 "2012-02-07T20:56:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 7, 2012, 8:56pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/1 "2012-02-07T20:56:53Z")

</div>

Hi all,

Introduction

We have several SQLbridge modules - “distributed”, and “main” one SQLBridge and VisionModule, all works in one LAN

“Distributed” SQLBridge function:  
1)is to gateway between two OPC-servres using DBtags. (trying also transaction groups w/o success). 2)here we use only one SQL DB driven Tag provider.  
3)Tag configuration stores only here in DB

“Main” one function:

1. Connected to “distributed” DB
2. Using Real Time DB provider it wokrs with “distributed” Tags

Problem 1  
We configured “distributed” functions, but just we starting to use “distibuted” tags on “main” server all tags goes to “Stale” state and it looks like it stoped to execute on “distributed” machines cause OPC-gateway dont work.

Problem 2  
We try to import tags from csv format, but the Designer appears to start creating some of the tags, but then after a few seconds progress will stop with “Waiting for Gateway”. The request will eventually timeout after 60 seconds.  
Once the timeout occurs the database tag provider on the gateway appears to be hung. If the tag referesh icon is selected, the Tag Provider only displays the “Waiting” icon until the gateway once again times out after 60 seconds.  
This problem is similar to [viewtopic.php?f=72&t=7302&p=22078&hilit=Driving+Provider#p22078](http://www.inductiveautomation.com/forum/viewtopic.php?f=72&t=7302&p=22078&hilit=Driving+Provider#p22078) but it occurs in 7.3.2

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 7, 2012, 9:08pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/2 "2012-02-07T21:08:33Z")

</div>

Problem 2  
we successfully import tags from csv when we disconnect OPC servers AND ONLY using internal Tag provider

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 7, 2012, 9:36pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/3 "2012-02-07T21:36:36Z")

</div>

Hi,

So, to clarify, the tags provided by the remote Ignition appear stale when viewed from the central Ignition? Do they look correct when viewed on the Ignition that is driving them? Do you see the values changing?

The staleness is calculated based on the information in the “sqlth\_sci” table. Depending on the database and on the time zones of the two machines, problems can sometimes arise. Which database are you using, and are the two machines (and the database, if it’s on a 3rd machine) in different time zones?

Regards,

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 7, 2012, 9:47pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/4 "2012-02-07T21:47:30Z")

</div>

[quote="Colby.Clegg"]Hi,  
So, to clarify, the tags provided by the remote Ignition appear stale when viewed from the central Ignition? Do they look correct when viewed on the Ignition that is driving them? Do you see the values changing?  
[/quote]  
From central ignition: tags are stale  
Driving tags machine: tags are good quality, but not changable - write timeout, values not updates from OPC

> [@Colby.Clegg](#):
>
> The staleness is calculated based on the information in the "sqlth\_sci" table. Depending on the database and on the time zones of the two machines, problems can sometimes arise. Which database are you using, and are the two machines (and the database, if it's on a 3rd machine) in different time zones?

MySQL  
DB hosted on the Driving Tag Machine  
TimeZone is the same

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 7, 2012, 10:57pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/5 "2012-02-07T22:57:17Z")

</div>

On the driving machine, do you have errors in the console section of the gateway?

Also, make sure that the driver names are correct: in each of your driving providers, you need to specify a driver name (the default is “ignition”, but it must be different for each driving provider). And then, the tags from each system must be configured to use that driver name.

What are the values that are currently in the “sqlt\_drv” table? Also, when you view the “sqlt\_sci” table, do you see the “lastexec” timestamp increasing? Finally, how many tags are there in each system?

Regards,

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 8, 2012, 6:39pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/6 "2012-02-08T18:39:49Z")

</div>

[quote]On the driving machine, do you have errors in the console section of the gateway?  
[/quote]  
actually i need stable local system on tag driven machine and reconfigure Ignition with internl tag provider...

> [@](#):
>
> Also, make sure that the driver names are correct: in each of your driving providers, you need to specify a driver name (the default is "ignition", but it must be different for each driving provider). And then, the tags from each system must be configured to use that driver name.

all is fine

> [@](#):
>
> What are the values that are currently in the "sqlt\_drv" table?

i have 3 columns (Driver name, Ip address, port):  
Floor4  
192.168.90.140  
5500

> [@](#):
>
> Also, when you view the "sqlt\_sci" table, do you see the "lastexec" timestamp increasing? Finally, how many tags are there in each system?

How i can open this table? I use the MySQL Workbench it cannot open this table because it doesnt have a primary key.

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 8, 2012, 6:44pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/7 "2012-02-08T18:44:21Z")

</div>

Each driving machine has about 3200 tags…

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 10, 2012, 5:09pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/8 "2012-02-10T17:09:36Z")

</div>

So, tags on driving machine executed and are GOOD Quality. In the sqlt\_sci i have see the “lastexec” increasing. On the local machine i have stale tags. Day and time of each machine need to be sincronized or may be i need set some “time settings” in DB?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 10, 2012, 5:57pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/9 "2012-02-10T17:57:33Z")

</div>

Hi,

On the local machine, try running this query and see what the result is:

```auto
select sc_id,drivername, nextExec-CURRENT_TIMESTAMP from sqlt_sci;
```

If the time difference is negative, something must be strange. The system that monitors staleness actually gets the database time, and then loads the scan classes, and compares them… so the time on your local machine should actually make a difference.

Regards,

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 10, 2012, 6:08pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/10 "2012-02-10T18:08:26Z")

</div>

I have nextExec - CURRENT\_TIMESTAMP = 1

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 10, 2012, 6:10pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/11 "2012-02-10T18:10:32Z")

</div>

But i see that sometimes this difference = 0 and then again comes to 1

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 10, 2012, 6:47pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/12 "2012-02-10T18:47:39Z")

</div>

Is there any way you can give me access to the database over the internet? I can’t see why the tags would be stale, there must be something that just isn’t lining up correctly. If you can put the box on the internet, you can create a login for me with just access to that schema or the sqlt\_\* tables, and PM me the details. If you can’t, that’s ok, we’ll just have to try something else.

Even though the values are stale, do you see the value changes coming through?

Regards,

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 10, 2012, 9:44pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/13 "2012-02-10T21:44:51Z")

</div>

I cant give you remote accsess today, becouse the IT department is absent. I need to speak with them to configure the firewall for remote accsess. Maybe we can do something before tomorrow?

> [@](#):
>
> Even though the values are stale, do you see the value changes coming through?

Yes i see the values changes even the tags are stale

---

<div class="post-metadata">

**Author:** ![koval\_yuriy](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@koval\_yuriy](https://forum.inductiveautomation.com/u/koval_yuriy)\
**Post date:** [February 10, 2012, 9:54pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/14 "2012-02-10T21:54:48Z")

</div>

I think i can give you the remote accsess via RDP to the main server. From it you can get the remote accsess to the tag driving machine. Is this a way?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 10, 2012, 10:47pm UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/15 "2012-02-10T22:47:02Z")

</div>

Yeah, that would be great. If you PM me the information, or email me, I can look at it tonight or tomorrow.

Regards,

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 12, 2012, 2:36am UTC](https://forum.inductiveautomation.com/t/7-3-3-db-driven-real-time-tag-provider/3964/16 "2012-02-12T02:36:32Z")

</div>

The cause of this was a problem that has come up before, and I thought was fixed: the tag provider name for the consuming side (not the driver) was named the same as the “driver name” setting. This causes problems, as the non-driving provider thinks it’s responsible for the tags, when obviously it can’t “drive”. We’ll get this fixed, but in the mean time you can work around it by simply giving your tag provider a different name.

Regards,
