I/o Error Reading Bcp Format File
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this i/o error while writing bcp data-file site About Us Learn more about Stack Overflow the company Business Learn
Unexpected Eof Encountered In Bcp Data-file
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up I/O error while reading BCP format file up vote 3 down vote favorite Today I created a new staging table and a BCP .fmt file. I created some test data and attempted to run the BCP utility from the command line: I've got about 20 different format files and staging tables from previous work and this is the first time I have encountered this error. How can I fix this error? Please note, I have added my solution below, but if you have other answers, please add them in. The answer was so quirky/obscure that I think it may help others. sql-server-2008-r2 bcp share|improve this question edited Mar 30 '12 at 18:07 asked Mar 30 '12 at 17:59 Jon Raynor 2,6641130 add a comment| 1 Answer 1 active oldest votes up vote 15 down vote accepted Basically, this one was really strange. In order for it to work, make sure there is an empty line after the last column defined in the format file. I added an extra empty line, resaved the file, and then the BCP utility ran the file successfully. I've indicated the extra line with a red rectangle. share|improve this answer edited Mar 30 '12 at 18:07 answered Mar 30 '12 at 18:02 Jon Raynor 2,6641130 Oh wow. Thanks for that. You've probably just saved me hours. –Kamal Oct 23 '12 at 8:08 I have a problem but the opposite way. I'm exporting an XML field into a file, and the resulting file has an extra empty lin
New? Advanced Search Forum Database Discussions MS SQL Server 7/MS SQL Server 2000 [mssql] I/O error while reading BCP format file If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: [mssql] I/O error while reading BCP format file Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 02-29-2000,01:37 AM #1 Daniel Bolger Guest [mssql] I/O error while reading BCP format http://stackoverflow.com/questions/9948130/i-o-error-while-reading-bcp-format-file file Hi All, I had a problem today where BCP would not read the format file I created giving the following error: I/O error while reading BCP format file. I searched the archives here at swynk.com and found a thread titled exactly the same as the one I am now creating. There were numerous responses to this thread but none of them seemed to solve the problem for me (short of the one that suggested using BCP to create the format http://forums.databasejournal.com/showthread.php?18211-mssql-I-O-error-while-reading-BCP-format-file file, which I didn't want to do). I used BCP to create a format file for me (which looked identical to the format file that I created) and it worked fine. With my suspicions aroused, I used a binary file viewer to look at the contents of each file and highlight the differences. Apart from the usual variations in whitespace I noticed that the my file did not have any carriage returnline feed at the end of the last row definition. My format file ended at the end of the last row definition line. It did not have any carriage returns and line feeds. I matched the one generated by BCP and added the following " " to the end of the file, tested my format file and it worked perfectly. The moral of the story is, make sure when you create a format file, you have an empty line at the end of the file (ie: after your last "Server Column Name", make sure you have " " sans quotes). Hope this saves someone a few hours :-) Cheers, Dan. Reply With Quote 11-26-2007,01:42 PM #2 hi_madan View Profile View Forum Posts Registered User Join Date Nov 2007 Posts 1 dude... you are a lifesaver. long live Dan! madan Reply With Quote Quick Navigation MS SQL Server 7/MS SQL Server 2000 Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Database Discussions IBM DB2 Informi
IO error while reading BCP format file Discussion in 'SQL Server http://www.sql-server-performance.com/forum/threads/io-error-while-reading-bcp-format-file.19072/ DTS-Related Questions' started by cutiepie, Sep 21, 2005. cutiepie New https://groups.google.com/d/topic/microsoft.public.sqlserver.server/_bh0yCtcHG0 Member hi, i m having problems with the bcp file format... 9.0 2 1 SQLCHAR 0 4 "," 1 in_numbers SQL_Latin1_General_CP1_CI_AS 2 SQLCHAR 0 5 " " 2 values SQL_Latin1_General_CP1_CI_AS and the input file is 1234,other 5678,column but now its i/o error givin me the error as IO error while reading BCP format file.... it was workin for sometime..it copied these two rows as well...but again its givin me this error again n again...i cant understand...wat m i suppose to do now...PLEASEEEEE TRY TO HELPPPP thnks in advance cutiepie, Sep 21, 2005 #2 i/o error reading satya Moderator Is this topic related to your current problem threadhttp://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=10436 ? Ensure the path and columns are properly specified for that bcp file. Satya SKJ Moderator http://www.SQL-Server-Performance.Com/forum This posting is provided “AS IS†with no rights for the sake of knowledge sharing. satya, Sep 21, 2005 #2 dineshasanka Moderator check this http://sqlteam.com/forums/topic.asp?TOPIC_ID=43246 ---------------------------------------- Cast your vote http://www.geocities.com/dineshasanka/sqlserver05.html http://spaces.msn.com/members/dineshasanka dineshasanka, Sep 21, 2005 #2 cutiepie New Member Hi,thanks for your suggestions.... i found the mistake...it was just after the last row i had to press ENTER twice or thrice so that there will be some more empty rows in the format file... thats all...n the problem is solved now.. thnks once again cutiepie, Sep 21, 2005 #2 (You must log in or sign up to reply here.) Share This Page Tweet Please click 'Forgot Your Password' to reset your password if this is your first time using the new forums. You
från GoogleLogga inDolda fältSök efter grupper eller meddelanden