How do I forcibly set a cache status flag if the cache is unusable?
book
Article ID: KB0078902
calendar_today
Updated On:
Products
Versions
TIBCO Data Virtualization
7.0.0 and later
Description
Sometimes a cache refresh succeeds in that of all of the records from the refresh actually were written into the cache target table, but the cache status is still DOWN with an error message such as "Communications link failure during commit(). Transaction resolution unknown". Therefore, the cache cannot be used.
You may not want to rerun a long-running cache refresh as an attempt to set the cache status to UP, when you only need to fix the status if you are certain the cached data is correct.
Complete these steps in order to set the cache status flag:
Verify that all the records are in the cache table.
Run a SELECT COUNT(*) on the original (uncached) view.
Run a SELECT DISTINCT <cache key> FROM the cache target table in order to determine which cachekey corresponds to your last failed refresh - it will be the largest number present (your cache_status table that is configured by the target datasource will also show that cachekey for your resource with status = F).
Run a COUNT(*) on the cache target table where cachekey = value from the previous step.
If the two row counts match, it is likely that the cache refresh completed, otherwise do not proceed with these instructions.
Connect directly through an external SQL client tool to the database where your cache target resides. Find the corresponding cache_status table (you can verify its exact name in the data source configuration page in Studio) and find the row in it that corresponds to your cached resource. Update the record as shown here:
update <schema>.<my_cache_status_table> set "status" = 'A', "message" = null where "resourceid" = 'my_resource_path' and "cachekey" = cache_key_from_above
Due to repository caching, a TDV restart is strongly recommended afterwards for this to take effect.
Issue/Introduction
This document describes how to manually manipulate the status flag in the cache-status table and pertains to single table mode caching only. These actions are recommended for experienced TDV administrators only.