sybase11.9.2 bcp error on linux using system("bcp...")

sybase11.9.2 bcp error on linux using system("bcp...")

Post by dhli » Thu, 06 Jul 2000 04:00:00



On linux command line, bcp is ok.

Quote:> bcp ndb..mytable in /tmp/nw.txt -c -t  '='  -Uuser -Ppassword

Starting copy...
1000 rows sent to SQL Server.

1006 rows copied.
Clock Time (ms.): total = 1000  Avg = 0 (1006.00 rows per sec.)

but failed inside perl progarm when using

system("bcp ndb..mytable in /tmp/nw.txt -c -t  '='  -Uuser
-Ppassword").  Here is the message:

bcp ndb..mytable in /tmp/nw.txt -c -t '='  -Uuser -Ppassword

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

Any idea would be very much appreciated.

David

 
 
 

sybase11.9.2 bcp error on linux using system("bcp...")

Post by Frank Voete » Thu, 20 Jul 2000 04:00:00


Hi,

if you don't have blobs in your database you should try to skip the '-t' flag. Otherwise you should try to create a format file.

Frank

  On linux command line, bcp is ok.
  > bcp ndb..mytable in /tmp/nw.txt -c -t  '='  -Uuser -Ppassword

  Starting copy...
  1000 rows sent to SQL Server.

  1006 rows copied.
  Clock Time (ms.): total = 1000  Avg = 0 (1006.00 rows per sec.)

  but failed inside perl progarm when using

  system("bcp ndb..mytable in /tmp/nw.txt -c -t  '='  -Uuser -Ppassword").  Here is the message:

  bcp ndb..mytable in /tmp/nw.txt -c -t '='  -Uuser -Ppassword

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

  Any idea would be very much appreciated.

  David

 
 
 

1. "function sequence error" with BCP

I am using BCP's (EXE dated 8/6/2000) 'queryout' keyword to dump the
result set of a stored procedure to a TXT file.  Getting a "function
sequence error" back.  The stored proc runs fine on its own in Query
Analyzer.  My cmd line:

bcp "execute mydbname..myprocname" queryout mainframe.txt -S myservername
-U myid -P mypw -e mainframe.err -c -t"\t"

Any ideas?  Thanks much.

error: SQL State = S1010

2. Encarta Class Server database connection

3. "master..xp_cmdshell" and BCP ODBC error

4. Like ,#, digits in SQL server

5. sa CAN "xp_cmdshell bcp blabla", other users cannot

6. mysql Driver loading problem

7. BCP "HOW-TO"?

8. What datatype to use for Access memo fields?

9. BCP - text qualifiers ""

10. problem with the command "bcp"

11. BCP lockup with multiple "text" columns

12. "bcp" question

13. bcp text file with "" identifiers