Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Sql error 2601

Posted on 2004-11-12
3
Medium Priority
?
2,933 Views
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).
0
Comment
Question by:zhoward
1 Comment
 
LVL 6

Accepted Solution

by:
Duane Lawrence earned 2000 total points
ID: 12565461
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.

Duane
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

810 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