Tracing Db2 Spatial Extender problems

When you have a recurring and reproducible Db2 Spatial Extender problem, you can use the Db2 trace facility to capture information about the problem.

Before you begin

Ensure that you have the proper authorization to issue the db2trc command. On UNIX operating systems, you must have SYSADM, SYSCTRL, or SYSMAINT authorization to trace a Db2 instance. On Windows operating systems, no special authorization is required.

About this task

The Db2 trace facility is activated by the db2trc command. The Db2 trace facility can:
  • Trace events
  • Dump the trace data to a file
  • Format trace data into a readable format


Restrictions

  • Activate this facility only when directed by a Db2 technical support representative.
  • The db2trc command must be entered at an operating system command prompt or in a shell script. It cannot be used in the Db2 Spatial Extender command-line interface (db2se) or in the Db2 CLP.

Procedure

To troubleshoot problems in Db2 Spatial Extender by using the Db2 trace facility:

  1. Shut down all other applications.
  2. Turn on the trace.
    The Db2 Support technical support representative provides you with the specific parameters for this step. The basic command is:
    db2trc on 
    

    You can trace to memory or to a file. The preferred method for tracing is to trace to memory. If the problem being recreated suspends the workstation and prevents you from dumping the trace, trace to a file.

  3. Reproduce the problem.
  4. Dump the trace to a file immediately after the problem occurs.
    For example:
    db2trc dump january23trace.dmp
    
    This command creates a file (january23trace.dmp) in the current directory with the name that you specify, and dumps the trace information in that file. You can specify a different directory by including the file path. For example, to place the dump file in the /tmp/spatial/errors directory, the syntax is:
    db2trc dump /tmp/spatial/errors/january23trace.dmp
    
  5. Turn off the trace.
    For example:
    db2trc off
    
  6. Format the data as an ASCII file.
    You can sort the data two ways:
    • Use the flw option to sort the data by process or thread. For example:
      db2trc flw january23trace.dmp january23trace.flw
      
    • Use the fmt option to list every event chronologically. For example:
      db2trc fmt january23trace.dmp january23trace.fmt