April 19, 2012 at 9:04 am
I have done a bcp queryout form a table to a csv file. Now when I'm trying to perform a bcp in from the csv to the same table in different server, it's giving me following error:
Starting copy...
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
SQLState = 22008, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0]Invalid date format
I am no clue whats happening. There are few date columns which have dates like '1900-01-01 00:00:00.000', some like '2012-04-21 11:28:19.345' and some have NULL values. Is there something which I'm missing ?
April 19, 2012 at 9:07 am
Without seeing the DDL for the table(s) and sample data including some which errors out, not much we can do from here.
April 19, 2012 at 9:36 am
As Lynn stated, we need the DDL for the export table and the import table. Looking at the error, it is telling you that the date columns are not compatible or you have some columns out of order.
Jared
CE - Microsoft
April 19, 2012 at 11:05 am
Got it. Thanks experts. There was one new column which has unnecessary kept me occupied. I should have tested that in first place. however there is new error "String data, right truncation" where we have following data value in the column:
; nested exception is: java.net.ConnectException: Connection timed out
April 20, 2012 at 12:04 am
Can someone help on it ?
April 20, 2012 at 12:12 am
sqlnaive (4/19/2012)
... error "String data, right truncation" where we have following data value in the column:; nested exception is: java.net.ConnectException: Connection timed out
I guess the width of the columns is not enough to hold the data.
Increase the column width (to say 100). It should fix the issue.
April 20, 2012 at 6:35 am
sqlnaive (4/20/2012)
Can someone help on it ?
Without more information there really isn't much we can do. The problem is that we can't see everything you see. We really need the DDL (CREATE TABLE statements) for the table(s), some sample data that demonstrates the problem, and if you have a format file for the file that would be helpful. Also, the BCP commands you are using.
April 20, 2012 at 9:21 am
Try creating the table on the 2nd server using the same script as the source (1st)server. Looks like they are different.
P
April 21, 2012 at 1:45 am
Interestingly I created the table on second table from same script as in main server. So i don't think there is any kind of column data length mismatch issue.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply