I can get timestamps in the ODBC trace when I set the parameter TraceOptions in the system_odbc.ini file on UNIX systems, but can get the same functionality on windows. Is it possible to set the parameter TraceOptions with the Oracle / SQL Server Wire Protocol on windows?
IMPORTANT: This article contains information about modifying the registry.
Before you modify the registry, make sure to create back up of the registry and ensure that you understand how to restore the registry if a problem may occur.
For more information about how to back up, restore, and edit the registry, please review the relevant Microsoft Knowledge Base articles on support.microsoft.com.
The TraceOptions settings will not apply to windows since the trace library on windows is from Microsoft.
Data Direct has an extended trace library for windows which you can be used to get the timestamp value in the ODBC trace.
This library can be implemented as follows:
<- Begin
2009-06-16 15:07:58.000 pid=5760 tid=6052 ENTER SQLConnectW HDBC 0x03f71df0 WCHAR * 0x03f717e8 [ -3] "smdb" SWORD -3 WCHAR * 0x48897cf4 [ -3] "******" SWORD -3 WCHAR * 0x48897cf4 [ -3] "******" SWORD -3 2009-06-16 15:07:58.078 pid=5760 tid=6052 EXIT SQLConnectW with return code 1 (SQL_SUCCESS_WITH_INFO) HDBC 0x03f71df0 WCHAR * 0x03f717e8 [ -3] "smdb" SWORD -3 WCHAR * 0x48897cf4 [ -3] "******" SWORD -3 WCHAR * 0x48897cf4 [ -3] "******" SWORD -3 2009-06-16 15:07:58.078 pid=5760 tid=6052 ENTER SQLGetInfoW HDBC 0x03f71df0 UWORD 17 <SQL_DBMS_NAME> PTR 0x03f726d8 SWORD 2048 SWORD * 0x05affefc (1024) 2009-06-16 15:07:58.078 pid=5760 tid=6052 EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS) HDBC 0x03f71df0 UWORD 17 <SQL_DBMS_NAME> PTR 0x03f726d8 [ -3] "Oracle" SWORD 2048 SWORD * 0x05affefc (12) 2009-06-16 15:07:58.078 pid=5760 tid=6052 ENTER SQLGetInfoW HDBC 0x03f71df0 UWORD 17 <SQL_DBMS_NAME> PTR 0x03f726d8 SWORD 2048 SWORD * 0x05affefc (6) 2009-06-16 15:07:58.078 pid=5760 tid=6052 EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS) HDBC 0x03f71df0 UWORD 17 <SQL_DBMS_NAME> PTR 0x03f726d8 [ -3] "Oracle" SWORD 2048 SWORD * 0x05affefc (12) 2009-06-16 15:07:58.078 pid=5760 tid=6052 ENTER SQLGetInfoW HDBC 0x03f71df0 UWORD 18 <SQL_DBMS_VER> PTR 0x03f726d8 SWORD 2048 SWORD * 0x05affefc (6) 2009-06-16 15:07:58.078 pid=5760 tid=6052 EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS) HDBC 0x03f71df0 UWORD 18 <SQL_DBMS_VER> PTR 0x03f726d8 [ -3] "10.02.0000 Oracle 10.2.0.2.0" SWORD 2048 SWORD * 0x05affefc (56)
-> End