2014-02-14 126 views
1

當試圖從MS SQL遷移我的數據到MySQL,一個數據庫基本轉換爲另一種,我得到以下錯誤:無效的時間戳文字檢測

[WRN][copytable]: Invalid timestamp literal detected;" 

我已經附加了什麼我得到時的屏幕截圖使用WorkBench。爲什麼會發生這種情況?數據庫的大小是10438MB 在我的本地系統上使用SQL SERVER 2008 R2進行配置。爲了這個目的,我嘗試了很多免費軟件工具,但是沒有這麼做。上次我 嘗試使用MySQL工作臺來轉換這個數據庫,但再次失敗。 I 嘗試了基於錶轉換的選擇以及完整的數據庫。

+1

似乎是一個錯誤http://bugs.mysql.com/bug.php?id=71350 – Incognito

+0

是否有任何形式的變通,可做完了? – user3306243

+0

請參閱評論[5 5月23:25]喬納森戈登在該線程(http://bugs.mysql.com/bug.php?id=71350)。您可以在MS-SQL數據庫中運行這些查詢來創建腳本,這些腳本將使所有NULL smalldatetimes變爲1970-01-01 ..然後,他們創建的第二個腳本將在完成遷移後將其恢復爲NULL。 –

回答

1

報價:

Datetime - In MYSQL datetime does not contain milliseconds. The SQL Server datetime datatype contains milliseconds. Error: 「Invalid timestamp literal detected」 error. Solution: Convert the datetime type to a smalldatetime in SQL Server if you do not mind losing the milliseconds.

from here.