Sql error 2601

Posted on 2004-11-12
Last Modified: 2008-01-09
I am in the process of completing a upgrade of a database in Sql 2000. This upgrade is for an application named Maximo. I have completed the database upgrade procedure according to the manual supplied by Maximo. There is a final step after the upgrade to check the database for integrity. A utility is supplied to excute this integrity check plus insert some information in some of the tables in the database. I am receiving this error during the integrity check process:

11-12-04 7:45:08]
     SQL(2) Insert Into maxsysindexes (name, tbname, uniquerule, clusterrule, changed, storagepartition)
 Values (:sName, :sTbName, :sUniqueRule, :sClustered, 'N', :sSegment)

[11-12-04 7:45:08]
SQL ERROR: #20030

[11-12-04 7:45:08]
Microsoft SQL Server:2601[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'maxsysindexes' with unique index 'MAXSYSINDEX_NDX1'.Microsoft SQL Server:3621

[11-12-04 7:45:14]
ERROR [002E]: An error occurred in RefreshMAXIMOIndexTables().

This is the output from sp_helpindex 'maxsysindexes'

MAXSYSINDEX_NDX1   clustered, unique located on PRIMARY
MAXSYSINDEX_NDX2   nonclustered located on PRIMARY

After some research I think I need to run (drop existing index), then run the integrity check, then restore the indexes. I am a novice to Sql so I do not now how to complete this process if it is correct. Also could it be possible that this is a case sensitive issue? (collation name: Latin1_General_Bin).
Question by:zhoward
    1 Comment
    LVL 6

    Accepted Solution

    This is definatly not a case of case sensitive. Big NO here.

    It is trying to insert a second copy of something into an index that require everything be unique.  

    "Driver][SQL Server]Cannot insert duplicate key row in object 'maxsysindexes' "

    'maxsysindexes' is a table, and the index unique index is 'MAXSYSINDEX_NDX1'

    My bet that the integrety check failed the first time and it did not roll back.  So now you already have the row in the table 'maxsysindexes'  and it is trying to insert a duplicate.

    Call tech support for Maximo and ask them what to do, since this is thier process that is trying to insert a duplicate record.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This is my first ever Article on EE or elsewhere; therefore, please bear with me if I have some discrepancies in my writing. I read many articles and questions related to "how to pass values to SSIS packages at run-time?"  Hence, this common ques…
    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

    761 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

    7 Experts available now in Live!

    Get 1:1 Help Now