LESSON

Controlling Quarantine Data

Description

Find out where you can view quarantined records (data that could not be stored because of some configuration issues) and how you can retry (resend) them.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] In this lesson, we'll take a look at quarantined items and see what we can do with them. I'm in the status section of my gateway under connections and stored forward. You can see I have a quarantined item that was generated in a MySQL store forward engine. When a record is placed into the quarantine, it means that the query was unable to execute successfully. Instead of repeatedly trying to run the query, it is placed aside in the quarantine, providing an opportunity to correct or remove the record. Let's see what's going on with this record. I'll do so by clicking on the details button. You can see we have something listed under our quarantine items table. Here we have an id., the system gave the quarantined item as well as a count. If the same query is running multiple times, the system considers them all the same item, but different instances. We have a description of what the item is as well as the reason that it failed.

[01:07] Now, I intentionally caused this item to become quarantined. I have a transaction group that's running and it's trying to write to a table called fridge status. I renamed the table in my database to something else, but the transaction group executed before I could update the table name in the group settings. Because of this, I now have a quarantined item. I could retry the query by clicking on the retry button, but in this case it would fail again, since fridge status still doesn't exist. The engine would not drop items from the quarantine either, regardless of how many times you retry them. I could remove them but then the data would be lost forever. So what I could do instead is I could click on this export button over here. I'm going to try to fix this record so I can insert it back into my database. I'm going to click on export. This will download an XML file.

[02:04] I'm going to open it up here. You can use a text editor of your choice, and here we can see all my data as well as the database table that this is trying to write to. In my case, all I have to do is modify the name of the table, the record is attempting to insert to. So i'm just going to change the name of this table to match the new table name. I'm going to save my file and I'll use this import quarantine file section to add the updated record. I'll go ahead and select the file and submit. The page will reload, and you will now see I have two different items. So after importing a slightly different item into my quarantine, the system did not remove the old item. This gives me an opportunity to try pushing my corrected items into my database and then verify that they went where I wanted them to go. If not, I can take another export and try again. So for this top item here, the newly created item, I'm going to click the retry button.

[03:04] This is going to inject this back into one of the buffers and attempt to store into my database. So I'll click retry, and in just a moment you can see that the record went in. Now that my updated record has been inserted, I could go ahead and delete my old records here. However, if you wanted to save it for any reason, you could archive this record. To archive the record, we can go to the store and forward section of our config tab. If I click more here on the My SQL engine, I have an option to archive disk cache. Choosing this option would shut down the disk cache and the archive data would move to an installation folder. Using the database name and the timestamp as the folder name. I'll go ahead and archive. Here, we can archive by checking the warning off and hitting archive. If I navigate back to the store and forward under my status tab, you'll see my quarantine items are empty. I could load the records back into the quarantine using the load option instead of the archive option, this time. Again, I would go back to the store and forward under the config tab.

[04:11] I get another warning this time that the disk cache will be overwritten with my selection here. I'll choose the archive folder and check off the warning and hit load. I'll go back to the status section one more time to show my records were inserted. Since I have no use for this record anymore, I'll go ahead and delete it with the delete button. So if there ever is a problem in the store and forward with any of your data, you can always check the quarantine to see what the issue is and then make your corrections.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.