DvSchemaSync automatically converts Dataverse column types to appropriate SQL Server data types. This page provides a complete reference of these mappings.
Dataverse to SQL Server Type Mappings
| Dataverse Type | SQL Server Type | Notes |
|---|---|---|
| Single Line of Text | NVARCHAR(n) | Length matches Dataverse max length |
| Multiple Lines of Text | NVARCHAR(MAX) | Supports large text content |
| Whole Number | INT | 32-bit integer |
| Decimal Number | DECIMAL(p,s) | Precision/scale preserved from Dataverse |
| Floating Point | FLOAT | Double precision |
| Currency | DECIMAL(19,4) | Fixed precision for currency values |
| Two Options (Boolean) | BIT | 0 = False, 1 = True |
| Date Only | DATE | Date without time component |
| Date and Time | DATETIME2 | Full datetime with time zone awareness |
| Choice (Option Set) | INT | Stores numeric value; see Option Set Handling |
| Choices (Multi-Select) | NVARCHAR(MAX) | Comma-separated values |
| Lookup | UNIQUEIDENTIFIER | GUID reference to related record |
| Customer | UNIQUEIDENTIFIER | Polymorphic lookup (Account or Contact) |
| Owner | UNIQUEIDENTIFIER | Polymorphic lookup (User or Team) |
| Unique Identifier | UNIQUEIDENTIFIER | Primary key (GUID) |
Special Handling Notes
Polymorphic Lookups:
Customer and Owner fields can reference multiple table types. DvSchemaSync creates additional columns to store the target entity type (e.g., customerid_type) alongside the GUID.
Calculated and Rollup Fields:
These fields are synced as their resulting data type. Values are snapshots at sync time and are not recalculated in SQL.
NULL Handling:
All SQL columns are created as nullable to match Dataverse behavior. Empty/null values in Dataverse become NULL in SQL.