Verify Conditions Are Met for the Database

Perform these steps to ensure the conditions are met for the database (the database to be the active). In this example, sample-1 will be the new active.

Note: These steps require you to use TimesTen utilities and TimesTen built-in procedures. See Utilities and Built-In Procedures in the Oracle TimesTen In-Memory Database Reference for details.

  1. Confirm the TimesTenClassic object (sample, in this example) is in the ManualInterventionRequired state (represented in bold).
    % kubectl get ttc sample
    NAME     STATE                        ACTIVE     AGE
    sample   ManualInterventionRequired   sample-0   12h
    
  2. Use the kubectl exec -it command to invoke the shell within the sample-1 Pod that contains the TimesTen database. (This database will be the new active.)

    The remaining procedures take place within this shell.

    % kubectl exec -it sample-1  -c tt -- /bin/bash
  3. Use the ttDaemonAdmin utility to start TimesTen daemon (if not already started). Then use the ttAdmin utility to load the TimesTen database into memory (if not already loaded).
    % ttDaemonAdmin -start
    TimesTen Daemon (PID: 5948, port: 6624) startup OK.
    % ttAdmin -ramLoad sample
    RAM Residence Policy            : manual
    Manually Loaded In RAM          : True
    Replication Agent Policy        : manual
    Replication Manually Started    : False
    Cache Agent Policy              : manual
    Cache Agent Manually Started    : False
    Database State                  : Open
    
  4. Use the ttIsql utility to connect to the sample database. Then, call the ttRepStop built-in procedure to stop the replication agent.
    % 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)
    Command> call ttRepStop;
    
  5. From within ttIsql, use the SQL DROP ACTIVE STANDBY PAIR statement to drop the active standby pair replication scheme. Then use the ttIsql repschemes command to verify there are no replication schemes in the database. Exit from ttIsql.
    Command> DROP ACTIVE STANDBY PAIR;
    Command> repschemes;
     
    0 replication schemes found.
    
  6. Use the ttStatus utility to verify the TimesTen daemon is running and the replication agent is not running. Note: The ttStatus output may change from release to release.
    % ttStatus
    TimesTen status report as of Thu Jan 16 02:14:15 2025
     
    Daemon pid 5948 port 6624 instance instance1
    TimesTen server pid 5955 started on port 6625
    ------------------------------------------------------------------------
    ------------------------------------------------------------------------
    Data store /tt/home/timesten/datastore/sample
    Daemon pid 5948 port 6624 instance instance1
    TimesTen server pid 5955 started on port 6625
    There are 15 connections to the data store
    Shared Memory KEY 0x0a100c60 ID 196609
    PL/SQL Memory Key 0x0b100c60 ID 229378 Address 0x5000000000
    Type            PID     Context             Connection Name              ConnID
    Process         10418   0x000000000218a6e0  sample                            2
    Process         8338    0x0000000001cbb6e0  sample                            1
    Subdaemon       5953    0x00000000015075f0  Manager                        2047
    Subdaemon       5953    0x0000000001588540  Rollback                       2046
    Subdaemon       5953    0x0000000001607210  Checkpoint                     2041
    Subdaemon       5953    0x00007f132c0008c0  Flusher                        2045
    Subdaemon       5953    0x00007f132c080370  Log Marker                     2040
    Subdaemon       5953    0x00007f13340008c0  Monitor                        2044
    Subdaemon       5953    0x00007f133407f330  HistGC                         2037
    Subdaemon       5953    0x00007f13380008c0  Aging                          2042
    Subdaemon       5953    0x00007f133807f330  AsyncMV                        2039
    Subdaemon       5953    0x00007f133c0008c0  Deadlock Detector              2043
    Subdaemon       5953    0x00007f133c07f330  IndexGC                        2038
    Subdaemon       5953    0x00007f135c0008c0  Garbage Collector              2035
    Subdaemon       5953    0x00007f13600e8e20  XactId Rollback                2036
    Open for user connections
    RAM residence policy: Manual
    Data store is manually loaded into RAM
    Replication policy  : Manual
    Cache Agent policy  : Manual
    PL/SQL enabled.
    ------------------------------------------------------------------------
    Accessible by group timesten
    End of report
    

You successfully verified the conditions for the database. The database is up and running. The Operator will treat this database as the active. You are now ready to set the value for the .spec.ttspec.reexamine datum.