Share via


Data Collector Error Handling

The data collector is designed to run continuously, which means that execution errors will likely occur. The data collector must respond appropriately to two broad categories of errors. These categories are:

  • Common, foreseeable errors. Based on collection workflow, processes, and component behavior, many errors can be anticipated. Automatic recovery from this category of error may not always be possible. However, simple, low-impact techniques can be used to handle such errors and get data collection running again.

  • Unexpected errors. When these errors are raised, no attempt is made to automatically recover from the error. The data collector logs detailed error information that can be used to troubleshoot and resolve the error condition. In addition, the package or task that caused the error is disabled to stop errors from repeatedly getting raised. Recurring errors needlessly consume system resources and prevent data collection from functioning correctly and completing successfully.

In all cases, errors are logged using the logging mechanism described in Data Collector Logging.

Common Errors

The following table lists common errors and describes their likely causes, as well as how the data collector handles them.

Error

Description, cause and handling

Unable to connect to a data provider.

The data collector cannot connect to a server or a specific data provider, such as Transact-SQL. Possible causes include system configuration and security issues.

Handling: The error is logged and the collection set is stopped and flagged as disabled. The disabled state is logged in the execution log. There is no automatic recovery from this error.

The connection to a data provider is dropped during execution.

A monitored server has shut down unexpectedly, or there is a connectivity issue such as a failed network connection.

NoteNote
Planned shutdowns do not fall into this category. In the case of a planned shutdown, the collection sets are turned off when the SQL Server and SQL Server Agent instances are stopped.

The executing package fails and the error is logged. The data collector will attempt to restart the package after a brief interval, and if that fails, the collection set is stopped and flagged as disabled. The disabled state is logged in the execution log. Recovery from this point requires manual intervention.

Unable to connect to the management data warehouse.

The data warehouse is installed on a different computer from the data collector. Probable causes are network connectivity problems or an unavailable host server. This error only affects upload packages.

Handling: Because there is no advance notification about a server shutdown, this error cannot be anticipated and handled automatically. The error is logged and after a brief interval, the upload is restarted. After four unsuccessful upload attempts, the collection set is disabled and its state is written to the execution log.

NoteNote
Any data that is collected while the collection set is running is kept and accumulated. If the upload package can connect to the data warehouse, the accumulated data is uploaded.

The connection to the management data warehouse is dropped during an upload.

The data warehouse is installed on a different computer from the data collector. Probable causes are network connectivity problems or an unavailable host server. This error only affects upload packages.

Handling: Because there is no advance notification about a server shutdown, this error cannot be anticipated and handled automatically. The error is logged and after a brief interval, the upload is restarted. After four unsuccessful upload attempts, the collection set is disabled and its state is written to the execution log.

NoteNote
Any data collected while the collection set is running is kept and accumulated. If the upload package can connect to the data warehouse, the accumulated data is uploaded.
NoteNote
The transaction before the error is flagged as failed to prevent partial uploads. When connection is re-established, this batch of data is uploaded again.

An error is received from a data provider.

This can be any error, such as invalid parameters or an invalid request sent by the data collector. This is typically seen during development and is most likely to affect developers creating custom collection sets or collector types. When this error happens, the collection set is stopped and the error is logged. The error should be investigated and collection set restarted manually after the error is resolved.

There is an error in control flow.

The logic defined in the package control flow has failed.

Handling: If this error is foreseeable and is specific to a particular package, handle it by using the OnError control flow path. In many cases the package can automatically recover from the error and restart itself.

There is an error in data flow.

This error is raised by the data flow pipeline and typically falls into one of the following categories:

  • Data conversion errors, which occur if a conversion results in the loss of significant digits, the loss of insignificant digits, and the truncation of strings. Data conversion errors also occur if the requested conversion is not supported.

  • Expression evaluation errors, which occur if expressions that are evaluated at run time perform invalid operations or become syntactically incorrect because of missing or incorrect data values.

  • Lookup errors, which occur if a lookup operation fails to locate a match in the lookup table.

Handling: Each data component is configured to fail only if the data flow error is critical. By default, the error rows are redirected as separate output after the number of failed rows is counted. This information is then logged after the data flow completes and a data flow report is generated.