# Modifying SQL tag properties stored in a DBprovider

**URL:** <https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158>\
**Category:** Ignition\
**Created:** [March 16, 2012, 7:48pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158 "2012-03-16T19:48:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 16, 2012, 7:48pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/1 "2012-03-16T19:48:18Z")

</div>

I done a bad thing and lost my Advance Course example project I was working with while at Folsom.

What I am doing is setting a template project that has generic tags defined as Alerts. The plan is to update these tags using SQL queries. I can remember from the course how to access the sqlt\_as table and find the alert name for the tag i wish to modify. What I can remember is which timestamp i need to UPDATE via an SQL now() so that the tag change occurs without having to reboot the gateway.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/f510ab4dcd5849b34e6d12d3f6f1518a440b2e06.jpg)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 16, 2012, 7:50pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/2 "2012-03-16T19:50:17Z")

</div>

It is:`UPDATE sqlt_core SET configchange = CURRENT_TIMESTAMP WHERE id = ?`Replace the ? with the tag id.

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 16, 2012, 8:08pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/3 "2012-03-16T20:08:45Z")

</div>

That 's the one!

Thanks Travis. I had my course backup gateway project stored on my Samsung phone, and when I transferred it to my laptop I performed a move instead of a copy.

Then a late night last week on a jobsite switching back and forth between gateway backups, i forgot to archive course gateway.  
Doh!

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 16, 2012, 10:00pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/4 "2012-03-16T22:00:31Z")

</div>

> [@Travis.Cox](#):
>
> It is:`UPDATE sqlt_core SET configchange = CURRENT_TIMESTAMP WHERE id = ?`Replace the ? with the tag id.

WelL, I was doing that and cannot get the alert name to change unless I toggle the Gateway Service Off/On.

Below Pic is after reboot.  
Pic below that is alert name after changing time\_stamp of configchange  
Pic below that confirm timestamp change of tag @ id 2  
Bottom pic is new alert name for tag  
using V7.4 RC2

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/fb8f5fcb221f730c96da7c599ea0e9f8e4fac663.jpg)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/7ce122e0fcbe1adb37db7449b6b7ad362650e2b4.jpg)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/1971824a68d29fc043edf87c19ac65710e12d68c.jpg)  
  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/1d6c3b30229e1615850aa88587ba8e98a123ecd4.jpg)

---

<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:** [March 19, 2012, 10:23pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/5 "2012-03-19T22:23:18Z")

</div>

Do the tags get values after you cause them to reload? Is it possible that the driver name isn’t set correctly, and they’re not actually getting driven by Ignition? Check the “drivername” column, is it set to the same value as that set on the driving provider’s settings? (The default is “ignition”).

Regards,

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 21, 2012, 2:40pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/6 "2012-03-21T14:40:44Z")

</div>

Colby,

When I use V7.3.X, tags update when configchange’s timestamp changes. When I use V7.4 RC2 , i need to toggle the Ignition Gateway Off/On to get tag updates to stick eventhough sqlt\_core and sqlt\_as have updated.

---

<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:** [March 21, 2012, 3:49pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/7 "2012-03-21T15:49:53Z")

</div>

Hi,

Thanks, I’ll take a look.

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:** [March 27, 2012, 5:58pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/8 "2012-03-27T17:58:04Z")

</div>

Finally got around to looking at this. I found some problems with creating & deleting tags in the external provider, but didn’t have a problem modifying properties directly against the db. It could be that we fixed something, or more likely, that my test case isn’t quite like yours, and is missing something.

Maybe we can arrange a time to get on GoToMeeting so I can look at it, or maybe you could send me a export of your sqlt\_core, sqlt\_meta, and sqlt\_as tables? You can email them to support or post here.

Regards,

---

<div class="post-metadata">

**Author:** ![Curlyandshemp](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Curlyandshemp](https://forum.inductiveautomation.com/u/Curlyandshemp)\
**Post date:** [March 27, 2012, 11:42pm UTC](https://forum.inductiveautomation.com/t/modifying-sql-tag-properties-stored-in-a-dbprovider/4158/9 "2012-03-27T23:42:21Z")

</div>

Perhaps next week then.  
Currently I am at the out of town job site where I posted about Mission Critical Master Backup Versions in the forum.
