Diverting OLE DB log entries to ETW

On Windows clients, you can direct Vertica to send OLE DB log entries to Event Tracing for Windows (ETW).

On Windows clients, you can direct Vertica to send OLE DB log entries to Event Tracing for Windows (ETW). Once set, OLE DB log entries appear in the Windows Event Viewer. To use ETW:

  • Register the driver as a Windows Event Log provider, and enable the logs.

  • Activate ETW by adding a string value to your Windows Registry.

  • Understand how Vertica compresses log levels for the Windows Event Viewer.

  • Know where to find the logs within Event Viewer.

  • Understand the meaning of the Event IDs in your log entries.

Register the OLE DB driver as a windows event log provider, and enable the logs

To use ETW logging, you must register the OLE DB driver as a Windows Event Log provider. You can choose to register either the 32-bit or 64-bit driver. Once you have registered the driver, you must enable the logs.

  1. Open a command prompt window as Administrator, or launch the command prompt with the Run as Administrator option.

  2. Run the command wevtutil im to register either the 32-bit or 64-bit version of the driver.

    1. For the 64-bit OLE DB driver, run:

      wevtutil im "c:\Program Files\Vertica Systems\OLEDB64\lib\VerticaOLEDB64.man"
      /resourceFilePath:"c:\Program Files\Vertica Systems\OLEDB64\lib\vertica_8.1_oledb.dll"
      /messageFilePath:"c:\Program Files\Vertica Systems\OLEDB64\lib\vertica_8.1_oledb.dll"
      
    2. For the 32-bit OLE DB driver, run:

      wevtutil im "c:\Program Files (x86)\Vertica Systems\OLEDB32\lib\VerticaOLEDB32.man"
      /resourceFilePath:"c:\Program Files (x86)\Vertica Systems\OLEDB32\lib\vertica_8.1_oledb.dll"
      /messageFilePath:"c:\Program Files (x86)\Vertica Systems\OLEDB32\lib\vertica_8.1_oledb.dll"
      
  3. Run the command wevtutil sl to enable the logs.

    1. For 64-bit OLE DB driver logs, run:

      wevtutil sl VerticaOLEDB64/e:true
      
    2. For the 32-bit ODBC driver logs, run:

      wevtutil sl VerticaOLEDB32/e:true
      

Add the string value LogType

By default, Vertica does not send OLE DB log entries to ETW. To activate ETW, add the string LogType to your Windows registry, and set its value to ETW.

  1. Start the registry editor by typing regedit.exe in the Windows Run command box.

  2. Navigate to the correct location in the registry.

    HKEY_LOCAL_MACHINE\SOFTWARE\Vertica\OLEDB\Driver
    
  3. Right-click in the right pane of the Registry Editor window. Select New and then select String Value.

  4. Change the name of the string value from New Value #1 to LogType.

  5. Double-click the new LogType entry. When prompted for a new value, enter ETW.

  6. Exit the registry editor.

ETW is off by default. When ETW is activated, you can subsequently turn it off by clearing the value ETW from the LogType string.

Event viewer log levels

The LogLevel parameter setting is described in the section, Additional parameter settings. The parameter allows you to specify a LogLevel of 0 through 6. Be aware that Vertica compresses the log levels for the Windows Event Viewer. The six levels are compressed to four in Event Viewer.

Vertica LogLevel Setting Vertica LogLevel Description Entries are sent to Event Viewer as log level... Event Viewer Displays...
0 (No logging) 0 (No logging)
1 Fatal Errors 1 Critical
2 Errors 2 Error
3 Warnings 3 Warning
4 Info 4 Information
5 Debug 4
6 Trace (all messages) 4

Examples:

  • A LogLevel setting of 5 sends fatal errors, errors, warnings, info and debug log level entries to Event Viewer as Level 4 (Information).

  • A LogLevel setting of 6 sends fatal errors, errors, warnings, debug and trace log level entries to Event Viewer as Level 4.

Where to find logs in event viewer

  1. Launch the Windows Event Viewer.

  2. From Event Viewer (Local), expand Applications and Services Logs.

  3. Expand the folder that contains the log you want to review (for example, VerticaOLEDB64).

  4. Select the Vertica OLE DB log under the folder. Entries appear in the right pane.

Event log entry: event ID

Once you have chosen an OLE DB log in Event Viewer, note the value in the Event ID field.

Each Event Log entry includes one of four Event IDs. An Event ID of 0 is informational (debug, info, and trace events), 1 is an error, 2 is a fatal event, and 3 is a warning.