What is the SSMA XML construct to convert TEXT to VARCHAR, not NVARCHAR - to set invalid SQL dates to NULL

Wade McPherson 0 Reputation points
2025-02-23T17:15:46.52+00:00

I am using SSMA for ACCESS and I want to use the console.EXE so that I can automate the migration of ~25 separate databases all to the same SQL Server instance.

I am able to use the GUI to achieve the results that I want but I do not want ot have to manually load all projects and run them individually what I need to update my SQL database for testing.

I would like to know how to properly construct the following in my console-XML files:

How to convert from TEXT to VARCHAR.

How to set invalid SQL dates to NULL - also within the XML file.

This iwhat I have been trying but it gives a error

<set-project-type-mapping type-mapping-schema="Generic type mapping" source-type-id="TEXT@1" target-type-id="VARCHAR@1"> <source-type-param start="1" end="15" /> <target-type-param value="25" /> </set-project-type-mapping>

<set-project-type-mapping type-mapping-schema="Generic type mapping" source-type-id="TEXT@1" target-type-id="VARCHAR@1"> <source-type-param start="16" end="30" /> <target-type-param value="50" /> </set-project-type-mapping>

**FATALERR Invalid type mapping: The new type mapping from source 'TEXT@1' to target 'VARCHAR@1' has a conflict with the existing one. **

I can achieve the desired results by using the GUI, but I need to get it working in the XML file(s) in order to automate the processes.

Thanks in advance

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
553 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.