qua_set_view_copy_status#
Allows setting the view cache internal status flag. Useful for manual cache management.
Syntax#
qua_set_view_copy_status 'view_name', 'status', [ 'copy' ] [;]
Arguments#
‘view_name’
Fully qualified name of view.
‘status’
INT that can have a value between 0 and 3 with the following meaning:
Value |
Meaning |
---|---|
0 (None) |
A cached copy of a view was not created. |
1 (Created) |
Table was created, data not yet loaded. |
2 (Load Running) |
The copy is available only as a target of a full load and should not be used for querying. |
3 (Loaded) |
A cached copy of a view was fully loaded and is ready for use. |
‘copy’
SYSNAME that can be one of two values: ‘primary’ or ‘secondary’ with default value ‘primary’. Optional.
Example#
Sets view copy status to loaded (presumably after cache was loaded) for AdventureWorksDW2012_spark.dbo.DimEmployee.
EXEC qua_set_view_copy_status @view_name = 'AdventureWorksDW2012_spark.dbo.DimEmployee', @status = 3;