KB Article #101516

Exporting event logs from EMFMail

Exporting event logs from EMFMail

Applies to

Bug number

Problem

How do I export EMF event logs to a third party application or for external view?

Solution

You can run the following query against the event log in SQL Query Analyzer.  From the Results pane, the results can be saved to a TXT file, pasted into an Excel sheet, etc.

------------
USE [EMFMail]
GO

Select [EventNumber] as NUM, convert(varchar(4),[EventClassID]) as ID, [EventTime], convert(varchar(10),[ComponentName]) as Component,
       [EventClassDescription], [EventDetails], [EventID]--, [EventMachine], CAST(CAST([EventData] AS binary(8000)) AS VARCHAR(500))as BINData
From [EventLogEvents]
WHERE [EventLogEvents].[EventTime] Between '7/28/2005 00:00:00' AND '12/30/2005 23:59:59'
ORDER BY [EventLogEvents].[EventNumber]
------------

A different approach is to use the Data Transformation Services Import/Export Wizard.