While running a large Exchange Mailbox Content and Attachment Gathering, you can get errors similar to below in the logs.
DataObject write to database failed with exception. Message: Error in Executing SQL Statement - Message: Connection failure;; SQL Statement =
INSERT INTO T_FolderMessages
(
[FolderMessageGUID],
[ObjectGUID],
[TaskInstanceGUID],
[Date],
[LastModifiedDate],
[Class],
[Subject],
[OriginalSubject],
[SentSpecificallyToRecipient],
[MessageID],
[OriginalSender],
[OriginalSenderEmail],
[ConversationTopic],
[RecipientAddressType],
[RecipientEmail],
[Originator],
[OriginatorAddressType],
[OriginatorEmail],
[DeliveryTime],
[SizeBytes],
[HasAttachments],
[NormalizedSubject],
[MessageBodyType],
[ExternalMessageID],
[Creator],
[CreationDate],
[SentDate]
)
VALUES
(
:ParamFolderMessageGUID,
:ParamObjectGUID,
:ParamTaskInstanceGUID,
When the MessageStats database and the MessageStats application are on different servers, The MessageStats application and the MessageStats database were disconnected during the Content and Attachment gathering.
Make sure you have a reliable connection between the server that hosts the MessageStats Task Processor and the server that hosts the MessageStats database.
Ensure that the SQL server that hosts the MessageStats database is not running any Mainantence Job while any gatherings are running.