Posted - 02/20/2012 : 01:12:17
I have a script that loads all data from the backup to the Database.
When running the script I get to the problem table,
The script reads that there are 3325 records, the outputs this error 10 times :
Error = [Microsoft][SQL Server Native Client 10.0] String data, right trunction SQLState = 2201, Native error = 0
after that error outputs 10 times, I get this error once
SQLState = s1000, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0] Text Column data incomplete
Then, the next line of output is
43 rows copied
All of the other tables copy the correct amount of records.
The bcp line of code is :
bcp %DEST_DB%.dbo.%TABLE% in tempdump ^
-U %DEST_USER% ^
-P %DEST_PASS% ^
-S %DEST_SERVER% ^
IF ERRORLEVEL 1 (
ECHO An error has occured when loading data to the %TABLE% table from %DEST_SERVER%/%DEST_DB% using the username %DEST_USER%.
However, after the errors I mention above, the 3 tables after the error table complete, therfore the line
GOTO:EOF in bcp is not being reached.
I think the field that is causing the errors is
Thanks for any advice, if you need more information on the problem just ask for specifically what info you need (to be able to help me).