About Configuration Metadata Details
Metadata files let you specify the attributes and the metadata for your TimesTen database. After you create these files, and you choose a facility to get these files in your TimesTen containers, TimesTen accesses them to determine the attributes and the metadata that is specific to your database.
adminUser
The adminUser
file creates an initial user with ADMIN
privileges in the TimesTen database. If you provide this file, this user is created after the database is created. This file must contain one line of the form:
user/password
cachegroups.sql
cachegroups.sql
file contains the create cache group definitions and the cache group operations for your database. You can specify the following cache group definitions and cache operations in this file:
-
(Required):
CREATE
CACHE
GROUP
statements to create TimesTen cache groups -
(Optional):
LOAD
CACHE
GROUP
statements to load data from the Oracle database into your cache groups -
(Optional):
ttOptUpdateStats
orttOptEstimateStats
TimesTen built-in procedures to update statistics on the cache tables
The cachegroups.sql
file is required if you are using TimesTen Cache in your TimesTenClassic deployment. This requirement ensures cache groups are created before replication is configured. Note: The instance administrator uses the ttIsql
utility to run the cachegroups.sql
file.
See:
-
CREATE CACHE GROUP and LOAD CACHE GROUP in the Oracle TimesTen In-Memory Database SQL Reference
-
Cache Group Types in the Oracle TimesTen In-Memory Database Cache Guide
-
ttOptUpdateStats and ttOptEstimateStats in the Oracle TimesTen In-Memory Database Reference
Here is an example of a cachegroups.sql
file. The file defines two cache groups and loads data into one cache group.
CREATE DYNAMIC ASYNCHRONOUS WRITETHROUGH CACHE GROUP writecache FROM oratt.writetab ( pk NUMBER NOT NULL PRIMARY KEY, attr VARCHAR2(40) ); CREATE READONLY CACHE GROUP readcache AUTOREFRESH INTERVAL 5 SECONDS FROM oratt.readtab ( keyval NUMBER NOT NULL PRIMARY KEY, str VARCHAR2(32) ); LOAD CACHE GROUP readcache COMMIT EVERY 256 ROWS;
cacheUser
The cacheUser
file lets you create the TimesTen cache manager user. This user must have the same name as the cache administration user in the Oracle database, and must already exist in the Oracle database. See Create the Oracle Database Users and Default Tablespace in the Oracle TimesTen In-Memory Database Cache
Guide.
This file must contain one line of the form,
cacheUser/ttPassword/oraPassword
where cacheUser
is the TimesTen cache manager user, ttPassword
is the TimesTen password for the TimesTen cacheUser
user, and oraPassword
is the Oracle database password you specified when you created the cacheUser
user in the Oracle database.
For example, assume you have created the cacheuser2
cache administration user in the Oracle Database with password oraclepwd
. Assume you designate this cacheuser2
user as the TimesTen cache manager user with a TimesTen password of ttpwd
. In this example, the cacheUser
metadata file contains this one line:
cacheuser2/ttpwd/oraclepwd
The TimesTen Operator creates the cacheuser2
user with the ttpwd
in the TimesTen database. This cacheuser2
user then serves as the cache manager user in your TimesTen database. You do not need to create this TimesTen user. The Operator does it for you.
See Create the TimesTen Users in the Oracle TimesTen In-Memory Database Cache Guide.
The Operator grants privileges to the TimesTen cacheUser
user (cacheuser2
, in this example) that are appropriate for this user's role as the cache manager. These privileges are:
-
CREATE
SESSION
-
CACHE
MANAGER
-
CREATE
ANY
TABLE
-
LOAD
ANY
CACHE
GROUP
-
REFRESH
ANY
CACHE
GROUP
-
FLUSH
ANY
CACHE
GROUP
-
DROP
ANY
CACHE
GROUP
-
ALTER
ANY
CACHE
GROUP
-
UNLOAD
ANY
CACHE
GROUP
-
SELECT
ANY
TABLE
-
INSERT
ANY
TABLE
-
UPDATE
ANY
TABLE
-
DELETE
ANY
TABLE
csWallet
In a TimesTen Client/Server environment, data is transmitted between your client applications and your TimesTen database unencrypted by default. However, you can configure TLS for Client/Server to ensure secure network communication between TimesTen clients and servers. To encrypt Client/Server traffic, specify the /ttconfig/csWallet
file. This file contains the Oracle wallet for the server, which contains the credentials that are used for configuring TLS encryption between your TimesTen database and your Client/Server applications. The file will be available in the containers of your TimesTen databases in the directory /tt/home/timesten/csWallet
. You can reference this directory in your db.ini
file (by specifying the wallet
connection attribute). See Create TLS Certificates for Replication and Client/Server and Create TLS Certificates for Replication and Client/Server.
The client wallet must also be available to your client applications. See Create TLS Certificates for Replication and Client/Server and Configure TLS for Client/Server.
db.ini
The db.ini
file contains the TimesTen DSN definition for your database.
In TimesTen Classic, the db.ini
file contains the connection attributes for your database. This file is used to to generate the sys.odbc.ini
file for the instances. You can specify data store attributes, first connection attributes, and general connection attributes in the db.ini
file. The name of the DSN is the name of the TimesTenClassic object. For example, if your TimesTenClassic object is called sample
, the name of your DSN is sample
.
In TimesTenScaleout, the db.ini
file contains the connection attributes for each element of your database in the grid. The database definition file (dbDef) and its contents are used to create a TimesTen Scaleout database definition. The name of the database definition is the name of the TimesTenScaleout object. For example, if the name of your TimesTenScaleout object is sample
, the name of the database definition is sample
. The TimesTen Scaleout database is created based on the database definition. For information about creating a database and creating a database definition in TimesTen Scaleout, see Creating a Database in the Oracle TimesTen In-Memory Database Scaleout
User's Guide.
If you are using TimesTen Cache in your TimesTenClassic deployment, you must specify the OracleNetServiceName
and the DatabaseCharacterSet
connection attributes in the db.ini
file. The DatabaseCharacterSet
value must match the value of the database character set in the Oracle Database.
Do not specify the the DataStore
or the LogDir
connection attributes in the db.ini
file. The Operator sets these attributes, placing the database files in Kubernetes Persistent Volumes.
See List of Connection Attributes in the Oracle TimesTen In-Memory Database Reference for information on the TimesTen connection attributes.
Note:
If the /ttconfig/db.ini
file is not present in a TimesTen container, TimesTen creates a default sys.odbc.ini
file. For this default sys.odbc.ini
, the connection attributes are: Permsize
=200
and DatabaseCharacterSet
=AL32UTF8
.
This example shows a sample db.ini
file that contains various connection attributes for TimesTen databases in TimesTen Classic or TimesTen Scaleout.
PermSize=500 LogFileSize=1024 LogBufMB=1024 DatabaseCharacterSet=AL32UTF8
Here is an example that shows a sample db.ini
file that contains the OracleNetServiceName
for TimesTen databases that use TimesTen Cache in TimesTen Classic.
PermSize=500
LogFileSize=1024
LogBufMB=1024
DatabaseCharacterSet=AL32UTF8
OracleNetServiceName=OraCache
epilog.sql
In TimesTen Classic, the epilog.sql
file includes operations that occur after the replication scheme has been created and the replication agent has been started. For example, if you want to create replicated bookmarks in XLA, you can include the ttXlaBookmarkCreate
TimesTen built-in procedure in this file.
The Operator instructs the instance administrator to run the epilog.sql
file using the ttIsql
utility.
Here is an example of an epilog.sql
file. The example calls the ttXlaBookmarkCreate
TimesTen built-in procedure to create XLA bookmarks.
call ttXlaBookmarkCreate('mybookmark',0x01);
For information about replicated bookmarks, see the ttXlaBookmarkCreate TimesTen built-in procedure in the Oracle TimesTen In-Memory Database Reference.
replicationWallet
In TimesTen Classic, TimesTen replication transmits data between your TimesTen databases unencrypted by default. However, you can configure TLS for replication to ensure secure network communication between your replicated TimesTen databases. To do this, specify the /ttconfig/replicationWallet
file. This file contains an Oracle wallet, which contains the credentials that are used by TimesTen replication for configuring TLS encryption between your active standby pair of TimesTen databases. See Create TLS Certificates for Replication and Client/Server and Configure TLS for Replication.
If you specify this file, you must include the replicationCipherSuite
field and optionally include the replicationSSLMandatory
field in your TimesTenClassic object definition. See the replicationCipherSuite
entry and the replicationSSLMandatory
entry in TimesTenClassicSpecSpec and Configure TLS for Replication.
schema.sql
The TimesTen Operator can automatically initialize your database with schema objects, such as users, tables, and sequences. To have the Operator do this, create the schema.sql
file.
The Operator directs the instance administrator to use the ttIsql
utility to run the schema.sql
file immediately after the database is created. This operation occurs before the Operator configures replication or cache in your TimesTen database.
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 the oratt
schema user was created in the Oracle database, and this user is not the TimesTen cache manager user, you must create the TimesTen oratt
user in this file. See Create the Oracle Database Users.
Do not include cache definitions in this file. Instead, use the cachegroups.sql
metadata file. See cachegroups.sql.
sqlnet.ora
The Oracle Database sqlnet.ora
file defines the options for how client applications communicate with the Oracle Database. To use TimesTen Cache or to use tools like ttLoadFromOracle
, define a sqlnet.ora
file. This file describes how applications, including TimesTen, can connect to your Oracle database. Note: If you define a sqlnet.ora
file, you must define a tnsnames.ora
file. See tnsnames.ora.
This is an example of a sqlnet.ora
file:
NAME.DIRECTORY_PATH= {TNSNAMES, EZCONNECT, HOSTNAME} SQLNET.EXPIRE_TIME = 10 SSL_VERSION = 1.2
testUser
The testUser
file defines a test
user. This user is used for testing TimesTen with the helm
test
command. The user is granted CONNECT
privileges. The test connects to a TimesTen database as the test
user. The test verifies that both the active and standby databases are up and running and that replication between them is functional.
testUser
file must contain one line of the form:testuser/testuserpassword
where testuser
is the name of your test
user and testuserpassword
is the password for this test user.
For more information about using Helm and using the helm
test
command to test TimesTen, see Use Helm to Deploy the TimesTen Kubernetes Operator and TimesTenClassic Objects and Test TimesTen.
tnsnames.ora
The Oracle Database tnsnames.ora
file defines Oracle Net Services to which applications connect. You need to use tnsnames.ora
(and perhaps a sqlnet.ora
file, described in sqlnet.ora) if you are using:
-
TimesTen Cache
-
SQL APIs, such as Pro*C, OCI, or ODPI-C
-
The
ttLoadFromOracle
feature
For information about the ttLoadFromOracle
TimesTen built-in procedure, see ttLoadFromOracle in the Oracle TimesTen In-Memory Database
Reference.
Here is an example of a tnsnames.ora
file:
OraTest = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = database.mynamespace.svc.cluster.local) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = OraTest.my.sample.com))) OraCache = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = database.mynamespace.svc.cluster.local) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = OraCache.my.sample.com)))
*.connect
Files with names that end with the .
connect
extension define one or more direct connectables for direct mode access to a database in TimesTen Scaleout. You can create as many direct connectables as you like. A direct connectable specifies a set of general connection attribute settings for the database. You can choose any name for the direct connectable as long as it is a valid DSN name. The TimesTen Operator creates one direct connectable for each direct connectable file you create. The .connect
extension denotes a direct connectable. Ensure the .connect
extension is in lowercase.
The following example creates one direct connectable. The name of the file is sample.connect
. The TimesTen Operator creates the sample
direct connectable based on the contents of the sample.connect
file.
ConnectionCharacterSet=AL32UTF8
For more information about direct connectables, see Connectable Operations in the Oracle TimesTen In-Memory Database Reference and Connecting to a Database in the Oracle TimesTen In-Memory Database Scaleout User's Guide.
*.csconnect
Files with names that end with the .
csconnect
extension define one or more client/server connectables for client/server access to a database in TimesTen Scaleout. You can create as many client/server connectables as you like. A client/server connectable specifies a set of general connection attribute settings for the database. You can choose any name for the client/server connectable as long as it is a valid DSN name. The TimesTen Operator creates one client/server connectable for each client/server connectable file you create. The .csconnect
extension denotes a client/server connectable. Ensure the .csconnect
extension is in lowercase.
The following example creates one client/server connectable. The name of the file is samplecs.csconnect
. The TimesTen Operator creates the samplecs
client/server connectable based on the contents of the samplecs.csconnect
file.
ConnectionCharacterSet=AL32UTF8
TTC_Timeout=30
For more information about client/server connectables, see Connectable Operations in the Oracle TimesTen In-Memory Database Reference and Connecting to a Database in the Oracle TimesTen In-Memory Database Scaleout User's Guide.