Create Metadata Files and a Kubernetes Facility
There are metadata files that are specific to using TimesTen Cache:
-
cacheUser
: This file is required. The user in this file is created in the TimesTen databases and serves as the cache manager. The name of this user must match the name of the cache administration user that you created in the Oracle Database. See "Create the Oracle Database Users" for information on the cache administration user in the Oracle Database. Also see "cacheUser" for more information on thecacheUser
metadata file. -
cachegroups
.sql
: This file is required. The contents of this file contain theCREATE
CACHE
GROUP
definitions. The file can also contain theLOAD
CACHE
GROUP
statement and the built-in procedures to update statistics on the cache group tables (such as,ttOptEstimateStats
andttOptUpdateStats
). See "cachegroups.sql" for more information on this file. -
tnsnames.ora
: This file is required. It defines Oracle Net Services to which applications connect. For TimesTen Cache, this file configures the connectivity between TimesTen and the Oracle Database (from which data is being cached). In this context, TimesTen is the application that is the connection to the Oracle Database. See "tnsnames.ora" for more information on this file. -
sqlnet.ora
: This file may be required. It may be necessary depending on your Oracle Database configuration. The file defines options for how client applications communicate with the Oracle Database. In this context, TimesTen is the application. Thetnsnames.ora
andsqlnet.ora
files together define how an application communicates with the Oracle Database. See "sqlnet.ora" for information on this file. -
db.ini
: This file is required if you are using TimesTen Cache. The contents of this file contain TimesTen connection attributes for your TimesTen databases, which will be included in TimesTen'ssys.odbc.ini
file. For TimesTen Cache, you must specify theOracleNetServiceName
and theDatabaseCharacterSet
connection attributes. TheDatabaseCharacterSet
connection attribute must match the Oracle database character set. See "db.ini" for more information on this file. -
schema.sql
: The contents of this file contain database objects, such as tables, sequences, and users. The instance administrator uses thettIsql
utility to run this file immediately after the database is created. This file is run before the Operator configures TimesTen Cache or replication, so ensure there are no cache definitions in this file.In TimesTen Cache, one or more cache table users own the cache tables. If this cache table user is not the cache manager user, then you must specify the
schema.sql
file and in it you must include the schema user and assign the appropriate privileges to this schema user. For example, if theoratt
schema user was created in the Oracle Database, and this user is not the TimesTen cache manager user, you must create the TimesTenoratt
user in this file. See "Create the Oracle Database Users" for more information on the schema users in the Oracle Database. Also see "schema.sql" for more information on theschema.sql
file.
In addition, you can use these other supported metadata files:
-
adminUser
: The user in this file is created in the TimesTen databases and is grantedADMIN
privileges. See "adminUser" for more information on this file. -
epilog.sql
: The contents of this file contain operations that must be performed after the Operator configures replication. For example, if you are using XLA, you could create replicated bookmarks for XLA in this file. This file is run after cache and replication have been configured. See "epilog.sql" for more information on this file.
You can include these metadata files in one or more Kubernetes facilities (for example, in a Kubernetes Secret, in a ConfigMap, or in an init container). This ensures the metadata files are populated in the /ttconfig
directory of the TimesTen containers. Note that there is no requirement as to how to get the metadata files into this /ttconfig
directory. See "Populate the /ttconfig Directory" for more information.
This example uses the ConfigMap facility to populate the /ttconfig
directory in your TimesTen containers. The adminUser
, db.ini
, schema.sql
, cacheUser
, cachegroups.sql
, tnsnames.ora
, and sqlnet.ora
metadata files are used in this example.
On your Linux development host:
You have successfully created and deployed the cachetest
ConfigMap.