The following sections describe the different settings in the MimerTrace.config file. Refer to Configuration file examples for the syntax and placement of the settings or use Mimer SQL Data Provider Trace Control tool to manage the trace settings.
traceCategory specifies the categories that will be traced. The following trace categories exists:
Multiple categories can be enabled by using a comma separated list, e.g. traceCategory="SqlStatement, SqlParameter".
There are three different types of trace listeners that can be added.
<add type="file" filename="C:\Users\username\AppData\Local\MimerSQLDataProvider\traceoutput.log"/>
Note: If multiple applications using the Mimer.Data.Client are running on the system, and an absolute path or the default file is used, each application will create their own file for the trace output. The file name will be prefixed with a hexadecimal string.<add type="file" filename="traceoutput.log"/>Note that if you only specify a file name, the file will be placed in the current working directory of the application. The trace system tries to create both the specified folder and file if they do not exist. If the trace system does not have write access at the location, nothing will be traced to file.
This section describes how to manually set up the DataProviderTraces table. This is relevant if a user without privilege to create tables is specified in the traceProviderConnectionString. Otherwise, the Data Provider will set things up for the user automatically. The following SQL statements can be used to manually create the sequence and table:
The contents of the table is further described in section Interpreting trace output.
When analyzing large amounts of log data it may be useful to have indexes on columns where you want to have conditions on the data. Adding indexes adds to the amount of work done during the logging so it may slow down logging somewhat.
The creator of the table, such as SYSADM, can grant insert privilege to another user.
If you want the user to be able to analyze the data you can also grant select privilege at the same time.
TraceUser will have to create a synonym to the DataProviderTraces table, so that the Data Provider can insert data into the table using the unqualified table name.
traceOutputOptions can be applied to the console and file trace listener. They give additional output for each trace message. The following options are available: Callstack, DateTime, LogicalOperatorStack, None, ProcessId, ThreadId, Timestamp
The trace output can be filtered by using the <filters> tag and adding one or more filters. Trace can be filtered based on application name, user ID, and database. Multiple application names, user IDs, or databases can be specified in the filter by using a comma-separated list. The application name, user ID, and database properties are set using the connection string. For each filter you can specify either include="true" or include="false". Setting include to true would include only the specified application name(s)/user ID(s)/database(s), while setting include to false would exclude the specified application name(s)/user ID(s)/database(s) from the trace output.
The autoFlush setting is an optional setting used to enable auto flush. autoFlush is by default set to false. Setting autoFlush to true will automatically flush the data from the buffer to the underlying stream after every trace call. This will slow down the speed of the tracing considerably. However, if the application crashes in the end you may want to see the last calls that were logged that may otherwise be lost.
Any errors occurring during the processing of the MimerTrace.config file, such as invalid XML or connection problems when using the database listener, are logged to the default trace file Mimer.Data.Client.log.
If trace is not working as expected check the Mimer.Data.Client.log for the error message to help you figure out what is wrong.
Trace starts automatically when there is a trace configuration file. The system will detect changes to the MimerTrace.config file even when trace is active and change its behavior. If the file has invalid xml syntax or other errors, these will be logged to the Mimer.Data.Client.log file that is located next to the configuration file.
It is possible to have a file, but disable trace by setting traceCategory to None:
The important thing is to turn trace off after suitable information has been collected either through the method above or by deleting or removing the file MimerTrace.config file. Leaving trace on, will cause any applications using ADO.NET to run slower than would otherwise be the case.