Using the onlog utility to view R-tree logical-log records

About this task

This topic describes how you can use the onlog utility to view R-tree logical-log records. The following procedure first shows how to force the log manager to start using a new logical log file; this is done for ease of searching the logical log file for R-tree-specific records.

To use the onlog utility to view R-tree log records:

Procedure

  1. Log in as the informix user.
  2. Execute the onmode -l utility at the operating system prompt.

    This utility forces the log manager to switch to the next available logical log.

  3. Execute the onmode -l utility to find the unique identifier of the logical log file that the log manager will next use.

    In the output of the onstat utility, look under the Logical Logging heading for the list of logical log files currently in use. Find the log file that has a value of 0 in the used column.

    The following sample onstat output shows that the logical file with a unique identifier of 11 will be the next logical log file that the log manager uses:
    address  number   flags    uniqid   begin        size     used    %used
    
    a13a6a4  1        U-B----  7        100a03      10000      655     6.55
    a13a6c0  2        U-B----  8        103113      10000       62     0.62
    a13a6dc  3        U-B----  9        105823      10000      500     5.00
    a13a6f8  4        U-B---L  10       107f33      10000      197     1.97
    a13a714  5        U---C--  11       10a643      10000        0     0.00
    a13a730  6        U-B----  6        10cd53      10000       57     0.57
  4. Execute SQL commands that manipulate an R-tree index.
    For example, create a table with a column of a spatial data type and then create an R-tree index on the column.
  5. Execute the onlog utility, specifying a particular log file with the -n option so you can search for R-tree entries.
    For example, the following sample use of the onlog utility shows how to view the log file whose unique id is 11 and pipe the output to the UNIX™ grep command to search for the term RTREE:
    onlog -n 11 | grep RTREE
    The following sample output shows both log records made by the extensible log manager and log entries made by the R-tree access method:
    addr     len  type     xid      id link    
    5680     436  HINSERT  6        0  5328     600002   102      391
    6050     372  BLDCL    6        0  5680     700002 6 6 2056 0 polyidx
    61c4     36   CHALLOC  6        0  6050     800035   6       
    61e8     40   PTEXTEND 6        0  61c4     700002   5        800035  
    e4a4     64   HUPDAT   6        0  e460     100056   80e      0        94 
    94  2  
    e4e4     36   COMMIT   6        0  e4a4     07/23/1999 21:08:30
    f018     40   BEGIN    6        2  0        07/23/1999 21:08:30 12       rk
    f040     932  HINSERT  6        0  f018     100085   101      888
    f3e4     72   HUPDAT   6        0  f040     600002   101      0        812
    812 3  
    f42c     140  HINSERT  6        0  f3e4     600002   801      96 
    10018    928  RTREE    6        0  f42c     LEAFINS  [802,880,257,1048709 0]
    10074    116  HUPDAT   6        0  f4b8     600002   801      0        96
    96  2  
    100e8    932  HINSERT  6        0  10074    100085   102      888
    11018    928  RTREE    6        0  100e8    LEAFINS  [803,880,258,1048709 0]
    11048    84   HUPDAT   6        0  1048c    600002   801      0        96 
    96  3  
    1109c    932  HINSERT  6        0  11048    100085   201      888
    11440    72   HUPDAT   6        0  1109c    700002   101      0        812
    812 3  
    11488    140  HINSERT  6        0  11440    700002   801      96 
    12018    928  RTREE    6        0  11488    LEAFINS  [802,880,513,1048709 0]
    120d0    116  HUPDAT   6        0  11514    700002   801      0        96
    96  2  
    12144    36   COMMIT   6        0  120d0    07/23/1999 21:08:30