Skip to Content.
Sympa Menu

freetds - [freetds] FreeBCP -n causes SIGSEGV, -c fails on input

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark Huber" <hubmark AT gmail.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input
  • Date: Tue, 31 Jan 2006 02:05:09 -0500

Trying to use FreeBCP to transfer data from SQL Server 2K to another SQL
Server 2K. Here's the gdb output for the core file:

Core was generated by `./freebcp starsDEV.dbo.bcptest out /tmp/foo.out -n -U
sa -P ****** -S ******'.
Program terminated with signal 11, Segmentation fault.

#0 dbcoltype (dbproc=0x0, column=0) at dblib.c:2321
2321 colinfo = resinfo->columns[column - 1];

Results in segmentation fault regardless of the table ( I tried 40+ tables,
all different structures)

"-c" switch works fine for output but input falls over at the first line for
this table structure:

Column_name Type Computed Length Prec Scale Nullable
TrimTrailingBlanks FixedLenNullInSource Collation
PortID int no 4 10 0 no (n/a) (n/a) NULL
PortName nvarchar no 100 yes (n/a)
(n/a) SQL_Latin1_General_CP1_CI_AS
PortSortOrder int no 4 10 0 yes (n/a) (n/a)
NULL
PortPM int no 4 10 0 yes (n/a) (n/a) NULL
PortType nvarchar no 20 yes (n/a)
(n/a) SQL_Latin1_General_CP1_CI_AS

The output file looks like this: (freebcp starsDEV.dbo.tblPort out
/tmp/wsotblFacilityName -c <password stuff> -t "@|@")


1@|@Carrera@|@12@|@4@|@CDO/CLO
2@|@Eagle@|@13@|@5@|@CDO/CLO
3@|@Hamilton@|@18@|@4@|@CDO/CLO

freebcp with in results in:

Msg 20050, Level 4
Attempt to convert data stopped by syntax error in source field.

Msg 20050, Level 4
Attempt to convert data stopped by syntax error in source field.

Msg 20049, Level 4
Data-conversion resulted in overflow.













Archive powered by MHonArc 2.6.24.

Top of Page