Solved

BCP errors

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
T-SQL 10 32
NOLOCK still valid for 2014? 5 35
Re-appearing SQL Server Agent jobs 7 28
SQL Activity Monitor detail 2 23
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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

789 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