What we were doing is to copy the production instance to a sandbox dito with the minimal copy instance option from the Administration center. According to the documentation from Microsoft found at https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/copy-instance the entities that are copied are the following:
- BusinessUnit
- ConnectionRole
- Currency
- DuplicateRule
- DuplicateRuleCondition
- EmailServerProfile
- FieldPermission
- FieldSecurityProfile
- ImportMap
- InternalAddress
- Mailbox
- Organization
- Position
- Report
- Resource
- ResourceGroup
- Role
- RollupField
- SavedQuery
- SLAKPIInstance
- Solution
- Subject
- Team
- TeamTemplate
- Template
- SystemUser
Digging deeper into this I had a look at what data is present and there's quite a lot of Audit logs according to the admin center, 850 MB of those, but when I look at the Audit logs in the instance, there's 250MB that I can find. Looking at the Entity list, Audit logs aren't present there making it even more confusing.
The top three biggest tables are contoso_paymentBase, ContactBase and AuditBase (contoso_paymentBase is called something else really, but it's a custom entity, or the "contoso_payment" is a custom entity at least). Now, these tables should be the SQL tables of the entities "contoso_payment", "Contact" and "Audit", but how can they be so large considering there are NO records in the first two and yes, 250 MB in the Audit table which I can see, but not 800 MB.
I started a support case with Microsoft in this matter at the first contact I was told that I should do a reset of the instance, which isn't really what I want since I want the metadata presented above plus all customizations, Microsoft was going to investigate and come back to me.
Rickard Norström
Developer at CRM-Konsulterna
www.crmkonsulterna.se
Developer at CRM-Konsulterna
www.crmkonsulterna.se