Can't create Primary Key???

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rob (Rob_at_discussions.microsoft.com)
Date: 12/29/04


Date: Wed, 29 Dec 2004 11:51:03 -0800

Hi Guy's

I've migrated an access DB of ours over to SQL 2000 and when I try to set
the primary key I get the error below. I've checked for and deleted all of
the other indexes so i'm not sure why it says a duplicate was found. I have
some other tables in the Database which I was able to set a primary key on
but this table chokes each time. Help I'm stuck!

'Master' table
- Unable to create index 'PK_Master'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]CREATE UNIQUE
INDEX terminated because a duplicate key was found for index ID 1. Most
significant primary key is 'type 6c, len 9'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint.
See previous errors.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been
terminated.

-- 
Rob
IT guy!


Relevant Pages

  • Delete rec in detail table
    ... I have a master details form... ... with sql 7... ... be able to put duplicates rec... ... table primary key is not the field I have in my delete sql, ...
    (borland.public.delphi.database.ado)
  • Re: violation of unique constraint in distribution database
    ... What is the exact error message you are getting? ... "Violation of PRIMARY KEY ... duplicate key in object '#2E0AB83D'." ... we are getting violation of unique constraint in distribution database. ...
    (microsoft.public.sqlserver.replication)
  • Re: extract right 3 digits into existing field.
    ... original table I get a "Cannot perform a cascading operation. ... in a duplicate key in table." ... I'm trying to change the Primary Key - maybe I should've noted that ... I do not reply to personal e-mail ...
    (microsoft.public.access.queries)
  • Re: Mysterious error: "Uniqueness of index...is violated"
    ... Keep an eye on the product lifecycle for Visual FoxPro here: ... >and I am not changing the primary key in that table. ... >the primary key, SessionID, or create a new record with a duplicate key? ...
    (microsoft.public.fox.vfp.forms)
  • PK violation error during replication
    ... Violation of PRIMARY KEY ... constraint 'PK__@snapshot_seqnos__66DE2538'. ... duplicate key in object '#65EA00FF'. ...
    (microsoft.public.sqlserver.server)