Verify TimesTen Cache Configuration

To verify that TimesTen Cache is configured correctly and is working properly, perform the following steps:

  1. Review the Pods.
    kubectl get pods
    The output is similar to the following.
    NAME                                 READY   STATUS    RESTARTS   AGE
    cachegrid-data-1-0                   2/2     Running   0          33m
    cachegrid-data-1-1                   2/2     Running   0          33m
    cachegrid-data-1-2                   2/2     Running   0          33m
    cachegrid-data-2-0                   2/2     Running   0          33m
    cachegrid-data-2-1                   2/2     Running   0          33m
    cachegrid-data-2-2                   2/2     Running   0          33m
    cachegrid-mgmt-0                     2/2     Running   0          33m
    cachegrid-zk-0                       1/1     Running   0          33m
    cachegrid-zk-1                       1/1     Running   0          32m
    cachegrid-zk-2                       1/1     Running   0          31m
    timesten-operator-7677964df9-sp2zp   1/1     Running   0          4d16h
    
  2. Use the kubectl exec -it command to invoke the shell in one of the data instances (cachegrid-data-1-0, in this example).
    kubectl exec -it cachegrid-data-1-0 -c tt -- /bin/bash
  3. Use ttIsql to connect to the cachegrid database. Confirm the TimesTen connection attributes are correct. In particular, note that the OracleNetServiceName connection attribute is correctly set to Oracache.
    ttIsql cachegrid
    The output is similar to the following.
    Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    
    
    
    connect "DSN=cachegrid";
    Connection successful: DSN=cachegrid;Durability=0;UID=timesten;
    DataStore=/tt/home/timesten/datastore/cachegrid;DatabaseCharacterSet=AL32UTF8;
    ConnectionCharacterSet=AL32UTF8;PermSize=200;Connections=100;
    OracleNetServiceName=Oracache;
    (Default setting AutoCommit=1)
    
  4. Use the ttIsql cachegroups to view the cache group.
    cachegroups;
    The output is similar to the following.
    Cache Group CACHEUSER_GRID.READCACHE:
    
      Cache Group Type: Read Only
      Autorefresh: Yes
      Autorefresh Mode: Incremental
      Autorefresh State: On
      Autorefresh Interval: 5 Seconds
      Autorefresh Status: ok
      Aging: No aging defined
    
      Root Table: ORATT_GRID.READTAB
      Table Type: Read Only
    
    1 cache group found.
    
  5. Use ttIsql to query the oratt_grid.readtab cache table. Note that the data from the oratt_grid.readtab cached table in the Oracle Database is correctly loaded in the oratt_grid.readcache cache table in the TimesTen database. Recall that you specified the LOAD CACHE GROUP statement in the cachegroups.sql metadata file.
    SELECT * FROM oratt_grid.readtab;
    The output is similar to the following.
    < 1, Hello >
    < 2, World >
    2 rows found.
    Exit ttIsql and the shell.
    exit;
    exit;

You verified that the cache group was created and data was correctly loaded.