BCP cross-plataforms

Hi

I'm triying to download a table into a file using bcp with the following:

bcp bdteam02.dbo.bck_encbzdo_pddo out
Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
The Server is a Linux

The i use the following command to import it to a database in a Windows NT
server

bcp bdteam02.dbo.bck_encbzdo_pddo in
Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,

and the following error occurs

Starting copy...
Unexpected EOF encountered in BCP data-file.
bcp copy in failed

Any idea why is this happenig

--
Atentamente,

Jorge Alberto Ar�valo Ruiz
Gerente
SAES Ltda.



0
SAES
11/13/2001 10:38:49 PM
sybase.ase.general 8655 articles. 0 followers. Follow

9 Replies
758 Views

Similar Articles

[PageSpeed] 37
Get it on Google Play
Get it on Apple App Store

Are you sure that none of the columns in the table contain values that include
commas?
(you might try changing the -t parameter to some other character).

-bret


SAES-Jorge Arevalo wrote:

> Hi
>
> I'm triying to download a table into a file using bcp with the following:
>
> bcp bdteam02.dbo.bck_encbzdo_pddo out
> Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> The Server is a Linux
>
> The i use the following command to import it to a database in a Windows NT
> server
>
> bcp bdteam02.dbo.bck_encbzdo_pddo in
> Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
>
> and the following error occurs
>
> Starting copy...
> Unexpected EOF encountered in BCP data-file.
> bcp copy in failed
>
> Any idea why is this happenig
>
> --
> Atentamente,
>
> Jorge Alberto Ar�valo Ruiz
> Gerente
> SAES Ltda.

0
Bret
11/13/2001 11:28:04 PM
I've try another characters and the same error appears

--
Atentamente,

Jorge Alberto Ar�valo Ruiz
Gerente
SAES Ltda.

"Bret Halford" <bret@sybase.com> wrote in message
news:3BF1AC84.3F2EFF2D@sybase.com...
> Are you sure that none of the columns in the table contain values that
include
> commas?
> (you might try changing the -t parameter to some other character).
>
> -bret
>
>
> SAES-Jorge Arevalo wrote:
>
> > Hi
> >
> > I'm triying to download a table into a file using bcp with the
following:
> >
> > bcp bdteam02.dbo.bck_encbzdo_pddo out
> > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > The Server is a Linux
> >
> > The i use the following command to import it to a database in a Windows
NT
> > server
> >
> > bcp bdteam02.dbo.bck_encbzdo_pddo in
> > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> >
> > and the following error occurs
> >
> > Starting copy...
> > Unexpected EOF encountered in BCP data-file.
> > bcp copy in failed
> >
> > Any idea why is this happenig
> >
> > --
> > Atentamente,
> >
> > Jorge Alberto Ar�valo Ruiz
> > Gerente
> > SAES Ltda.
>


0
SAES
11/14/2001 12:47:08 PM
I've had similar problems when char/text columns contain free form text. 
These frequently include the column and row terminators as part of the 
data. 
You might try using a format file with either prefix lengths or fixed 
lengths or extended column terminators such as [[[[]]]].
You could also load an empty table using a batch size of 1 to help find the 
exact record creating the problem.  Looking at the data may lead you to a 
solution.
0
wkraatz
11/14/2001 3:17:17 PM
Try to specify -r "\r\n" row terminator and then bin format in ftp
or just copy your file using ascii format in ftp,
anyway just make sure that you have CRLF <-> "\r\n" <-> "0D0A")
as row terminator on NT side (on Unix it is only LF <-> " \r"<-> "0A")

HTH,
Eugene
wkraatz wrote:

> I've had similar problems when char/text columns contain free form text.
> These frequently include the column and row terminators as part of the
> data.
> You might try using a format file with either prefix lengths or fixed
> lengths or extended column terminators such as [[[[]]]].
> You could also load an empty table using a batch size of 1 to help find the
> exact record creating the problem.  Looking at the data may lead you to a
> solution.

0
Eugene
11/14/2001 4:04:21 PM
Sorry, skip previuos one...
Try to specify -r "\r\n" row terminator and then bin format in ftp
or just copy your file using ascii format in ftp,
anyway just make sure that you have CRLF <-> "\r\n" <-> "0D0A")
as row terminator on NT side (on Unix it is only LF <-> "\n" <-> "0A")

HTH,
Eugene
wkraatz wrote:

> I've had similar problems when char/text columns contain free form text.
> These frequently include the column and row terminators as part of the
> data.
> You might try using a format file with either prefix lengths or fixed
> lengths or extended column terminators such as [[[[]]]].
> You could also load an empty table using a batch size of 1 to help find the
> exact record creating the problem.  Looking at the data may lead you to a
> solution.
0
Eugene
11/14/2001 4:06:57 PM
Try specifying a row terminator of -r\r\n.

SAES-Jorge Arevalo wrote:

> I've try another characters and the same error appears
>
> --
> Atentamente,
>
> Jorge Alberto Ar�valo Ruiz
> Gerente
> SAES Ltda.
>
> "Bret Halford" <bret@sybase.com> wrote in message
> news:3BF1AC84.3F2EFF2D@sybase.com...
> > Are you sure that none of the columns in the table contain values that
> include
> > commas?
> > (you might try changing the -t parameter to some other character).
> >
> > -bret
> >
> >
> > SAES-Jorge Arevalo wrote:
> >
> > > Hi
> > >
> > > I'm triying to download a table into a file using bcp with the
> following:
> > >
> > > bcp bdteam02.dbo.bck_encbzdo_pddo out
> > > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > > The Server is a Linux
> > >
> > > The i use the following command to import it to a database in a Windows
> NT
> > > server
> > >
> > > bcp bdteam02.dbo.bck_encbzdo_pddo in
> > > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > >
> > > and the following error occurs
> > >
> > > Starting copy...
> > > Unexpected EOF encountered in BCP data-file.
> > > bcp copy in failed
> > >
> > > Any idea why is this happenig
> > >
> > > --
> > > Atentamente,
> > >
> > > Jorge Alberto Ar�valo Ruiz
> > > Gerente
> > > SAES Ltda.
> >

0
Carl
11/14/2001 5:00:55 PM
Another thought...

Do you have connectivity between the Linux and NT servers? And did you bcp out
of linux, copy the file to NT, and bcp in?

If so try doing the bcp out on the NT, that is, run bcp on NT and have it
create the export file on NT, then bcp it in.

When I do this I usually specify -n for native and eliminate -r, -t, or -c.

Also, be sure the table definitions are exactly the same.

Try specifying -efilename to specify a error file during the bcp in. You might
get more detailed error messages that could help solve the problem.

Good Luck,
Carl

SAES-Jorge Arevalo wrote:

> I've try another characters and the same error appears
>
> --
> Atentamente,
>
> Jorge Alberto Ar�valo Ruiz
> Gerente
> SAES Ltda.
>
> "Bret Halford" <bret@sybase.com> wrote in message
> news:3BF1AC84.3F2EFF2D@sybase.com...
> > Are you sure that none of the columns in the table contain values that
> include
> > commas?
> > (you might try changing the -t parameter to some other character).
> >
> > -bret
> >
> >
> > SAES-Jorge Arevalo wrote:
> >
> > > Hi
> > >
> > > I'm triying to download a table into a file using bcp with the
> following:
> > >
> > > bcp bdteam02.dbo.bck_encbzdo_pddo out
> > > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > > The Server is a Linux
> > >
> > > The i use the following command to import it to a database in a Windows
> NT
> > > server
> > >
> > > bcp bdteam02.dbo.bck_encbzdo_pddo in
> > > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > >
> > > and the following error occurs
> > >
> > > Starting copy...
> > > Unexpected EOF encountered in BCP data-file.
> > > bcp copy in failed
> > >
> > > Any idea why is this happenig
> > >
> > > --
> > > Atentamente,
> > >
> > > Jorge Alberto Ar�valo Ruiz
> > > Gerente
> > > SAES Ltda.
> >

0
Carl
11/14/2001 6:52:43 PM
Thaks!

--
Atentamente,

Jorge Alberto Ar�valo Ruiz
Gerente
SAES Ltda.

"Carl Moritz" <carl_moritz@iroquois.com> wrote in message
news:3BF2BD7B.F0CF53BB@iroquois.com...
> Another thought...
>
> Do you have connectivity between the Linux and NT servers? And did you bcp
out
> of linux, copy the file to NT, and bcp in?
>
> If so try doing the bcp out on the NT, that is, run bcp on NT and have it
> create the export file on NT, then bcp it in.
>
> When I do this I usually specify -n for native and eliminate -r, -t,
or -c.
>
> Also, be sure the table definitions are exactly the same.
>
> Try specifying -efilename to specify a error file during the bcp in. You
might
> get more detailed error messages that could help solve the problem.
>
> Good Luck,
> Carl
>
> SAES-Jorge Arevalo wrote:
>
> > I've try another characters and the same error appears
> >
> > --
> > Atentamente,
> >
> > Jorge Alberto Ar�valo Ruiz
> > Gerente
> > SAES Ltda.
> >
> > "Bret Halford" <bret@sybase.com> wrote in message
> > news:3BF1AC84.3F2EFF2D@sybase.com...
> > > Are you sure that none of the columns in the table contain values that
> > include
> > > commas?
> > > (you might try changing the -t parameter to some other character).
> > >
> > > -bret
> > >
> > >
> > > SAES-Jorge Arevalo wrote:
> > >
> > > > Hi
> > > >
> > > > I'm triying to download a table into a file using bcp with the
> > following:
> > > >
> > > > bcp bdteam02.dbo.bck_encbzdo_pddo out
> > > > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > > > The Server is a Linux
> > > >
> > > > The i use the following command to import it to a database in a
Windows
> > NT
> > > > server
> > > >
> > > > bcp bdteam02.dbo.bck_encbzdo_pddo in
> > > > Recucuta.bcp -Usa -Psybase -SSERVER01 -c -t,
> > > >
> > > > and the following error occurs
> > > >
> > > > Starting copy...
> > > > Unexpected EOF encountered in BCP data-file.
> > > > bcp copy in failed
> > > >
> > > > Any idea why is this happenig
> > > >
> > > > --
> > > > Atentamente,
> > > >
> > > > Jorge Alberto Ar�valo Ruiz
> > > > Gerente
> > > > SAES Ltda.
> > >
>


0
SAES
11/15/2001 12:45:57 PM
I had the same error on Windows and then followed Carl's suggestion. It 
turned out that -r\n worked in my case. Note: There seems no need to 
specify -r parameter on solaris. 
0
wsun
3/27/2002 10:40:30 PM
Reply:

Similar Artilces:

What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a US general http://en.wikipedia.org/wiki/Smedley_Butler > I spent 33 years and four months in active military service and > during that period I spent most of my time as a high class thug for > Big Business, for Wall Street and the bankers. In short, I was a > racketeer, a gangster for capitalism. I helped make Mexico and > especially Tampico safe for American oil interests in 1914. I helped > make Haiti and Cuba a decent place for the National City Bank boys to > collect revenues in. I ...

ASE to ASE
Hi, Is anyone out there doing ASE to ASE replication using SQL remote? If you are have created your own version of the SSEXTRACT utility to set up a replicant database in ASE rather than ASA? Or does anyone know if SYBASE has created a version SSEXTRACT for use with ASE to ASE replication? Thanks in advance Doug Trainer Hi Douglas, I thought the SQL Remote Replication support in ASE11.5 was meant for a consolidate-database only (by design)! At least that was what Sybase said when they announced support for SQL Remote technology support in ASE11.5. I will be happy to...

ASE and ASE
Could it be possible to take scripts from ASA and load them in an ASE Any information is welcome jean-fran�ois ASA supports a fairly large sub-set of Transact-SQL, so if you write your stored procedures and triggers in ASA using T-SQL, you should be able to create scripts that will run against both ASE and ASA. If you're planning to do this though, I would suggest developing your database schema against ASA, since everything you write in T-SQL in ASA will be supported on ASE, but the reverse is not true. Check out the section in the ASA documentation entitled "Tra...

BCP into ASE
Are there any benchmarks for bcp'ing flat files into ASE? I am trying to load a table w/ 44 columns, row width 512 bytes -> the file has 35 million records (somewhere around 17 gig) ----> does anyone have any idea how long this should take? ballpark figure? running on a 4 CPU box w/ 2 gig memory. Thanks!!! try bcp with the parameters -Jiso_1 , -A 16384 and -b 100000 It may take about 50mn (may be less). Be s�r that you have your clustered index defined on te table. mohdoukali@aol.com Anonymous@sybase.com a �crit dans l'article <47E3835358E4EFC600...

Are there any incompatibilities between bcp on ASE 11.9.2 and ASE 12.0?
Hi all: We are running two servers: ASE 11.9.2 and ASE 12.0 on the same NT 4.0 machine. A C program inserts rows into one table, called ms_orig. Running the same program with the same input data versus ASE 11.9.2 and ASE 12.0 we obtained two ms_orig tables, one for each server. Let's call them '(1192)ms_orig' and '(12)ms_orig'. The first strange result was that applying bcp out in character form for both ms_orig tables we found out that rows generated for '1192(ms_orig)' are delimited by 0x0a and rows generated for '(12)ms_orig' were delim...

Bcp of ASE 11.5.1 syslogins into ASE 12.0 not working.
I tried to bcp the content of the syslogins table of an ASE 11.5.1 server to a new installed 12:0 server but it did not work. I will appreciate all help. The problem is probably that some columns have been added in between the two versions. Try this: 1) have a look at the syslogins on 11.5.1 2) on 12.0, do a "select into" from syslogins into a new table of just the columns that were in 11.5.1 3) bcp into this table 4) insert into syslogins the values from the new table, adding dummy placeholders for the new columns. Richie wrote: > I tried to bcp ...

ASA To ASE - VS
What are the differents in terms of configuring SQL Remote Between ASA to ASE and ASE To ASE ? You should start with the Help file and then ask specific questions: Data Replication with SQL Remote PART 5. Appendix APPENDIX A. Enterprise and Anywhere: Differences There are many differences, so begin there. -- David Fishburn Sybase Please only post to the newsgroup BH Ong <bhong@tm.net.my> wrote in message news:01bf4b98$33183580$7ccdc8c8@virtual-branch... > What are the differents in terms of configuring SQL Remote Between ASA to > ASE and ASE To ASE ...

Bcp between Ase
I'm trying to make a bcp from ASE to Anywhere but the anywhere(6.0.3) LOAD = TABLE was one argument that is the delimiter, this delimiter is only a=20 char, and on bcp out delimiter can be a string. So tables are big and have = all ASCII possible delimiters, how i can pass data from ASE to Anywhere=20 without do pipelines (is to slow) ? Thank you=20 N=E9lio Marques Portugal Just force BCP to output in a format that is consistent with what LOAD TABLE will understand (ie. comma delimited fields). You should have no problems. -- Jason Hinsperger International and Sus...

Cross ASE Triggers
How is it possible to have cross ASE triggers? I have 3 ASEs but will need to use one for authentication to an application. When the application creates a user in one ASE (sp_addlogin), is it possible to trigger the same sp_addlogin in another ASE? Appreciate any help. Thanks. ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp Nai Min Chong wrote: > How is it possible to have cross ASE triggers? I have 3 ASEs but will need to > use one for authentication to an application. When the application creates a > user ...

Adding ASE to existing ASE-to-ASE Installation
I am using all ASE's in my SQLRemote setup. My current installation consists of a Consolidated ASE & 2 Remote ASE's. My attempt to add another Remote ASE to the existing installation consists of these steps: - Install the sqlremote system objects in the new Remote - Install the stable queues in the new Remote - Manually extract a bcp file of the shared table from the Cons server - Configure the Cons server for another subscriber - Configure the new Remote's shared table, publications, & subscriptions. - Manually b...

BCP, sql server, and ASE
I am evaluating ASE as a replacement to SQL Server 7. I have run into some difficulties migrating data. Specifically, I cannot properly bcp out and in data. I use the SQL Server -c and -6 options as recommended by Sybase, but this fails to export the french characters from my text and varchar fields, and instead replaces them with invalid chars that cause the bcp in to fail. Has anyone run into this before? In article <3fbbadf4.1b68.1681692777@sybase.com>, Jason Thompson wrote: > I am evaluating ASE as a replacement to SQL Server 7. I have > run into some difficulties mi...

bcp in ASE 12.0
--------------1B62BDA8DB37537D4DCEF025 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit We are using ASE 12.0 in an NT environment and when I try to run the bcp command I get an error that has something to do with "CTLIB Error L#/.#/?#/U#. I don't remember all the letter and number combinations. I do remember that it mentions something about ct_connect(). I've been able to work around it by linking the Sybase table into an Access database and import the records. Not the most efficient way but at least it works. I'm new to Sybase so an...

General Cross Browser Question
For an international project i would like to use Ajax ASP.Net. Mainly the UpdatePanel Control en ProgressPanel control.But how well does Ajax ASP.Net perform on Browsers like Safari when used on an Apple computer? Are there any general known issues?Or does the entire control toolkit work without any problems at al? I have tested de UpdatePanel en Progressbar in FireFox and IE...they work very well indeed...unfortunately i don't have acces to an apple computer.So any information is usefull. Perhaps some links or articles?  Hi stonedr,This is what the asp.net site says: http://asp.n...

select into or bcp out and bcp in!
Need to copy tables from one database to another on the same server: -I have the select into bulk copy option set on the server -Volume of data is rather important; tables might have up to a million rows. I have carried out the following tests: 1: BCP: - Bcped out the data from sending table - Created the table on the target database - Bcped in the data into the table on target database. 2: select into - Copied the table from sending database to target database using Select * into db2..tb1 from db1..tb1 The second solution for a table containing 300,000 rows is practically ...

Web resources about - BCP cross-plataforms - sybase.ase.general

Television - Markets - AngelList
AngelList is a platform for startups

Resources last updated: 1/20/2016 5:32:24 AM