Create Metadata Files and a Kubernetes Facility
The following metadata files 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. 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. -
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. -
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. -
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. -
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_grid
schema user was created in the Oracle Database, and this user is not the TimesTen cache manager user, you must create the TimesTenoratt_grid
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, use these metadata files for TimesTenScaleout objects:
-
*.connect
: A file with the.connect
extension signifies a direct connectable that is used for direct mode access to a database in TimesTen Scaleout. The*
prefix is the name you choose for the connectable. You can define more than one. See *.connect. -
*.csconnect
: A file with the.csconnect
extension signifies a client/server connectable that is used for client/server access to a database in TimesTen Scaleout. The*
prefix is the name you choose for the connectable. You can define more than one. See *.csconnect. -
adminUser
(Optional): The user in this file is created in the TimesTen databases and is grantedADMIN
privileges. See adminUser 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.
On your Linux development host:
You successfully created and deployed the cachegrid
ConfigMap.