In order to reduce the db size, in particular concerning attachments, you can consider to store the attachments in sharepoint.
1. Develop a webservice that can write,delete and retrieve data in sharepoint.
2. Develop a plugin that triggers on creation, delete and retrieves of attachments
Create:
When the attachment is created in crm, a plugin calls the sharepoint webservice, stores the attachment in sharepoint and (IMPORTANT) update the attachment.body to NULL, automaticly the attachment.filesize is updated to 0.
Delete:
When a attachment is deleted in crm, delete the file in sharepoint by using the SP webservice delete function.
Retrieve:
When the emailform is loaded, in background a retrieve of the attachments is done in the crm db, for every retrieve the plugin does a retrieve in sharepoint and receives the filesize. In the plugin context you update this filesize from sharepoint, otherwise the attachment has a filesize of 0 in crm.
When you click on the attachment, you also do a retrieve in sharepoint to return the body, and update in the plugin the body in the context. This way, when you click in crm on a attachment, that is stored in SP, you get this attachment in SP, and can open it in crm. Nobody will see that the attachment in the background is stored en received in sharepoint.
This way you can reduce gb's of data in the crm database.
This way, when someone or the emailrouter creates a email with for example 16 attachments, all 16 attachments will be stored in sharepoint , and in the crm attachment table the body will be NULL , and filesize 0 .
In order to clear up the existing historicly data in attachments, write a service or console application and read from the attachment table and upload the data to sharepoint by using the sharepoint webservice.
There are several commercial packages that do these actions, but it's also written by yourself in 2 days.
This way i cleared up millions of attachments in a customers database.