Problem Importing Data To Database Using SSIS

Posted on 2011-10-04
Last Modified: 2013-11-05
I have several DTS packages that I am recreating using SSIS.  The source file is a flat file on a remote server.  The destination is into an existing database table.  This table has data in it already and I will be appending the new data to the existing data.  However, the following error occurs:

"The statement has been terminated.". An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server"  Hresult: 0x80004005  Description: "Violation of PRIMARY KEY constraint 'C1249703'. Cannot insert duplicate key in object 'CA571L'.".

Can't figure this one out.  Please advise, need to resolve this as soon as possible.  Thank you very much in advance.
Question by:Tyecom
    LVL 6

    Accepted Solution

    Are you working in a test environment with a copy of production data?  If that's the case and you're using a file that's already been processed, you're going to get a primary key violation error.

    Author Closing Comment

    Thank you for responding.  You are correct.  The data was already processed and I had to do some clean before processing them again.  Thank you very much.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
    SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now