?
Solved

BCP errors

Posted on 2006-07-19
8
Medium Priority
?
680 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 172 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 164 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 164 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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 combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

765 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