Hitachi

Hitachi Advanced Database Application Development Guide


17.4.2 Information output when trace level is 1

The following is an example of the information output when 1 is selected as the trace level.

▪ Output example (trace level 1)

[Figure]

When using trace level 1, each line of characters can contain a maximum of 256 bytes. This restriction does not apply to the SQL statement whose execution was requested and any diagnostic messages, which are always output in full.

The following table explains each item of information output at trace level 1.

Table 17‒4: Information output as HADB ODBC driver trace information (trace level 1)

No.

Output item

Description

1

[Trace Start Time]

The date and time at which output of the HADB ODBC driver trace information started.

If HADB could not acquire the time, 0 is output in all date and time fields.

2

[Process ID]

The process ID

3

[Module Name]

The name of the module that uses the HADB ODBC driver. If HADB cannot identify the module name, unknown is output.

4

[Platform]

The platform on which the HADB ODBC driver is operating

5

[ODBC environment variables]

The values of the environment variables used by the HADB ODBC driver. The values output here are not necessarily the values specified in the environment variables. They are the values actually being used by the HADB ODBC driver, which might be the default values or a value explicitly specified in ODBC Data Source Administrator.

  • ADBCLTLANG

    The character encoding used by the HADB client

  • ADBODBTRC

    Whether HADB ODBC driver trace information is to be output.

  • ADBODBTRCSIZE

    The maximum size of each HADB ODBC driver trace file

  • ADBODBTRCPATH

    The absolute path of the folder in which HADB ODBC driver trace files are stored

  • ADBODBTRCLV

    The specification of the trace level

  • ADBODBAPMODE

    The application mode of the HADB ODBC driver

For details about the preceding environment variables, see 4.3.1 HADB client for Windows.

6

[RETURN Value]

An explanation of the return values of the ODBC function.

This information provides definitions that correspond to the integer values of the SQLRETURN data type output for RETURN (No. 11).

7

FUNCTION

The name of the ODBC function

8

HANDLE

The value of the handle passed as an argument to the ODBC function

9

START-TIME

The time at which the ODBC function started executing.

If HADB could not acquire the time, 0 is output in all date and time fields.

10

END-TIME

The time at which the ODBC function finished executing.

If HADB could not acquire the time, 0 is output in all date and time fields.

11

RETURN

The SQLRETURN value that is the execution result of the ODBC function.

For details about the meaning of each value, see the [RETURN Value] section that precedes it in the trace information.

12

SQLSTATE

The value of SQLSTATE.

This information is only output if executing the ODBC function results in output of a SQLSTATE value.

13

CON_ID

The connection number.

This is the same as the connection number output in SQL trace information.

If the ODBC function had not yet connected to the HADB server, * is output.

14

CON_NUM

The connection sequence number.

This is the same as the connection sequence number output in SQL trace information.

If the ODBC function had not yet connected to the HADB server, * is output.

15

OPTION

Optional information. For details, see Table 17‒5: Optional information output for OPTION.

The information output as optional information differs between ODBC functions.

If the ODBC function does not have optional information, * is output.

If HADB cannot identify the value for information output as a symbol name, unknown is output instead of the symbol value.

16

Connect Info

The information output when the connection with the HADB server was established.

17

[DataSourceName]

The name of the data source to which the HADB ODBC is connected.

If the driver is not using a data source or is using a file DSN, * is output.

18

[Client Definition File Path]

The path of the client definition file

19

[Hitachi Advanced Data Binder ODBC Driver Version]

The version of the HADB ODBC driver

20

[ProcessID]

The process ID of the HADB client

21

<SQL>

The SQL statement whose execution was requested.

If the following ODBC functions were executed, <SQL> shows the SQL statement passed as an argument of the ODBC function.

  • SQLPrepare

  • SQLExecDirect

22

<Message>

A message that provides diagnostic information.

A message is output when the execution result of the ODBC function is one of the following:

  • SQL_ERROR

  • SQL_SUCCESS_WITH_INFO

  • SQL_NEED_DATA (when the function is SQLBrowseConnect)

The following table lists the optional information output for OPTION in the preceding table.

Table 17‒5: Optional information output for OPTION

No.

Type

ODBC function

Optional information output for OPTION

1

Connections with data sources

SQLAllocHandle

  • HandleType (symbol value)

  • Address: The address value returned to the OutputHandlePtr parameter

2

SQLConnect(W)

  • ServerName

  • UserName

3

SQLDriverConnect(W)

InConnectionString

A single asterisk * is output in place of the password.

4

SQLBrowseConnect(W)

5

Acquisition of driver and data source information

SQLDataSources(W)

None

6

SQLDrivers(W)

7

SQLGetInfo(W)

InfoType

8

SQLGetFunctions

FunctionID

9

SQLGetTypeInfo(W)

DataType

10

Setting and acquiring driver options

SQLSetConnectAttr(W)

Attribute

11

SQLGetConnectAttr(W)

12

SQLSetEnvAttr

13

SQLGetEnvAttr

14

SQLSetStmtAttr(W)

15

SQLGetStmtAttr(W)

16

Setting descriptor values

SQLGetDescField(W)

  • RecNumber

  • FieldIdentifier (symbol value)

17

SQLGetDescRec(W)

  • RecNumber

  • *Name

18

SQLSetDescField(W)

  • RecNumber

  • FieldIdentifier

19

SQLSetDescRec

  • RecNumber

  • Type

  • SubType

20

SQLCopyDesc

  • Source: Value of SourceDescHandle

  • Target: Value of TargetDescHandle

21

Creating SQL requests

SQLPrepare(W)

  • tran_id: Transaction ID

  • stmt_hdl: Statement handle ID

  • sql_serial_num: SQL statement sequence number

22

SQLBindParameter

  • ParameterNumber

  • ValueType

  • ParameterType

23

SQLGetCursorName(W)

None

24

SQLSetCursorName(W)

25

SQLDescribeParam

ParameterNumber

26

SQLNumParams

*ParameterCountPtr

27

SQL execution

SQLExecute

  • tran_id: Transaction ID

  • stmt_hdl: Statement handle ID

  • sql_serial_num: SQL statement sequence number

28

SQLExecDirect(W)

29

SQLNativeSql(W)

OutStatementText

30

SQLParamData

None

31

SQLPutData

StrLen or Ind

32

Acquiring execution results and execution result information

SQLRowCount

*RowCountPtr

33

SQLNumResultCols

*ColumnCountPtr

34

SQLDescribeCol(W)

ColumnNumber

35

SQLColAttribute(W)

  • ColumnNumber

  • FieldIdentifier (symbol value)

36

SQLBindCol

  • ColumnNumber

  • TargetType (symbol value)

37

SQLFetch

None

38

SQLFetchScroll

39

SQLGetData

  • ColumnNumber

  • TargetType (symbol value)

40

SQLSetPos

None

41

SQLBulkOperations

42

SQLMoreResults

43

SQLGetDiagField(W)

DiagIdentifier

44

SQLGetDiagRec(W)

None

45

Acquiring system information for data sources

SQLColumnPrivileges(W)

None

46

SQLColumns(W)

47

SQLForeignKeys(W)

48

SQLPrimaryKeys(W)

49

SQLProcedureColumns(W)

50

SQLProcedures(W)

51

SQLSpecialColumns(W)

52

SQLStatistics(W)

53

SQLTablePrivileges(W)

54

SQLTables(W)

55

Terminating SQL execution

SQLFreeStmt

Option

When Option=SQL_CLOSE is specified, the following information is also output:

  • tran_id: Transaction ID

  • stmt_hdl: Statement handle ID

  • sql_serial_num: SQL statement sequence number

56

SQLCloseCursor

  • tran_id: Transaction ID

  • stmt_hdl: Statement handle ID

  • sql_serial_num: SQL statement sequence number

57

SQLCancel

None

58

SQLEndTran

  • CompletionType

  • tran_id: Transaction ID

59

Disconnecting from data sources

SQLDisconnect

None

60

SQLFreeHandle

Notes: