Home | Previous Page | Next Page   Administrative Utilities > The onstat Utility > onstat -g Monitoring Options >

The onstat -g sql Option

The onstat -g sql option prints SQL-related information about a session. You can specify one of the following invocations.

Invocation
Explanation
onstat -g sql
Displays a one line summary for each session
onstat -g sql sessionid
Displays SQL information for a specific session
Note:
Encrypted passwords and password hint parameters in encryption functions are not shown. Figure 93 displays an encrypted password in the Last parsed SQL statement field.

Figure 93 shows the output of the onstat -g sql option.

Figure 93. onstat -g sql Output
onstat -g sql 22
IBM Informix Dynamic Server Version 10.00.UC1     -- On-Line -- Up 00:07:38 -- 19456 Kbytes
Sess  SQL            Current            Iso Lock       SQL  ISAM F.E.          Current
Id    Stmt type      Database           Lvl Mode       ERR  ERR  Vers Explain    Role
22     -             test               CR  Not Wait    0    0   9.03 Off         hr
Last parsed SQL statement :
  select id, name, decrypt_char(ssn, 'XXXXXXXXXX') from emp

You can interpret the output from this option as follows:

Sess id
The session identifier
SQL Stmt type
The type of SQL statement
Current Database
Name of the current database of the session
ISO Lvl
Isolation level
DR
Dirty Read
CR
Committed Read
CS
Cursor Stability
DRU
Dirty Read, Retain Update Locks
CRU
Committed Read, Retain Update Locks
CSU
Cursor Stability, Retain Update Locks
RR
Repeatable Read
NL
Database Without Transactions
Lock mode
Lock mode of the current session
SQL Error
SQL error number encountered by the current statement
ISAM Error
ISAM error number encountered by the current statement
F.E. Version
Version of the client program
Explain
SET EXPLAIN setting
Current Role
Role of the current user
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]