Hitachi

Hitachi Advanced Database Application Development Guide


17.2.2 Troubleshooting tips

Organization of this subsection

(1) Tips about viewing ODBC trace information

By viewing ODBC trace information, you can see the requests the driver manager has received from sources such as applications, BI tools, and the ODBC module, and the data that was returned in response to those requests.

An application, BI tool, ODBC module, or other entity to which the driver manager returns an error typically issues the ODBC functions SQLGetDiagField and SQLGetDiagRec to acquire detailed information about the error. The SQLSTATE, NativeError, and MessageText obtained by SQLGetDiagRec is particularly useful information for troubleshooting.

Note

An ODBC trace does not provide information about requests from the HADB ODBC driver, or the responses to those requests.

(2) Tips for identifying the source of an error from message text

When message text is output in relation to an error, you can use the message text to identify the source of the error. This subsection provides tips about this process.

  1. Check whether the message text contains a message ID starting with KFAA. Check whether the message text includes the tag [Hitachi Advanced Data Binder] [ODBC Driver].

    If either of these conditions is met, the error or warning was generated by HADB (or the HADB ODBC driver).

    • If the message starting with KFAA is in the KFAA72000 range, the error occurred in the HADB ODBC driver.

    • For all other message IDs, the error occurred in the HADB server or HADB client.

    • If the message ID or tag is only partially output, the HADB server or HADB client might have been involved in processing where the error occurred. In this case, acquire the full message from the relevant trace or log file.

  2. Check whether the message text includes the tag [Microsoft] [ODBC Driver Manager]. If the message text contains this tag, the error or warning was generated by the driver manager.

    In this case, it is likely that HADB (including the HADB ODBC driver) was not processing where the error occurred. Errors with this tag are often critical errors such as sequence errors. If these errors occur, you need to take action such as debugging the application or reviewing the settings of the BI tool or ODBC module.

  3. If the message text does not contain any of the keywords in 1. or 2., it is likely that the driver manager and HADB (including the HADB ODBC driver) were not involved in processing where the error occurred. Check the settings of the BI tool or ODBC module for errors in interface or DBMS specification, and review the settings as needed.

(3) Tips about SQLSTATE values

After identifying the source of the error, identify the cause by checking the value of SQLSTATE.

(4) Acquiring SQLSTATE values and message text

Use the following ODBC functions to acquire SQLSTATE values and message text: