Skip to Content.
Sympa Menu

freetds - [freetds] Unable to bcp file into MS SQL Server 2008

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Srdan Dukic <srdan.dukic AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Unable to bcp file into MS SQL Server 2008
  • Date: Fri, 29 Jan 2010 13:44:47 +1300

Hi,

We've recently upgraded from SQL Server 2005 to 2008 and have
encountered a strange error when trying to use freebcp to insert data
into a table. The table schema is identical, the only thing having
changed being the version of ms sql.

The error is:

Msg 2627, Level 14, State 1
Server 'ARCHIVESERVER', Line 1
        Violation of PRIMARY KEY constraint 'PK_log_failure'. Cannot
insert duplicate key in object 'dbo.log_failure'.
Msg 2627, Level 14
General SQL Server error: Check messages from the SQL Server

Msg 3621, Level 0, State 0
Server 'ARCHIVESERVER', Line 1
        The statement has been terminated.
10 rows copied.


The primary key field is a 'bigint', and is also an identity
specification with a seed of 1 and an increment of 1 (pretty
standard).

When I insert, the the id field I put a '0' (zero), the actual line being:

0 B7/EA-09234-2552D5B4 2010-01-25 00:00:02 3 65535
0 [Log text line here]

Where the first value is the 'id'column in question.

Has anyone had this problem before?


Thank you
--
Srđan Đukić




Archive powered by MHonArc 2.6.24.

Top of Page