See Also
You are here: System database > msessions
ContentsIndexHome
PreviousUpNext
msessions
System Table msessions

 

Table Columns

Name 
Type 
Description 
instance_id 
INTEGER 
Server instance this session is connected to. References sysinstances (id) 
id 
BIGINT 
Unique session id, unique within cluster 
exec_state 
INTEGER 
Execution state of the internal thread handling this session:

  • 0 - pending (ready to process new statements, or return recordset to the client)
  • 1 - waiting for NET messages from another dbinstance
  • 2 - waiting for DISK IO to complete
  • 3 - waiting to grant the lock
  • 4 - waiting to grant latch lock on the DB page

 

ph_pages_io 
BIGINT 
Number of pages that have been physically accessed on disk in the current transaction. 
lg_pages_io 
BIGINT 
Total number of logical pages accessed in the current transaction. 
tran_id 
BIGINT 
Unique id of most recent transaction of this session 
tran_state 
INTEGER 
Transaction's current commit state:

  • 0 - Unknown -transaction has not began yet
  • 1 - Read Only - transaction has not modified any data
  • 2 - Dirty - transaction has modified some data
  • 3 - Commit - transaction has been committed
  • 4 - Rollback - transaction has been aborted
  • 5 - Precommit Dirty - transaction in pre-commit of the 2PC phase, one of the db instances modified data
  • 6 - Precommit Read - transaction in pre-commit of the 2PC phase, none of the instances modified any data
  • 7 - Preabort - transaction in precommit 2PC phase, at least one instance failed transaction
  • 8 - Committing - transaction will be committed, all instances are committing the changes
  • 9 - Rolling Back - transaction will be aborted, all instances are rolling back the changes

 

tran_iso 
INTEGER 
Transaction's isolation level:

  • 0 - Read Commited - reads data, including any updates committed while running
  • 1 and 2 - Read Repeatable - reads only committed data that was committed before start of transaction
  • 3 - Serializable - only one transaction at a time

 

tran_auto_commit 
INTEGER 
Transaction's automatic commit mode. 0: Auto-commit off; 1: Auto-commit on. 
locks 
INTEGER 
Number of row-level locks that the transaction is currently holding. 
blocked_by_tran_id 
BIGINT 
Transaction id that this session is waiting for locks from 
error 
VARCHAR 
Text of the most recent error message 
sql 
VARCHAR 
Last SQL statement executed 

 

 

Related