Verify TimesTen Cache Configuration

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

  1. Review the active (cachetest-0, in this example) Pod and the standby Pod (cachetest-1, in this example).
    % kubectl get pods
    NAME                                       READY   STATUS    RESTARTS   AGE
    cachetest-0                                2/2     Running   0          8m16s
    cachetest-1                                2/2     Running   0          8m15s
    timesten-operator-f84766548-tch7s          1/1     Running   0          36d
  2. Use the kubectl exec -it command to invoke the shell in the active Pod (cachetest-0, in this example).
    % kubectl exec -it cachetest-0 -c tt -- /bin/bash
  3. Use ttIsql to connect to the cachetest database. Confirm the TimesTen connection attributes are correct. In particular, note that the OracleNetServiceName connection attribute is correctly set to Oracache (represented in bold).
    % ttIsql cachetest;
     
    Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
     
     
     
    connect "DSN=cachetest";
    Connection successful: DSN=cachetest;UID=timesten;DataStore=/tt/home/timesten/datastore/cachetest;
    DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;AutoCreate=0;
    PermSize=200;OracleNetServiceName=Oracache;DDLReplicationLevel=3;
    ForceDisconnectEnabled=1;
    (Default setting AutoCommit=1)
  4. Use the ttIsql cachegroups to view the definition of the cacheuser2.readcache and the cacheuser2.writecache cache groups.
    Command> cachegroups;
     
    Cache Group CACHEUSER2.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.READTAB
      Table Type: Read Only
     
    Cache Group CACHEUSER2.WRITECACHE:
     
      Cache Group Type: Asynchronous Writethrough (Dynamic)
      Autorefresh: No
      Aging: LRU on
     
      Root Table: ORATT.WRITETAB
      Table Type: Propagate
     
    2 cache groups found.
    
  5. Use ttIsql to query the oratt.readtab cache table. Note that the data from the oratt.readtab cached table in the Oracle Database is correctly loaded in the oratt.readcache cache table in the TimesTen database. Recall that you specified the LOAD CACHE GROUP statement in the cachegroups.sql metadata file. See Create Metadata Files and a Kubernetes Facility for information on this cachegroups.sql metadata file.
    Command> SELECT * FROM oratt.readtab;
    < 1, Hello >
    < 2, World >
    2 rows found.
    

You have verified that the cache groups were created and data was correctly loaded in the oratt.readtab table.