Monitor the Status of a Database (dbStatus)

The dbStatus command reports the status of a database or databases or the status of specified components of the database or databases, using information from the active management instance. This includes the status of any pending command to create, destroy, load, unload, open, or close the database. You can also request additional details, or request information about the state of each instance regarding whether its element can be loaded.

ttGridAdmin dbStatus [name]
                     [-summary]
                     [-element]
                     [-replicaSet]
                     [-dataSpaceGroup]
                     [-all]
                     [-details]
                     [-loadReadiness]
                     [-epochs]
                     [-connections [-proxy] [-system]]

You can also refer to dbStatus discussion and examples in Recovering from Failure in Oracle TimesTen In-Memory Database Scaleout User's Guide.

Options

The dbStatus command has the options:

Option Description

name

Name of the database for which to display status. The default is to display status of all databases in the grid.

-summary

Shows an overall summary of database status. (This is the default mode.)

-element

Shows the status of each element of the database.

-replicaSet

Shows the status of each replica set of the database.

-dataSpaceGroup

Shows the status of each data space group of the database.

-all

Shows summary, element, replica set, and data space group status (equivalent to -summary -element -replicaSet -dataSpaceGroup).

-details

Shows daemon state information in addition to the status information from the active management instance. You can use this option in addition to any of the preceding options.

-loadReadiness

Shows information, including up/down status, indicating whether instances in each replica set are in a state where their elements can be loaded.

It is advisable to use this option before trying to load a database. You can also use it while a load is in progress.

-epochs

Shows the most recent epochs available for each element of the grid, and the most recent epoch that could be used for recovery.

An epoch is a transaction that marks a globally consistent point in time across all elements of the database. See Epoch Transactions in Oracle TimesTen In-Memory Database Scaleout User's Guide .

-connections

Displays information for existing connections to the specified database. Without the -proxy or -system suboptions, only application connections are shown.

-proxy

Used with the -connections option, this also displays information for all proxy connections associated with existing application connections.

Note: This option cannot be used without the -connections option.

-system

Used with the -connections option, this also displays TimesTen internal connections, such as those used by subdaemons and TimesTen utilities.

Note: This option cannot be used without the -connections option.

Overall Database Status

The dbStatus command indicates the status of the database as a whole with a line showing overall created/destroyed, loaded/unloaded, and opened/closed states. (For example: "created,loaded-complete,closed".)

The states of created, creating, destroyed, loading, loaded, unloaded, unloading, opening, opened, closing, and closed indicate that the corresponding database management command is in progress or has finished, as stated.

In addition:

  • created-partial or creating-partial: Some elements of the database are in the process of being created or have successfully been created, but others could not be created.

  • createFailed: Creation of the database failed. This occurs when no elements could be created, such as when every TimesTen instance is down.

  • loaded-partial or loading-partial: The dbDistribute command has not yet been run on the database (so no replica sets have been defined) and at least one element could not be created or loaded.

  • loaded-incomplete or loading-incomplete: At least one replica has no elements that finished loading successfully.

  • loaded-functional or loading-functional: At least one element from each replica set is loaded.

  • loaded-complete or loading-complete: Every element loaded successfully.

  • notLoaded: Loading of the database failed—none of the elements is loaded or loading.

These states can help you determine if the grid is usable even if it is not fully operational. For example, you can execute dbOpen before all the elements have been loaded.

Element Status Values

The dbStatus command returns these database element status values:

Note:

See Troubleshooting Distributed Transactions in Oracle TimesTen In-Memory Database Scaleout User's Guide for recommendations regarding these status values.

Status Description

close failed

The attempt to close the element failed.

closing

The element is in the process of closing.

create failed

The attempt to create the element failed.

creating

The element is being created.

destroy failed

The attempt to destroy the element failed.

destroyed

The element has been destroyed.

destroying

The element is being destroyed.

down

The data instance where this element is located is not running.

evicted

The element was evicted or removed through dbDistribute and has been unloaded from RAM.

evicted (loaded)

The element was evicted or removed through dbDistribute but unloading it from RAM has not yet begun.

evicted (unloading)

The element was evicted or removed through dbDistribute and is being unloaded from RAM.

load failed

The attempt to load the element into RAM failed.

loaded

The element is loaded into RAM.

loading

The element is being loaded into RAM.

opened

The element is open.

open failed

The attempt to open the element failed.

opening

The element is in the process of opening.

uncreated

The element should be created, but creation has not yet started.

unloaded

The element has been unloaded from RAM.

unloading

The element is being unloaded from RAM.

waiting for seed

The element will be loaded into RAM, but not until after the other element in its replica set is loaded.

Connections Status

This section describes information displayed by the -connections, -proxy, and -system options that show existing connections.

Connection status item Description

Host

For the target of the connection, name of the host object in the model for the host where the data instance resides.

Instance

For the target of the connection, name of the instance object in the model for the data instance.

ConnId

Connection ID of the connection to the data instance.

Name

Name of the connection as indicated by the TimesTen ConnectionName connection attribute. (See ConnectionName for information about that attribute.)

Pid

Operating system process ID of the process that established the connection.

For direct mode applications, this is the process ID of the application. For client/server applications, this is the process ID of the client/server ttcserver process acting on behalf of the application.

Type

The type of connection. One of the following:

  • Direct for connections from direct mode applications.

  • C/S for connections from client/server applications.

  • Proxy for connections created by TimesTen that work on behalf of application connections, such as a connection to a different grid element that is necessary to access some of the data.

  • GCW for TimesTen internal connections from grid connection workers.

  • Subdaemon for TimesTen internal connections from TimesTen subdaemons.

  • TTStats for TimesTen internal connections for collection of statistics.

CHost

For client/server connections, the host name of the client where the application is running.

Note: This item is not shown when the -proxy option is used.

CAddr

For client server connections, the IP address of the client where the application is running.

Note: This item is not shown when the -proxy option is used.

CPid

For client/server connections, the operating system process ID of the application.

Note: This item is not shown when the -proxy option is used.

PHost

For proxy connections, the name of the host where the proxy connection is established.

PInstance

For proxy connections, the name of the TimesTen instance where the proxy connection is established.

PPid

For proxy connections, the operating system process ID of the process that established the connection.

PConnId

For proxy connections, the connection ID.

Examples

Database Status Examples

Key for these examples:

  • RS: Identifying number of the replica set that each element belongs to.

  • DS: Identifying number of the data space group that each element belongs to.

  • Elem: Element number for each element.

  • Status: Status of the operation on each element. See "Status values" above for the list of element states that can be returned.

This example shows complete dbStatus output after a database has had its distribution specified, but the database is closed.

% ttGridAdmin dbStatus database1 -all
Database database1 summary status as of Thu Nov 17 13:28:16 PST 2016
 
created,loaded-complete,closed
Completely created elements: 4 (of 4)
Completely loaded elements: 4 (of 4)
Completely created replica sets: 2 (of 2)
Completely loaded replica sets: 2 (of 2)
 
Open elements: 0 (of 4)
 
Database database1 element level status as of Thu Nov 17 13:28:16 PST 2016
 
Host        Instance     Elem Status Date/Time of Event  Message
----------- ------------ ---- ------ ------------------- -------
 mysys3host griddata1       3 loaded 2016-11-16 17:36:39
 mysys4host griddata2       1 loaded 2016-11-16 17:36:40
 mysys5host griddata3       4 loaded 2016-11-16 17:36:39
 mysys6host griddata4       2 loaded 2016-11-16 17:36:41
 
Database database1 Replica Set status as of Thu Nov 17 13:28:16 PST 2016
 
RS DS Elem Host        Instance  Status Date/Time of Event  Message
-- -- ---- ----------- --------  ------ ------------------- -------
 1  1    3 mysys3host  griddata1 loaded 2016-11-16 17:36:39      
    2    1 mysys4host  griddata2 loaded 2016-11-16 17:36:40      
 2  1    4 mysys5host  griddata3 loaded 2016-11-16 17:36:39      
    2    2 mysys6host  griddata4 loaded 2016-11-16 17:36:41      
 
Database database1 Data Space Group status as of Thu Nov 17 13:28:16 PST 2016
 
DS RS Elem Host        Instance  Status Date/Time of Event  Message
-- -- ---- ----------- --------- ------ ------------------- -------
 1  1    3 mysys3host  griddata1 loaded 2016-11-16 17:36:39      
    2    4 mysys5host  griddata3 loaded 2016-11-16 17:36:39      
 2  1    1 mysys4host  griddata2 loaded 2016-11-16 17:36:40      
    2    2 mysys6host  griddata4 loaded 2016-11-16 17:36:41      

This example shows load readiness with all instances up, then with one instance in a replica set down, then with both instances in a replica set down. If all instances in a replica set are down, the database cannot be loaded.

% ttGridAdmin dbStatus database1 -loadReadiness
Data Elements:
RS DS Instance             State
-- -- -------------------- --------
 1  1 mysys3host.griddata1 Unloaded
 1  2 mysys4host.griddata2 Unloaded
 1                         Loadable
 2  1 mysys5host.griddata3 Unloaded
 2  2 mysys6host.griddata4 Unloaded
 2                         Loadable
 
database1 load state: Loadable
Total Elements Loaded:0/4
...

% ttGridAdmin dbStatus database1 -loadReadiness
Data Elements:
RS DS Instance             State
-- -- -------------------- --------
 1  1 mysys3host.griddata1 Down
 1  2 mysys4host.griddata2 Unloaded
 1                         Loadable
 2  1 mysys5host.griddata3 Unloaded
 2  2 mysys6host.griddata4 Unloaded
 2                         Loadable
 
database1 load state: Loadable
Total Elements Loaded:0/4
...

% ttGridAdmin dbStatus database1 -loadReadiness
Data Elements:
RS DS Instance             State
-- -- -------------------- -------------
 1  1 mysys3host.griddata1 Down
 1  2 mysys4host.griddata2 Down
 1                         Not Loadable
 2  1 mysys5host.griddata3 Unloaded
 2  2 mysys6host.griddata4 Unloaded
 2                         Loadable
 
database1 load state: Not Loadable
Total Elements Loaded:0/4

This example shows the epochs of the database. The important point is that if durability=0 and no recovery epoch is shown, the database is not recoverable.

% ttGridAdmin dbStatus database1 -epochs
Database database1 element level status as of Tue Jan  9 16:49:39 PST 2018
 
Host       Instance  Elem Status Recent Epochs
---------- --------- ---- ------ ------------------------------------------------------------
mysys4host griddata2    1 loaded 286.3 288.1 290.2 292.4 294.3 296.1 298.2 300.1 302.2 304.4
mysys6host griddata4    2 loaded 286.3 288.1 290.2 292.4 294.3 296.1 298.2 300.1 302.2 304.4
mysys3host griddata1    3 loaded 286.3 288.1 290.2 292.4 294.3 296.1 298.2 300.1 302.2 304.4
mysys5host griddata3    4 loaded 286.3 288.1 290.2 292.4 294.3 296.1 298.2 300.1 302.2 304.4
 
Most recent recovery epoch: 304.4

Connection Status Examples

Examples are shown for the -connections option by itself, -connections with -proxy, -connections with -system, and -connections with both -proxy and -system.

% ttgridadmin dbstatus database1 -connections
Host   Instance  ConnId Name        Pid  Type   CHost  CAddr         CPid
------ --------- ------ ----------- ---- ------ ------ ------------- ----
mysys1 instance1      1 database1   8631 Direct                          
mysys1 instance1      2 con1        8631 Direct                          
mysys1 instance1      3 con2        8631 Direct                          
mysys2 instance2      1 database1cs 8653 C/S    mysys2 10.90.137.240 8637
mysys2 instance2      2 con1        8666 C/S    mysys2 10.90.137.240 8637

% ttgridadmin dbstatus database1 -connections -proxy
Host   Instance  ConnId Name        Pid  Type   PHost  PInstance PPid  PConnId
------ --------- ------ ----------- ---- ------ ------ --------- ----- -------
mysys1 instance1      1 database1   8631 Direct                               
mysys1 instance1      2 con1        8631 Direct                               
mysys1 instance1      2 con1        8631 Proxy  mysys2 instance2 31210       4
mysys1 instance1      3 con2        8631 Direct                               
mysys1 instance1      3 con2        8631 Proxy  mysys2 instance2 31210       3
mysys2 instance2      1 database1cs 8653 C/S                                  
mysys2 instance2      2 con1        8666 C/S                                  

% ttgridadmin dbstatus database1 -connections -system
Host   Instance  ConnId Name                       Pid   Type      CHost    CAddr         CPid
------ --------- ------ -------------------------- ----- --------- -------- ------------- ----
mysys1 instance1      1 database1                   8631 Direct                               
mysys1 instance1      2 con1                        8631 Direct                               
mysys1 instance1      3 con2                        8631 Direct                               
mysys1 instance1    128 Grid Epoch Generator(TM=2) 31183 GCW                                  
mysys1 instance1    129 ttStats Collector          31183 GCW                                  
mysys1 instance1    130 ttStats Collector          31871 TTStats                              
mysys1 instance1    131 Garbage Collector          30876 Subdaemon                            
mysys1 instance1    132 Grid Watch Remote TM       30876 Subdaemon                            
mysys1 instance1    133 Grid Rem Elem Mon          30876 Subdaemon                            
mysys1 instance1    134 XactId Rollback            30876 Subdaemon                            
mysys1 instance1    135 Grid Epoch Generator       30876 Subdaemon                            
mysys1 instance1    136 Grid Seq Batch             30876 Subdaemon                            
mysys1 instance1    137 GCW Watcher                30876 Subdaemon                            
mysys1 instance1    138 HistGC                     30876 Subdaemon                            
mysys1 instance1    139 Log Marker                 30876 Subdaemon                            
mysys1 instance1    140 IndexGC                    30876 Subdaemon                            
mysys1 instance1    141 Grid Task                  30876 Subdaemon                            
mysys1 instance1    142 Deadlock Detector          30876 Subdaemon                            
mysys1 instance1    143 Flusher                    30876 Subdaemon                            
mysys1 instance1    144 Monitor                    30876 Subdaemon                            
mysys1 instance1    145 Checkpoint                 30876 Subdaemon                            
mysys1 instance1    146 Rollback                   30876 Subdaemon                            
mysys1 instance1    147 Manager                    30876 Subdaemon                            
mysys2 instance2      1 database1cs                 8653 C/S       mysys2 10.90.137.240   8637
mysys2 instance2      2 con1                        8666 C/S       mysys2 10.90.137.240   8637
mysys2 instance2      3 con2                       31210 GCW                                  
mysys2 instance2      4 con1                       31210 GCW                                  
mysys2 instance2    128 Grid Epoch Generator(TM=1) 31210 GCW                                  
mysys2 instance2    129 ttStats Collector          31210 GCW                                  
mysys2 instance2    130 ttStats Collector          31878 TTStats                              
mysys2 instance2    131 Grid Watch Remote TM       30950 Subdaemon                            
mysys2 instance2    132 HistGC                     30950 Subdaemon                            
mysys2 instance2    133 GCW Watcher                30950 Subdaemon                            
mysys2 instance2    134 Grid Epoch Generator       30950 Subdaemon                            
mysys2 instance2    135 Grid Seq Batch             30950 Subdaemon                            
mysys2 instance2    136 XactId Rollback            30950 Subdaemon                            
mysys2 instance2    137 Garbage Collector          30950 Subdaemon                            
mysys2 instance2    138 Grid Task                  30950 Subdaemon                            
mysys2 instance2    139 Log Marker                 30950 Subdaemon                            
mysys2 instance2    140 Grid Rem Elem Mon          30950 Subdaemon                            
mysys2 instance2    141 Flusher                    30950 Subdaemon                            
mysys2 instance2    142 IndexGC                    30950 Subdaemon                            
mysys2 instance2    143 Checkpoint                 30950 Subdaemon                            
mysys2 instance2    144 Deadlock Detector          30950 Subdaemon                            
mysys2 instance2    145 Monitor                    30950 Subdaemon                            
mysys2 instance2    146 Rollback                   30950 Subdaemon                            
mysys2 instance2    147 Manager                    30950 Subdaemon                            

% ttgridadmin dbstatus database1 -connections -proxy -system
Host   Instance  ConnId Name                       Pid   Type      PHost  PInstance PPid  PConnId
------ --------- ------ -------------------------- ----- --------- ------ --------- ----- -------
mysys1 instance1      1 database1                   8631 Direct                                  
mysys1 instance1      2 con1                        8631 Direct                                  
mysys1 instance1      2 con1                        8631 Proxy     mysys2 instance2 31210       4
mysys1 instance1      3 con2                        8631 Direct                                  
mysys1 instance1      3 con2                        8631 Proxy     mysys2 instance2 31210       3
mysys1 instance1    128 Grid Epoch Generator(TM=2) 31183 GCW                                     
mysys1 instance1    129 ttStats Collector          31183 GCW                                     
mysys1 instance1    130 ttStats Collector          31871 TTStats                                 
mysys1 instance1    130 ttStats Collector          31871 Proxy     mysys2 instance2 31210     129
mysys1 instance1    131 Garbage Collector          30876 Subdaemon                               
mysys1 instance1    132 Grid Watch Remote TM       30876 Subdaemon                               
mysys1 instance1    133 Grid Rem Elem Mon          30876 Subdaemon                               
mysys1 instance1    134 XactId Rollback            30876 Subdaemon                               
mysys1 instance1    135 Grid Epoch Generator       30876 Subdaemon                               
mysys1 instance1    135 Grid Epoch Generator       30876 Proxy     mysys2 instance2 31210     128
mysys1 instance1    136 Grid Seq Batch             30876 Subdaemon                               
mysys1 instance1    137 GCW Watcher                30876 Subdaemon                               
mysys1 instance1    138 HistGC                     30876 Subdaemon                               
mysys1 instance1    139 Log Marker                 30876 Subdaemon                               
mysys1 instance1    140 IndexGC                    30876 Subdaemon                               
mysys1 instance1    141 Grid Task                  30876 Subdaemon                               
mysys1 instance1    142 Deadlock Detector          30876 Subdaemon                               
mysys1 instance1    143 Flusher                    30876 Subdaemon                               
mysys1 instance1    144 Monitor                    30876 Subdaemon                               
mysys1 instance1    145 Checkpoint                 30876 Subdaemon                               
mysys1 instance1    146 Rollback                   30876 Subdaemon                               
mysys1 instance1    147 Manager                    30876 Subdaemon                               
mysys2 instance2      1 database1cs                 8653 C/S                                     
mysys2 instance2      2 con1                        8666 C/S                                     
mysys2 instance2      3 con2                       31210 GCW                                     
mysys2 instance2      4 con1                       31210 GCW                                     
mysys2 instance2    128 Grid Epoch Generator(TM=1) 31210 GCW                                     
mysys2 instance2    129 ttStats Collector          31210 GCW                                     
mysys2 instance2    130 ttStats Collector          31878 TTStats                                 
mysys2 instance2    130 ttStats Collector          31878 Proxy     mysys1 instance1 31183     129
mysys2 instance2    131 Grid Watch Remote TM       30950 Subdaemon                               
mysys2 instance2    132 HistGC                     30950 Subdaemon                               
mysys2 instance2    133 GCW Watcher                30950 Subdaemon                               
mysys2 instance2    134 Grid Epoch Generator       30950 Subdaemon                               
mysys2 instance2    134 Grid Epoch Generator       30950 Proxy     mysys1 instance1 31183     128
mysys2 instance2    135 Grid Seq Batch             30950 Subdaemon                               
mysys2 instance2    136 XactId Rollback            30950 Subdaemon                               
mysys2 instance2    137 Garbage Collector          30950 Subdaemon                               
mysys2 instance2    138 Grid Task                  30950 Subdaemon                               
mysys2 instance2    139 Log Marker                 30950 Subdaemon                               
mysys2 instance2    140 Grid Rem Elem Mon          30950 Subdaemon                               
mysys2 instance2    141 Flusher                    30950 Subdaemon                               
mysys2 instance2    142 IndexGC                    30950 Subdaemon                               
mysys2 instance2    143 Checkpoint                 30950 Subdaemon                               
mysys2 instance2    144 Deadlock Detector          30950 Subdaemon                               
mysys2 instance2    145 Monitor                    30950 Subdaemon                               
mysys2 instance2    146 Rollback                   30950 Subdaemon                               
mysys2 instance2    147 Manager                    30950 Subdaemon