August 21, 2007 at 9:02 am
Is there an upper limtit to an identity field? If so, is there a way around it?
Thanks,
CY
August 21, 2007 at 9:07 am
It is limited by the upper limit of the datatype used. So the solution is to change the datatype, r even better, choose the correct one from the get go.
August 21, 2007 at 9:14 am
Our web guy is using an int...and was just wondering if down the line he might encounter problems.
Thanks
August 21, 2007 at 9:16 am
Starting from 1, that's over 2 Billion rows inserted. If you expect way more than that, then I'd suggest using bigint.
August 21, 2007 at 9:46 am
I've run out of INTs in some situations. Like SMS, constant scan type of stuff.
Eventually it's an issue. BigINT gives you more space. If you run out, need to move to GUIDs, varchar, etc.
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
August 21, 2007 at 9:59 am
Thanks for the input...it's nice to prepare for disasters
Marty
August 21, 2007 at 10:22 am
Run out of bigint???
Any case scenario you can present?
August 21, 2007 at 11:16 am
In the case you do run out of ints, moving to bigint would require you to rebuild the table. Generally this would involve creating a temp table, moving the data while switching identity insert on, setting the new identity seed, deleting the old table, renaming the new one, while taking care of the dependent objects. Not too much though, but a bit more than just altering a table column. Careful planning can however save this future headache.
Regards,
Andras
August 21, 2007 at 3:54 pm
Heh! Yeah, I'd like to see that, as well
--Jeff Moden
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply