dbTalk Databases Forums  

bcp hanging on empty input file

comp.databases.sybase comp.databases.sybase


Discuss bcp hanging on empty input file in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mark
 
Posts: n/a

Default bcp hanging on empty input file - 04-28-2004 , 03:53 PM






how can i prevent my bcp command from hanging when i have an empty
input file?

bcp %mgDATABASE%..tblMG_IntCR_Edit in dat\fmg775c.dat
-fbcpintediti.fmt -ebcpINTCi.err -U%mgDBUserBCP% -P%mgDBPwdBCP%
-S%mgDBServer% -r\n

where dat\fmg775c.dat is 0 bytes.

thanks, mark

Reply With Quote
  #2  
Old   
Willie Kraatz
 
Posts: n/a

Default Re: bcp hanging on empty input file - 04-29-2004 , 08:45 AM






What release of bcp and sybase are you using.

Does the bcp work with when there is data in the file?

I had no problems with 3 different releases of bcp and 3 different versions
of sybase. they all gave a similar response.
(sybase)$ bcp pubs2..authors in x -Usa -Pxxxxx -f x.fmt -r\n -SSERVERA

Starting copy...

0 rows copied.

Clock Time (ms.): total = 9


bcp/10.0.3/P/rs6000/AIX 3.2.5/4.1/1/Wed Nov 22 12:42:52 PST 1995

Sybase CTBCP Utility/11.1.1/P-EBF10537/DRV.11.1.1.1/rs6000/AIX
4.1.4/BUILD1111-026/OPT/Wed Aug 28 13:35:13 2002

Sybase CTBCP Utility/12.5/P-EBF10883 ESD#9/DRV.12.5.0.6/RS6000/AIX
4.3.3/BUILD125-026/OPT/Sun Jan 12 10:12:13 2003

"mark" <spiesmk (AT) verizon (DOT) net> wrote

Quote:
how can i prevent my bcp command from hanging when i have an empty
input file?

bcp %mgDATABASE%..tblMG_IntCR_Edit in dat\fmg775c.dat
-fbcpintediti.fmt -ebcpINTCi.err -U%mgDBUserBCP% -P%mgDBPwdBCP%
-S%mgDBServer% -r\n

where dat\fmg775c.dat is 0 bytes.

thanks, mark



Reply With Quote
  #3  
Old   
Neal
 
Posts: n/a

Default Re: bcp hanging on empty input file - 04-29-2004 , 09:18 AM



Hello,

I think this may be a bug in older versions of bcp that
has been fixed. If you do a "bcp -v", what version does it report?

Newer versions of bcp are available at:
http://downloads.sybase.com

Download the latest EBF from the "Software Developer's Kit".

Reply With Quote
  #4  
Old   
Don Million
 
Posts: n/a

Default Re: bcp hanging on empty input file - 04-29-2004 , 11:49 AM



I just tried it and it worked fine for me. Of course, it came back
with "0 rows copied."

What version are you running?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.