March 15, 2011 at 6:15 am
I had created a sp which is creating a non unique value for n concuurent user using this table.Might be concurrency issue what it might be.
March 15, 2011 at 6:30 am
I'd have to see the code before I could even begin to help on this. Can you post the table definition ("create script") and the code for the procedure?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 15, 2011 at 7:10 am
Are you doing anything at all to the identity column as part of your insert processes? I only ask because, while I've seen issues around identity, not generating a unique value is an extremely uncommon.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 15, 2011 at 7:47 am
i suspect that instead of using a column with the identity() property, he's using a stored procedure to generate a sequence , and using the results of that stored proc to insert into his pseudo-identity column; and as a result he's getting duplicates;
Lowell
March 15, 2011 at 8:29 am
that makes sense. I've heard of getting dupes in identity, but i think it was a one-off bug or something. Certainly nothing standard.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 16, 2011 at 6:26 am
kotnala_manish (3/15/2011)
I had created a sp which is creating a non unique value for n concuurent user using this table.Might be concurrency issue what it might be.
If you were to post the code for the part of the sp that does that, I can show you how to fix it.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 16, 2011 at 12:29 pm
Just a thought. Identity_Insert could be set ON for that table and data coming from elsewhere is forcing duplicate values in.
Or someone might have reseeded the table.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply