Skip to navigation

Data Integrity and Storage

View as Markdown

Ocient® provides several capabilities to check on the quality of data on a node and to quarantine segment groups that are problematic for any reason. Related to data integrity is the ability to rebuild tasks. For details, see Distributed Tasks.

ALTER SEGMENT QUARANTINE

ALTER SEGMENT QUARANTINE isolates segment groups from segment generation or queries. Use this SQL statement if segments are causing unexpected results or crashes. The segments can be un-quarantined by setting quarantine_level to none. 

Syntax

-- To quarantine a single segment group:
ALTER SEGMENT QUARANTINE FOR { <quarantine_level> }
WHERE SEGMENT_GROUP_ID = seg_id
-- To quarantine multiple segment groups:
ALTER SEGMENT QUARANTINE FOR { <quarantine_level> }
WHERE SEGMENT_GROUP_ID in ( seg_id [,...] )
<quarantine_level> ::=
segment_generation | query | all | none
ParameterData typeDescription
seg_idnumericThe identification numbers for segment groups.
Depending on your ALTER SEGMENT QUARANTINE statement, the Ocient System quarantines the specified segment groups for having an existing quarantine removed.
For details about finding abnormal segments, see the Guide to Rebuilding Segments.

Using Quarantine Levels ( <quarantine_level> )

You can place quarantines at these segment levels.

LevelDescription
segment_generationIsolates the specified segments from segment generation.
This statement prevents corrupt data from causing problems while still leaving the data available for future analysis.
queryIsolates segment groups from subsequent queries.
Data that is quarantined at the query level is not returned by database queries. This can be useful to prevent corrupt data from causing query problems while leaving it available for future analysis.
allIsolates the specified segments from segment generation and subsequent queries.
noneRemoves any quarantines from the specified segments.

Examples 

This example quarantines a single segment group from segment_generation. 

ALTER SEGMENT QUARANTINE FOR segment_generation WHERE SEGMENT_GROUP_ID = 123456789;

This example quarantines multiple segment groups from segment_generation. 

ALTER SEGMENT QUARANTINE FOR segment_generation WHERE SEGMENT_GROUP_ID IN (1,2,3,4,5);

This example removes a quarantine from a single-segment group.

ALTER SEGMENT QUARANTINE FOR none WHERE SEGMENT_GROUP_ID = 123456789;

This example removes a quarantine from multiple segment groups.

ALTER SEGMENT QUARANTINE FOR none WHERE SEGMENT_GROUP_ID IN (1,2,3,4,5);

This example quarantines at the query level.

ALTER SEGMENT QUARANTINE FOR query WHERE SEGMENT_GROUP_ID = 123456789;

This example removes a quarantine at the query level.

ALTER SEGMENT QUARANTINE FOR none WHERE SEGMENT_GROUP_ID = 123456789;

This example quarantines at both the query and segment-group levels.

ALTER SEGMENT QUARANTINE FOR all WHERE SEGMENT_GROUP_ID = 123456789;

Errors and Warnings