CREATE CACHE "catalog"."schema"."view" IN "cache-catalog"."cache-schema"
[{OPTIONS SAS-table-option=value [ ... SAS-table-option=value ]}]
[USING ( fedsql_syntax_sql )]
[WITH COMMENT '…']
[DEFERRED]
[FORCE]
[EXEC|EXECUTE]
[BEFORE (fedsql_syntax_sql) [FORCE]
[,(fedsql_syntax_sql) [FORCE] […]]]
[AFTER (fedsql_syntax_sql) [FORCE]
[,(fedsql_syntax_sql) [FORCE] […]]]
[CLEANUP (fedsql_syntax_sql) [FORCE]
[,(fedsql_syntax_sql) [FORCE] […]]]
[SET] option_name = ’string_literal’ | numeric_literal
| ON | OFF | YES | NO | TRUE | FALSE ]
Specifies the catalog name of the view to be cached.
Specifies the schema name of the view to be cached.
Specifies the name of the cache view.
Specifies the catalog name under which to create the cache.
Specifies the schema name under which to create the cache.
Specifies the table options to use when the data cache table is created and populated.
The optional USING clause provides a way for users to control how the cache table is created. The user must ensure that it is compatible with the view data cache table.
Text comments stored with the cache definition.
The cache definition is stored but a cache table is not created or populated with data. Issue a separate REFRESH CACHE command to create and populate the cache table.
The cache table and definition is retained even if an error occurs during REFRESH.
Use the EXEC | EXECUTE command with the BEFORE, AFTER, and CLEANUP options as specified below.
BEFORE (fedsql_syntax) [FORCE]
The statements in fedsql_syntax will be executed before the cache table is created and populated. The FORCE option suppresses any errors.
AFTER (fedsql_syntax) [FORCE]
The statements in fedsql_syntax will be executed after the cache table is created and populated. The FORCE option suppresses any errors.
CLEANUP (fedsql_syntax) [FORCE]
The statements in fedsql_syntax will be executed only in the event of an error during creation or population of the cache table. The FORCE option will suppress any errors.
Expands to a fully qualified cache table name using “double quotation marks”.
Expands to a cache catalog name. Does not use quotation marks.
Expands to a cache schema name. Does not use quotation marks.
Expands to a cache table name. Does not use quotation marks.
SET option_name=value
Specifies additional options and values to use during cache creation and population. The options are listed below.
Sets a limit on the number of errors to allow before a statement stops inserting data.
Sets a limit on the number of modified rows to commit at one time, which affects transaction logging limits on the back-end database. This option overrides the ERRLIMIT option.
Sets a limit for the number of rows inserted at a time which places a limit on a driver's row array size when inserting data.
Sets the CT_PRESERVE connection string option which controls how data types are mapped between the source view and the cache
table. Valid options are FORCE|FORCE_COL|FORCE_COL_SIZE|STRICT|SAFE
.
RESTART='REFRESH'
REFRESH sets active or deferred caches to automatically refresh after each server start up. Suspended or disabled caches are not affected.
CREATE CACHE ORACLE_SERVICE.TKTSTST1.view_red in "SAMPLE"."tktstst1" set CT_PRESERVE='SAFE'
ALTER CACHE "catalog"."schema"."view" OPTION
Specifies the catalog, schema and name of the view.
Specifies an option for the statement as one of the following:
Disables use of the specified cache. References to the view use the view rather than the cached data.
Enables use of the specified cache after having been disabled.
Refreshes the cache table for the specified view.
ALTER CACHE "catalog1"."schema1"."view1" DISABLE
ALTER CACHE [ "catalog2"."schema2". ] view2 ENABLE
ALTER CACHE [ "catalog3"."schema3". ] view3 REFRESH
DROP CACHE [ "catalog"."schema". ] view [FORCE ]
Specifies the catalog and schema of the data cache view.
Specifies the name of the data cache view.
FORCE | Suppresses error messages if the cache to be dropped does not exist. |
PURGE CACHE