Modify General Connection Attributes
If you have not modified the db.ini file, proceed to the Manually Edit the db.ini File section. You can either directly modify the sys.odbc.ini file for the active TimesTen database and the sys.odbc.ini file for the standby TimesTen database or you can follow the steps in the Modify First Connection Attributes section. The first approach (modifying the sys.odbc.ini file directly) is less disruptive.
This section discusses the procedure for directly modifying the sys.odbc.ini files.
The sys.odbc.ini file is located in the TimesTen container of the Pod containing the active TimesTen database and in the TimesTen container of the Pod containing the standby TimesTen database. After you complete the modifications to the sys.odbc.ini files, subsequent applications can connect to the database using these general connection attributes.
This example illustrates how to edit the sys.odbc.ini files.
-
Use the
kubectlexec-itcommand to invoke a shell in the active Pod. (In this example,sample-0is the active Pod.)% kubectl exec -it sample-0 -c tt -- /bin/bash Last login: Thu Jan 16 22:43:26 UTC 2025 on pts/8
-
Verify the current directory (
/tt/home/timesten).% pwd /tt/home/timesten
-
Navigate to the directory where the
sys.odbc.inifile is located. Thesys.odbc.inifile is located in the/tt/home/timesten/instances/instance1/confdirectory. Therefore, navigate to theinstances/instance1/confdirectory.% cd instances/instance1/conf
-
Edit the
sys.odbc.inifile, adding, modifying, or deleting the general connection attributes for your DSN. (sample, in this example.)Note:
Ensure that you only make modifications to the TimesTen general connection attributes. Data store attributes and first connection attributes cannot be modified by directly editing the
sys.odbc.inifile.This example modifies the
sampleDSN, adding theConnectionCharacterSetgeneral connection attribute and setting its value equal toAL32UTF8(represented in bold).vi sys.odbc.ini [ODBC Data Sources] sample=TimesTen 22.1 Driver tt=TimesTen 22.1 Driver [sample] Datastore=/tt/home/timesten/datastore/sample PermSize=200 DatabaseCharacterSet=AL32UTF8 ConnectionCharacterSet=AL32UTF8 DDLReplicationLevel=3 AutoCreate=0 ForceDisconnectEnabled=1 ...
-
Use the
ttIsqlutility to connect to thesampledatabase and verify the value of theConnectionCharacterSetattribute isAL32UTF8(represented in bold).% ttIsql sample Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=sample"; Connection successful: DSN=sample;UID=timesten;DataStore=/tt/home/timesten/datastore/sample; DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8; AutoCreate=0;PermSize=200;DDLReplicationLevel=3;ForceDisconnectEnabled=1; (Default setting AutoCommit=1)
You have successfully modified the sys.odbc.ini file located in the TimesTen container of the active Pod (in this example, sample-0). Use the same procedure to modify the sys.odbc.ini file located in the TimesTen container of the standby Pod (in this example, sample-1).
For example:
You have successfully modified the sys.odbc.ini file located in the TimesTen container of the active Pod (sample-0) and the sys.odbc.ini file located in the TimesTen container of the standby Pod (sample-1). The ConnectionCharacterSet general connection attribute has also been modified.