Consultor Eletrônico



Kbase P14706: How do I create a schema cache file?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   08/04/2008
Status: Verified

GOAL:

How do I create a schema cache file?

GOAL:

What is a schema cache file?

GOAL:

Why do I need to use a schema cache file?

FACT(s) (Environment):

All Supported Operating Systems
Progress 7.x
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

Creating Schema Cache Files

When Progress starts a client application, it loads the schema for each database that the application requires into memory. Ordinarily, Progress reads the schema from the database, which can be on a remote server. If the network is slow, or the server, itself, is overloaded, this can increase startup time significantly.

You can shorten client startup time by building and saving a schema cache file on a disk local to the client. A schema cache file is a machine-portable binary file containing a complete schema or subschema for a single Progress database. When you start a client application with local schema cache files, Progress reads the required schema for each database almost instantaneously from the local disk rather than waiting for network or server traffic.


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: SAVE CACHE { CURRENT | COMPLETE }

database-name TO pathname

The database-name can be the literal logical name of any Progress database or the VALUE(expression) option, where expression is a character expression that evaluates to the database name.

For a DataServer, Progress saves the schema cache for the entire schema holder database. You cannot save the schema cache for a non-Progress database separately. For more information on schema cache files for DataServers, see your Progress DataServer guide.

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.

Saving the Entire Schema Cache

To save the entire schema cache.

Connect to the database.

Execute the SAVE CACHE statement using the COMPLETE option.

For an example procedure that saves the entire schema cache for one or more databases, see the SAVE CACHE Statement reference entry in the Progress Language Reference.