Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Msg 2601, Level 14, State 6 : Attempt to insert duplicate key row in object XXX with unique index XXX

3 posts in General Discussion Last posting was on 2011-09-13 18:53:32.0Z
benhamma Posted on 2011-09-13 13:41:19.0Z
From: "benhamma" <sbenhamma@yahoo.fr>
Newsgroups: sybase.public.ase.general
Subject: Msg 2601, Level 14, State 6 : Attempt to insert duplicate key row in object XXX with unique index XXX
X-Newsreader: newsgroupstats.hk
X-HTTP-Posting-Host: 81.252.61.37
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e6f5d7f@forums-1-dub>
Date: 13 Sep 2011 06:41:19 -0700
X-Trace: forums-1-dub 1315921279 10.22.241.152 (13 Sep 2011 06:41:19 -0700)
X-Original-Trace: 13 Sep 2011 06:41:19 -0700, vip152.sybase.com
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30533
Article PK: 72711

Hello,

This is my request :
1> insert into tbtp_phase_doss values(19,41453,getdate(),null,'mai',null,getdate(),'mar')
Msg 2601, Level 14, State 6:
Server 'SYB_XXXXX', Line 1:
Attempt to insert duplicate key row in object 'xxxxx' with unique index 'xxxxxxx' Command has been aborted.
(0 rows affected)


But the row does not exist is the table ! What is this trouble ?

1> select * from XXX where id_etat_doss=19 and id_exten_ver=41453
2>
3> go
id_etat_doss id_exten_ver date_deb date_fin nom_deb nom_fin date_maj_enreg nom_user
------------ ------------ -------------------------- -------------------------- ------------------------------ ------------------------------ -------------------------- ------------------------------

Why can i insert this row ?

--
Android Usenet Reader
http://android.newsgroupstats.hk

Free News Reader
http://put.hk
http://put.hk/reader/forums.sybase.com/sybase.public.ase.general.html


Luc Van der Veurst Posted on 2011-09-13 14:11:29.0Z
From: "Luc Van der Veurst" <dba_azvub@hotmail.com>
Newsgroups: sybase.public.ase.general
References: <4e6f5d7f@forums-1-dub>
Subject: Re: Msg 2601, Level 14, State 6 : Attempt to insert duplicate key row in object XXX with unique index XXX
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-Forwarded: by - (DeleGate/5.8.7)
X-Forwarded: by - (DeleGate/5.8.7)
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e6f6491$1@forums-1-dub>
Date: 13 Sep 2011 07:11:29 -0700
X-Trace: forums-1-dub 1315923089 10.22.241.152 (13 Sep 2011 07:11:29 -0700)
X-Original-Trace: 13 Sep 2011 07:11:29 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30534
Article PK: 72712

Hello,

Is index 'xxxxxxx' really a unique index on (id_etat_doss, id_exten_ver) ?

If not, your query to verify the existance of a row which already contains
the index data,
is wrong. If that doesn't help, then please post the output of :

sp_help tbtp_phase_doss


Luc.

"benhamma" <sbenhamma@yahoo.fr> wrote in message
news:4e6f5d7f@forums-1-dub...
> Hello,
>
> This is my request :
> 1> insert into tbtp_phase_doss
> values(19,41453,getdate(),null,'mai',null,getdate(),'mar')
> Msg 2601, Level 14, State 6:
> Server 'SYB_XXXXX', Line 1:
> Attempt to insert duplicate key row in object 'xxxxx' with unique index
> 'xxxxxxx' Command has been aborted.
> (0 rows affected)
>
>
> But the row does not exist is the table ! What is this trouble ?
>
> 1> select * from XXX where id_etat_doss=19 and id_exten_ver=41453
> 2>
> 3> go
> id_etat_doss id_exten_ver date_deb date_fin
> nom_deb nom_fin
> date_maj_enreg nom_user
> ------------ ------------ -------------------------- --------------------------
> ------------------------------ ------------------------------ --------------------------
> ------------------------------
>
> Why can i insert this row ?
>
> --
> Android Usenet Reader
> http://android.newsgroupstats.hk
>
> Free News Reader
> http://put.hk
> http://put.hk/reader/forums.sybase.com/sybase.public.ase.general.html
>
>
>


Bret Halford Posted on 2011-09-13 18:53:32.0Z
From: Bret Halford <bret@sybase.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Msg 2601, Level 14, State 6 : Attempt to insert duplicate key row in object XXX with unique index XXX
References: <4e6f5d7f@forums-1-dub> <4e6f6491$1@forums-1-dub>
In-Reply-To: <4e6f6491$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e6fa6ac$1@forums-1-dub>
Date: 13 Sep 2011 11:53:32 -0700
X-Trace: forums-1-dub 1315940012 10.22.241.152 (13 Sep 2011 11:53:32 -0700)
X-Original-Trace: 13 Sep 2011 11:53:32 -0700, vip152.sybase.com
Lines: 62
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30535
Article PK: 72713

Also run DBCC CHECKTABLE on this table.
A corrupt index could result in this error.

-bret

On 9/13/2011 8:11 AM, Luc Van der Veurst wrote:
> Hello,
>
> Is index 'xxxxxxx' really a unique index on (id_etat_doss, id_exten_ver) ?
>
> If not, your query to verify the existance of a row which already contains
> the index data,
> is wrong. If that doesn't help, then please post the output of :
>
> sp_help tbtp_phase_doss
>
>
> Luc.
>
>
> "benhamma"<sbenhamma@yahoo.fr> wrote in message
> news:4e6f5d7f@forums-1-dub...
>> Hello,
>>
>> This is my request :
>> 1> insert into tbtp_phase_doss
>> values(19,41453,getdate(),null,'mai',null,getdate(),'mar')
>> Msg 2601, Level 14, State 6:
>> Server 'SYB_XXXXX', Line 1:
>> Attempt to insert duplicate key row in object 'xxxxx' with unique index
>> 'xxxxxxx' Command has been aborted.
>> (0 rows affected)
>>
>>
>> But the row does not exist is the table ! What is this trouble ?
>>
>> 1> select * from XXX where id_etat_doss=19 and id_exten_ver=41453
>> 2>
>> 3> go
>> id_etat_doss id_exten_ver date_deb date_fin
>> nom_deb nom_fin
>> date_maj_enreg nom_user
>> ------------ ------------ -------------------------- --------------------------
>> ------------------------------ ------------------------------ --------------------------
>> ------------------------------
>>
>> Why can i insert this row ?
>>
>> --
>> Android Usenet Reader
>> http://android.newsgroupstats.hk
>>
>> Free News Reader
>> http://put.hk
>> http://put.hk/reader/forums.sybase.com/sybase.public.ase.general.html
>>
>>
>>
>
>