When you first connect to your Exchange Organization or run Regather Structure you get the following an error similar to the following:
"The following error occurred in storing an Exchange Site/Administrative Group: Error in Executing SQL Statement - Message: The INSERT permission was denied on the object 'T_Sites', database 'MessageStats', schema 'dbo'"
This can occur if you choose to specify Explicit Credentials when configuring the Connction Server Properites instead of using the Default Task Security Context (the MessageStats service account as specified during the installation). If the explicitly specified credentials do not have the proper database rights, the data collected will not be added to the MessageStats database.
WORKAROUND 1:
Add the additional credentials to the following MessageStats database roles:
1. public
2. MessageStats_Admin
3. db_securityadmin
4. db_ddladmin
WORKAROUND 2:
Change the Connection Server Properties to use the Default Task Security Context for the Task Execution Server.
Note: If connecting to an Exchange 2010 Organization, prior to changing the Security Context ensure the MessageStats service account has full access rights to the Exchange 2010 Logon Mailbox.
To change Security Context:
1. Open the MessageStats console
2. Expand Exchange Organizations
3. Right click your Organization name and select Properties
4. Select the Connection Server tab
5. Click the Configure button
6. Select Use Default Task Security Context
7. Click Accept
8. Click OK