Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 1.25 KB

enabling-tracing.md

File metadata and controls

20 lines (17 loc) · 1.25 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Enabling Tracing
Enabling Tracing
David-Engel
davidengel
01/19/2017
sql
connectivity
conceptual
tracing options [ODBC], enabling

Enabling Tracing

Tracing can be enabled in the following three ways:

  • Set the Trace and TraceFile keywords in the Odbc.ini registry entry. This enables or disables tracing when SQLAllocHandle with a HandleType of SQL_HANDLE_ENV is called. These options are set in the Tracing tab of the ODBC Data Source Administrator dialog box displayed during data source setup. For more information, see Registry Entries for Data Sources.

  • Call SQLSetConnectAttr to set the SQL_ATTR_TRACE connection attribute to SQL_OPT_TRACE_ON. This enables or disables tracing for the duration of the connection. For more information, see the SQLSetConnectAttr function description.

  • Use ODBCSharedTraceFlag to turn tracing on or off dynamically. (For more information, see the next topic, Dynamic Tracing.)