我正在尝试将SQL Server 2008 R2数据库迁移到Windows Azure。我正在使用SQLAzureMW。但是插入几行后我得到了以下错误。
BCP Command: bcp.exe "mydatabase.dbo.tableTest" in "c:\SQLAzureMW\BCPData\dbo.tableTest.dat" -E -w -b 10000 -a 16384 -q -S SERVER.database.windows.net -U "Test@vSERVER" -P "password"
*****
01/03/2013 10:18:08--> Error
Starting copy...
SQLState = 22003, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Numeric value out of range
SQLState = 22005, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid character value for cast specification
SQLState = 22001, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]String data, right truncation
SQLState = 22005, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid character value for cast specification
10000 rows sent to SQL Server. Total sent: 10000
SQLState = 22001, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]String data, right truncation
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
我确保表脚本与SQL Server中的数据库表生成完全匹配,并且数据库排序规则在两方都是相同的。
您能告诉我如何解决这些问题吗?
答案 0 :(得分:2)
尝试确保源数据库和目标数据库上的排序规则相同,否则您可能会遇到这些错误。
从SQLAzure MW创建新目标数据库时要小心,因为它可能默认为另一个排序规则。