Previous Topic: Customizable SQL Statement ProceduresNext Topic: Diagnostic Support


Managing Centera Blob Files

Be careful when you purge events stored in Centera clips. Multiple blobs (binary large object files) can be stored in a single clip, so do not delete the clip until all its blobs can be discarded or have been requeued for storage in Centera.

To requeue events, you must add a record referencing each event to be retained to the Wgn3EventQueue table. Typically, you add custom requeue code to the wgn_pre_blob_deletion custom stored procedure.

Example

PROCEDURE wgn_pre_pop_blob_deletion(date_range IN VARCHAR2) 
AS 
BEGIN 
   EXECUTE IMMEDIATE 'INSERT INTO Wgn3EventQueue (
     EventUID, eventtimestamp, StoreType, Location
     ) 
     SELECT eventuid, eventtimestamp, 2 AS StoreType, bloblocation 
     FROM Wgn3Event PARTITION('||wgn_get_partition_name('WGN3EVENT',date_range)||') E 
     WHERE blobtype = 2 AND (eventuid,eventtimestamp) 
        IN ( SELECT eventuid,eventtimestamp FROM '||wgn_get_tmp_tab_name('WGN3EVENT')||')' 
        || ' AND E.blobtype = 2 AND E.ispermanent = 0 AND E.BlobLocation IS NOT NULL' 
        || ' AND NOT EXISTS(SELECT 1 FROM Wgn3EventQueue eq 
             WHERE eq.EventUID = E.EventUID AND eq.eventtimestamp = E.eventtimestamp)'; 
END; 

When the infrastructure blob purge executes, the procedure purges any blobs listed in the Wgn3BlobDeletion table but skips any blobs that also exist in the Wgn3EventQueue table. Skipping these blobs gives the requeue mechanism time to reload any requeued blobs into a new Centera clip before the original clip is deleted.

Note: Clip date range boundaries and partition date range boundaries may not exactly match. Therefore, to avoid losing blob data you may need to extend the 'requeue events' query so that it extends beyond the database partition being purged.