Solved

BCP errors

Posted on 2006-07-19
8
673 Views
Last Modified: 2012-06-27
I have  sqlserver database,and have to update this table with daily report.txt file.  i am using bcp tool to append the table, i ame having problome. the command is  
bcp master.dbo.pop IN  C:\log_task.txt -c -T -r -U -P
and the error is :
 sqlstate= s1000, nativeError. ODBC sql server Diriver unexpected EOF encountered in bcp data file.

is bcp is the best tool to be used or there are alternative procedure that can be ran from sql Server itself.

Thank you
0
Comment
Question by:huda12
  • 2
8 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17137335
Post few lines of you text
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 43 total points
ID: 17137339
bcp master.dbo.pop IN  C:\log_task.txt -n -T
0
 
LVL 3

Assisted Solution

by:chhapia_chintak
chhapia_chintak earned 41 total points
ID: 17137361
It can be a case that datatype of field you are importing does not match to the fields in the destination table(data type mismatch ) or An identity column had been added as the first column in the table and BCP is trying to put a value into it.

Or if not above case then Below URL may help:
http://support.microsoft.com/default.aspx/kb/271344

You can aslo use DTS package instad of BCP to import data.


0
 
LVL 11

Assisted Solution

by:deroby
deroby earned 41 total points
ID: 17138207
Most likely your field-separator is wrong, or (in the worst case), some fields may contain the field-separator causing them to get split up...
Like  aneeshattingal asked, post like the first 5 lines AND the last 5 lines of c:\log_task.txt here... just to get an idea.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now