skip to main content
OpenEdge Data Management: DataServer for ODBC
Connecting the DataServer : Connecting a schema holder : Local schema caching
 

Local schema caching

By using a local file to store schema definitions, you can access them more quickly. Once you create a local schema cache, you connect to the schema holder only when you compile applications. You no longer rely on having a local schema holder for maximum performance. Running DataServer applications with a local schema cache instead of a schema holder also results in better performance in networked environments.
The ABL SAVE CACHE COMPLETE statement creates a binary file that contains the entire schema for an OpenEdge database. Use this statement to create a cache file for a connected schema holder:
SAVE CACHE COMPLETE schema-holder-name TO filename.
For example, the following statement creates a cache file named sqlcache for the sqlhold schema holder:
SAVE CACHE COMPLETE sqlhold TO sqlcache.
To use the cache file for a schema holder, specify the Schema Cache File (-cache) startup parameter and the cache filename when you connect to the schema holder. For example, the following CONNECT statement connects an ODBC-supported database whose data source name is sqlserv1 with the schema sqlhold and tells OpenEdge to use the cache file:
CONNECT sqlhold -RO -cache sqlchache -db sqlbdb -dt ODBC -ld sqldemo
-U bob -P bobpass -Dsrv qt_debug,EXTENDED,PRGRS_CONNECT,server=sqlserv1.
If you make any changes to a schema holder, you must create a new cache file for it. For more information, see OpenEdge Getting Started: ABL Essentials and the SAVE CACHE Statement reference entry in OpenEdge Development: ABL Reference.