Solved

BCP errors

Posted on 2006-07-19
8
677 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 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

730 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