SSMA MySql to MsSql Null Value Error

十年热恋 提交于 2019-12-13 08:00:01

问题


The MySQL contains some tables with some zero date time : '0000-00-00 00:00:00'. When using SSMA to migrate the database into MsSql I am facing the error about cannot insert DbNull. This is understandable since neither MySql or MsSql has this field nullable.

What I do not understand is that I changed SSMA's Default Projet setting to Replace with a constant all zero-date Not Null columns. The constant I choose is : 1900-01-01.

Is there any other settings that must be set?


回答1:


The only way I found is to go inside the MySql database, alter every table that is having a default value with zero based datetime to allow null. Then, I update every of these fields to update zero based value to null. From here, using the ssma tool work since their is no more zero based date time. This is far from being perfect but it works.



来源:https://stackoverflow.com/questions/30609026/ssma-mysql-to-mssql-null-value-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!