2. Using Ingres Commands : logstat Command—Display Logging Status : logstat Example: Determine Databases that Are Active
 
Share this page                  
logstat Example: Determine Databases that Are Active
To determine which databases are currently active, follow these steps:
1. Look at the List of active databases in the logstat output. For each database listed, the database's ID number, name, owner, and status appear on one line.
Note:  The first entry listed is always owned by $ingres.
2. Note the ID number of each database. These numbers are used in the List of active transactions in the logstat output to identify the database associated with each transaction.
3. Compare the database ID numbers to the entries following the heading Database in the listings of active transactions. If you find a match, the database associated with that ID is currently active.
For example, in the sample output shown here, the second database shown is testdb owned by test. The ID for this database is 00280005. In the List of active transactions, the transaction listed belongs to Database: 00280005. The status of this database (testdb) is ACTIVE,PROTECT,JOURNAL. If an installation shutdown was pending, you can inform the testdb’s owner, test, of the impending shutdown.
----List of active databases-------------------------------------------
Id: FFFF0001 Database: ($recovery,$ingres) Status: NOTDB,ACTIVE
  Tx_cnt: 13 Begin: 16 End: 1 Read: 0 Write: 217 Force: 583 Wait: 1707
  Location: None
  Journal Window: <0,0,0>..<0,0,0>
  Start Backup Location: <0,0,0> (0,0)
Id: 00280005 Database: (testdb,test) Status: JOURNAL,FAST_COMMIT,ACTIVE
  Tx_cnt: 1 Begin: 17 End: 16 Read: 0 Write: 4690 Force: 6 Wait: 681
  Location:  /devsrc/65sun4/install/test/ingres/data/default/testdb
  Journal Window: <760996814,981,2800>..<760996814,1300,3184>
  Start Backup Location: <0,0,0> (0,0)

----List of active transactions------------------------------------
  [... transaction information deleted ...]

Tx_id: 295D001D Tran_id: 00002D5B2D5BF9F7 Database: 00280005
  Process: 00010012 Dis_tran_id: <0,0> Session: 0093C000
  First: <760996814,1160,3100> Last: <760996814,1300,3184>
    Cp: <760996814,881,948>
    FirstLSN: <?,?> LastLSN: <?,?> WaitLSN: <?,?>
  Write: 463 Split: 107 Force: 0 Wait: 109 Reserved: 140
  Status: ACTIVE,PROTECT,JOURNAL
  Wait Reason: (not waiting)
  User: <test>