Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

Need help -- strange issue with ' data with cluster index'

$
0
0

Note : Same SQL working fine in all other servers of same version but on one server it is failing with following error ..

 

Version :  Adaptive Server Enterprise/15.5/EBF 19396 SMP ESD#5/P/RS6000/AIX 5.3/asear155/2568/64-bit/FBO/Thu Dec  8 23:37:47 2011

 

 

Error :

Attempt to insert duplicate row in database 'tempdbsa' (10), object '#CP200032320009377848' (1550631818), index '<Unknown>' (0), partition '#Idx1CP2_1550631818' (1550631818). Could drop and recreate index with ignore duprow or allow duprow.

Command has been aborted.

(0 rows affected)

 

How to reproduce ..

 

1) create table ..

 

CREATE table #CP2

(  cmdtyProdId    int         NULL

  ,cmdtyProdGrpId int         NULL

  ,cmdtyProdGrpCd varchar(80) NULL

  ,hedgeDate      datetime    NULL

)

 

2) Create index     

 

CREATE CLUSTERED INDEX #Idx1CP2 ON #CP2(hedgeDate,cmdtyProdId)

 

3) Insert data .. two record with key value

 

insert into #CP2 (hedgeDate,cmdtyProdId,cmdtyProdGrpCd,cmdtyProdGrpId)

values('06/09/2016',1,'abc',1)

go

insert into #CP2 (hedgeDate,cmdtyProdId,cmdtyProdGrpCd,cmdtyProdGrpId)

values('06/09/2016',1,'abc',1)

go

 

Error :

 

Msg 2615, Level 14, State 1:

Server 'DS_REPORTS', Line 1:

Attempt to insert duplicate row in database 'tempdbsa' (10), object '#CP200032320009377848' (1550631818), index '<Unknown>' (0), partition '#Idx1CP2_1550631818' (1550631818). Could drop and recreate index with ignore duprow or allow duprow.

Command has been aborted.


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>