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 of the database for which to display status. The default is to display status of all databases in the grid. |
|
Shows an overall summary of database status. (This is the default mode.) |
|
Shows the status of each element of the database. |
|
Shows the status of each replica set of the database. |
|
Shows the status of each data space group of the database. |
|
Shows summary, element, replica set, and data space group status (equivalent to |
|
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. |
|
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. |
|
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 . |
|
Displays information for existing connections to the specified database. Without the |
|
Used with the Note: This option cannot be used without the |
|
Used with the Note: This option cannot be used without the |
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
orcreating-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
orloading-partial
: ThedbDistribute
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
orloading-incomplete
: At least one replica has no elements that finished loading successfully. -
loaded-functional
orloading-functional
: At least one element from each replica set is loaded. -
loaded-complete
orloading-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 |
---|---|
|
The attempt to close the element failed. |
|
The element is in the process of closing. |
|
The attempt to create the element failed. |
|
The element is being created. |
|
The attempt to destroy the element failed. |
|
The element has been destroyed. |
|
The element is being destroyed. |
|
The data instance where this element is located is not running. |
|
The element was evicted or removed through |
|
The element was evicted or removed through |
|
The element was evicted or removed through |
|
The attempt to load the element into RAM failed. |
|
The element is loaded into RAM. |
|
The element is being loaded into RAM. |
|
The element is open. |
|
The attempt to open the element failed. |
|
The element is in the process of opening. |
|
The element should be created, but creation has not yet started. |
|
The element has been unloaded from RAM. |
|
The element is being unloaded from RAM. |
|
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 |
---|---|
|
For the target of the connection, name of the host object in the model for the host where the data instance resides. |
|
For the target of the connection, name of the instance object in the model for the data instance. |
|
Connection ID of the connection to the data instance. |
|
Name of the connection as indicated by the TimesTen |
|
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 |
|
The type of connection. One of the following:
|
|
For client/server connections, the host name of the client where the application is running. Note: This item is not shown when the |
|
For client server connections, the IP address of the client where the application is running. Note: This item is not shown when the |
|
For client/server connections, the operating system process ID of the application. Note: This item is not shown when the |
|
For proxy connections, the name of the host where the proxy connection is established. |
|
For proxy connections, the name of the TimesTen instance where the proxy connection is established. |
|
For proxy connections, the operating system process ID of the process that established the connection. |
|
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