Solved

row terminator in Bulk Insert SQL Server 2005

Posted on 2011-03-10
7
816 Views
Last Modified: 2012-05-11
i get an extract daily via ftp that was a text file that is now compressed and having a .gz extension and is now binary. my bulk insert was working without a ROWTERMINATOR when it  was a .txt file, but since its been .gz I get
Msg 4866, Level 16, State 1, Line 1
The bulk load failed. The column is too long in the data file for row 1, column 33. Verify that the field terminator and row terminator are specified correctly.

I added a ROWTERMINATOR = '\r\n' to no avail. The file is an extract from Oracle. I can import the file into access no problem. Any help is appreciated.

Thanks,

Jim
0
Comment
Question by:jmoss111
[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
  • 4
  • 3
7 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 35098558
.gz is a compressed file -- you need to un-compress it first using the gzip command like this:

  gzip.exe  -d  myfile.gz
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 35098568
Run the above from a command prompt in the same folder where your file resides.  If you don't have gzip.exe you can download it from several places - just google.
0
 
LVL 18

Author Comment

by:jmoss111
ID: 35098587
yes i do uncompress the file and i have the problem with the extracted .txt file and not by trying to load the .gz file

0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 33

Expert Comment

by:knightEknight
ID: 35099629
I'm guessing then that the file comes from a unix/linux environment.  Have you tried setting ROWTERMINATOR='\n'   or  ROWTERMINATOR='\r'  ?
0
 
LVL 18

Author Comment

by:jmoss111
ID: 35103934
the file did come from unix/Oracle and i tried ROWTERMINATOR = '\r\n'  and ROWTERMINATOR = '\n' and ROWTERMINATOR = '\r'
0
 
LVL 18

Accepted Solution

by:
jmoss111 earned 0 total points
ID: 35109677
i downloaded todos.exe and ran that against my files... problem solved
0
 
LVL 18

Author Closing Comment

by:jmoss111
ID: 35145516
i found a workable solution
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

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…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

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