January 2, 2014 at 10:32 pm
Comments posted to this topic are about the item DBCC CHECKIDENT
Microsoft Certified Master: SQL Server 2008
MVP - Data Platform (2013 - ...)
my blog: http://www.sqlmaster.de (german only!)
January 3, 2014 at 12:49 am
Surely the first reseed statement fails because of the use of 'RESEED' as a quoted string and not a keyword? The second reseed statement demonstrates its correct use.
Regards, Jon Summers
January 3, 2014 at 1:37 am
This looks very similar to the question about a week ago... So a nice easy way to end a friday. 🙂
January 3, 2014 at 1:53 am
Jon Summers (1/3/2014)
Surely the first reseed statement fails because of the use of 'RESEED' as a quoted string and not a keyword?
No, either is allowed. Try it and see!
January 3, 2014 at 3:51 am
nice and easy, thanks for sharing
January 3, 2014 at 6:27 am
I figured a half-hour of research on this question was more than enough. I accept my fail. At least I didn't cheat! 😀
And since I've never reset an identity value in 20 years, I feel okay not knowing this. 😉
ron
-----
a haiku...
NULL is not zero
NULL is not an empty string
NULL is the unknown
January 3, 2014 at 6:45 am
Michael Riemer (1/3/2014)
This looks very similar to the question about a week ago... So a nice easy way to end a friday. 🙂
+1 BTW, as written the code given should error. Wouldn't it be better to add an IF EXISTS ... to the first statement?
{fixed typo}
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
January 3, 2014 at 6:47 am
ronmoses (1/3/2014)
I figured a half-hour of research on this question was more than enough. I accept my fail. At least I didn't cheat! 😀And since I've never reset an identity value in 20 years, I feel okay not knowing this. 😉
ron
I don't recall doing it for anything other than development, or for a permanent temp table used for, say, importing EDI transactions, etc.
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
January 3, 2014 at 8:29 am
Michael Riemer (1/3/2014)
This looks very similar to the question about a week ago... So a nice easy way to end a friday. 🙂
Unfortunately - yes 🙁
I saw the mentioned QOTD after I had sent my question app. 1 week before!
I would have expected that my question would not be posted short after the first one 🙂
Happy new year to all...
Microsoft Certified Master: SQL Server 2008
MVP - Data Platform (2013 - ...)
my blog: http://www.sqlmaster.de (german only!)
January 3, 2014 at 11:11 am
Thanks for an easy one, Uwe!
January 3, 2014 at 11:21 am
I have only ever used the reseed option in dev. However, I had used it recently enough to get this one right! 😀 Thanks for the question Uwe.
January 5, 2014 at 4:00 am
That`s similar to the previous CHECKIDENT question last week, but any way nice question.
Thanks.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
January 5, 2014 at 7:18 pm
easy as -- answered about a week ago
Hope this helps...
Ford Fairlane
Rock and Roll Detective
January 6, 2014 at 3:28 am
Nice question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 7, 2014 at 7:09 pm
ronmoses (1/3/2014)
And since I've never reset an identity value in 20 years, I feel okay not knowing this. 😉ron
Since transactional replication worked in standard edition of SQL 2000 while log shipping and other cleverer backup methods didn't (so implied increased licence costs for enterprise edition) and MS agreed with the interpretation of licensing terms that I didn't have to pay a SQL Server licence fee for the replica (because it was a standby copy) I used replication to provide a recovery copy. Testing recovery required resetting identity values, since the identity property had to be marked "not for replication", so I did a lot of resets for that purpose. I also did some for real when hardware problems entailed disaster recovery and forced it on me. So I made very sure that I and anyone else who might find themselves looking after recovery knew how identity reset worked.
I guess, Ron, that either you were in a situation where money was easier so you could use other recovery methods, or you didn't have contractual very short term recovery times.
Tom
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply