
APAR= II09606
ODBC TROUBLESHOOTING - CA400WIN95 CA400WIN CA400OS2OPT  V2.0

*** This is a continuation of II09605 ***

 ODBC Troubleshooting - CA400WIN95 CA400WIN CA400OS2OPT  V2.0
 ============================================================
                                          LAST UPDATE 7/18/96

 CONTENTS
 ========
 1.0 ........................ Unable to connect to the AS/400
 2.0 ............................. How to locate the ODBC job
 3.0 .......................................... Common Errors
     3.1 .................................. Connection Errors
     3.2 ........................ Application Specific Errors
     3.3 ............................ Stored Procedure Errors
     3.4 ........................................ Misc Errors
 4.0 ...................... Reporting problems to IBM Support
 5.0 ....................... Diagnostic and Performance Tools
 6.0 ............................................... Security
 7.0 ....................................... Other References

 5.0  Diagnostic and Performance Tools
 =====================================

 Error Message Help
 ------------------
 All of the Client Access error messages can be found either
 on the AS/400 or in a Client Access/400 help.
 For errors that begin with SQL, use the following OS/400
 command to view the message text:

           DSPMSGD RANGE(SQLxxxx) MSGF(QSQLMSG)

 For error messages that begin with IWS or PWS, use the
 following OS/400 command:

           DSPMSGD RANGE(ZZZxxxx) MSGF(QIWS/QIWSMSG)
           where ZZZ is IWS or PWS.

 For APPC errors, see the .Client Access/400 for Windows 3.1
 API and Technical Reference SC41-3531.

 Microsoft ODBC SDK Trace
 ------------------------
 The ODBC Spy utility which is provided with the Microsoft
 ODBC SDK (Software Development Kit) is an excellent
 source for debugging ODBC applications and drivers.
 You can purchase it from Microsoft.

 Microsoft ODBC Administrator Version 2 API Trace
 -------------------------------------------------
 ODBC drivers at the 2.0 or later level have a trace
 utility built into the Microsoft ODBC Administrator.
 Selecting a checkbox option in the Administration utility
 (ODBCADM.EXE) traces ODBC API calls.
 It does not show as much information as the ODBC Spy
 utility.

 Application Trace programs
 --------------------------
 Many applications have their own built-in ODBC tracing
 facility (such as Microsoft Access and Powersoft's
 PowerBuilder).

 Communications Trace for Client Access for Windows 3.1x
 --------------------------------------------------------
 The Networking Services Trace tool (NSTRACE.EXE) can be
 found on the Tools folder (QDLS QIWSTOOL IWSTOOL.EXE).
 This is an invaluable tool for tracing communication problems
 as well as ODBC problems, if you do not have any of the
 above trace tools. If you format this trace with the default
 formatting options, a timestamp will be placed in each frame.
 This will aid you in any performance-related debugging you
 may want to do.

 Netware for SAA 2.0 (NetSoft) trace
 -----------------------------------
 Similar to the CA/400 trace, this also does a good job of
 tracing communication related errors and ODBC problems.
 This trace tool is built-in to the NSROUTER.EXE program.

 CA/400 Extended DOS Router Trace
 --------------------------------
 Though not as nicely formatted, this trace program allows
 you to trace all communications from the Router to the
 AS/400.  You can find it in the Tools folder.


 AS/400 Communications Trace
 ----------------------------
 The OS/400 communications trace facility will trace any
 communications type that has a line description
 (Token-Ring, ethernet, and SDLC) and formats it to the
 controller level. For TCP/IP connections, the trace can
 be formatted for a particular IP address.

 This is also a great tool for isolating communication
 errors and ODBC problems.  You can get to this by issuing
 the STRSST command at the OS/400 command-line.  The default
 formatting options record a relative timestamp next to each
 frame. This is a useful aid for diagnosing where a
 performance delay is occurring.

 AS/400 Job Traces
 ------------------
 The OS/400 job trace can help isolate most host problems and
 many performance issues.  A service job must first be started
 on the job to be traced.  Locate the
 fully qualified job name of the ODBC job (see How to find your
 job). From any 5250 emulation session, start a service job on
 this ODBC job by using the STRSRVJOB command.  Then choose one
 of two traces depending on the information needed.

  - Trace job
    This will trace the internal calls made by the host
     server. Run the TRCJOB *ON command.

  - Debug trace
    A debug trace can be used for reviewing your
    applications performance as well as for problem
    determination. The STRDBG command can be run against
    an active service job
 .
    This command logs the decisions made by the query
    optimizer to the debug session's joblog.  It will
    record estimated query times, access paths used,
    cursor errors, etc.
    Use the following comman d:

        STRDBG UPDPROD(*YES)

 AS/400 Performance Tools
 ------------------------
 AS/400 performance toolkit provides reports and utilities
 that can be used for in depth analysis of your application
 performance. Information of CPU utilization, Disk arm
 utilization, memory paging and much more is provided.
 Although the collection of performance data is built
 into the base operating system, you will need the separate
 license program Performance Tools/400 to analyze
 the results.

 Dr. Watson
 -----------
 Microsoft Windows 3.1 comes with a utility called Dr.
 Watson (DRWATSON.EXE) which can help determine who is
 causing General Protection Faults.  To use this tool,
 simply run DRWATSON.EXE from your WINDOWS directory by
 using Program Manager's FILE/RUN or File Manager.  To get
 the most out of it, add the following entries to your
 SYSTEM.INI:

 Dr. Watson
 DisLen=8
 DisStack=20
 Showinfo=disassembly errorlog locals paramlog registers stack
 SkipInfo=modules tasks 32bitregs information
 TrapZero=1

 When Dr. Watson detects a fault, it will generate a file
 called DRWATSON.LOG in your WINDOWS directory.

 Microsoft Diagnostics (MSD.EXE)
 -------------------------------
 The Microsoft Diagnostics tool can help you figure out if
 you have any memory conflicts and will print-out most of
 the information that IBM Support Line needs for diagnosing
 your problem.  This tool comes with many versions of
 Microsoft DOS and Windows.

 Microsoft Diagnostics (MSD.EXE)
 -------------------------------
 QCONFIG is provided with IBM PC-DOS.  It can be used to
 gather system information in detail.  To use it, type:

           QCONFIG > QCONFIG.OUT

 A file called QCONFIG.OUT will be created in your current
 directory. You can then PRINT, TYPE or EDIT this file.

 AS/400 Job log
 --------------

 QPTFIDX
 -------
 Client Access manages itself by providing an index of PTF's
 in each directory where it resides.  You can find out what
 PTF level you are at by looking for files called QPTFIDX in
 your IBM product directories on your PC and on the Shared
 Folder. It is an index of modules and Temporarily Applied
 PTF's. Permanently applied PTF's do not show up in this list.

 6.0 SECURITY
 ============
 Refer to informational apars II09333 and II09334 for a
 discussion of ODBC and Client Access security tips and
 issues.


 7.0 REFERENCES
 ==============

  SC41-3740   OS/400 Server Concepts and Administration
  SG24-4526   AS/400 Client/Server Performance using the
              Windows 3.1 Client (redbook)
  SC41-3533   Client Access Windows 3.1 Client for OS/400
              ODBC User's Guide
  SG24-4748   Inside AS/400 Client Access for Windows 95
  GG24-4249   DATABASE 2/400 Advanced Database Functions
              (rebook)
  SC41-4611   DB2 for OS/400 SQL Programming
  SC41-4612   DB2 for OS/400 SQL Reference


*** Please reference II09599, II09603, II09604,
     and II09605 in order for further infomation ***
