Building a schema cache file
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Building a schema cache file
To build a schema cache file, you use the SAVE CACHE statement
together with a connected database. You must first decide whether
you need the entire schema cache or only the schema cache for selected
tables of a database. If your application accesses all the tables
in the database, you need the complete cache. Otherwise, you can
build a schema cache file for only the tables that are accessed
by your application.
In general, you build a schema cache file off-line, after making a schema change in the database. You can do this in the Procedure Editor directly, or you can write a small maintenance procedure to generate the file.
This is
the syntax of the SAVE CACHE statement:
Syntax
|
The database–name can
be the literal logical name of any OpenEdge database or the VALUE(expression)
option, where expression is a character expression
that evaluates to the database name.
The pathname can
be the literal pathname of an operating system file or the VALUE(expression)
option, where expression is a character expression
that evaluates to the pathname.
To save the entire schema cache:
- Connect to the database.
- Execute the
SAVE CACHEstatement using theCOMPLETEoption.
For an example
procedure that saves the entire schema cache for one or more databases,
see the SAVE CACHE Statement reference
entry in ABL Reference.
To save a partial schema cache for selected tables of a database:
- Connect to the database.
- Read each table you want to include in the schema cache with
a
FINDstatement. - Execute the
SAVE CACHEstatement using theCURRENToption. - If you want to save a different partial schema cache for the same database, disconnect the database and repeat Steps 1 through 3.