Manually Edit the db.ini File

Complete this section if you are modifying first or general connection attributes or both. This section must be completed before proceeding to the Modify First Connection Attributes or the Modify General Connection Attributes sections.

To modify first or general connection attribute requires a change in the sys.odbc.ini file.

If you have already created a TimesTenClassic object and you now want to change one or more first or general connection attributes in your sys.odbc.ini file, you must change the db.ini file.

The details as to how you should modify your db.ini file depends on the facility originally used to contain the db.ini file. (Possible facilities include ConfigMaps, Secrets, or init containers. See Populate the /ttconfig Directory.)

In this example, the ConfigMap facility was originally used to contain the db.ini file and to populate the /ttconfig directory of the TimesTen containers. The example modifies the sample ConfigMap.

The steps are as follows:

  1. Use the kubectl describe command to review the contents of the db.ini file (represented in bold) located in the original sample ConfigMap.
    % kubectl describe configmap sample
    Name:         sample
    Namespace:    mynamespace
    Labels:       <none>
    Annotations:  <none>
     
    Data
    ====
    adminUser:
    ----
    sampleuser/samplepw
     
    db.ini:
    ----
    PermSize=200
    DatabaseCharacterSet=AL32UTF8
    ConnectionCharacterSet=AL32UTF8
    
    schema.sql:
    ----
    create sequence sampleuser.s;
    create table sampleuser.emp (id number not null primary key, name char (32));
     
    Events:  <none>
    
  2. Use the kubectl edit command to modify the db.ini file in the original sample ConfigMap. Change the PermSize first connection attribute to 600 (represented in bold). Add the TempSize first connection attribute and set its value to 300 (represented in bold). Add the ConnectionCharacterSet connection attribute.
    % kubectl edit configmap sample
    # Please edit the object below. Lines beginning with a '#' will be ignored,
    # and an empty file will abort the edit. If an error occurs while saving this 
    # file will be reopened with the relevant failures.
    #
    apiVersion: v1
    data:
      adminUser: |
        sampleuser/samplepw
      db.ini: |
        PermSize=600
        TempSize=300
        DatabaseCharacterSet=AL32UTF8
        ConnectionCharacterSet=AL32UTF8
      schema.sql: |
        create sequence sampleuser.s;
        create table sampleuser.emp (id number not null primary key, name char (32));
    kind: ConfigMap
    metadata:
      creationTimestamp: "2025-01-16T19:23:59Z"
      name: sample
      namespace: mynamespace
      resourceVersion: "71907255"
      selfLink: /api/v1/namespaces/mynamespace/configmaps/sample 
     uid: 0171ff7f-f789-11ea-82ad-0a580aed0453
    ...
    configmap/sample edited
    
  3. Use the kubectl describe command to verify the changes to the sample ConfigMap. (The changes are represented in bold.)
    % kubectl describe configmap sample
    Name:         sample
    Namespace:    mynamespace
    Labels:       <none>
    Annotations:  <none>
     
    Data
    ====
    schema.sql:
    ----
    create sequence sampleuser.s;
    create table sampleuser.emp (id number not null primary key, name char (32));
     
    adminUser:
    ----
    sampleuser/samplepw
     
    db.ini:
    ----
    PermSize=600
    TempSize=300
    DatabaseCharacterSet=AL32UTF8
    ConnectionCharacterSet=AL32UTF8
     
    Events:  <none>
    

You have successfully changed the sample ConfigMap. If you are modifying first connection attributes, proceed to the Modify First Connection Attributes section. If you are modifying only general connection attributes, proceed to the Modify General Connection Attributes section.