| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Hi I have an identity column in a table. the values were auto-incrementing. However I noticed a gap and found out that this gap occured when the server restarted. So, a recycling of the server can cause this? how to avoid this? thanks |
|
#2
|
| Identity gaps are well documented in both Sybase documentation http://infocenter.sybase.com/help/to...g/sqlug313.htm and also at Rob's site: http://www.sypron.nl/idgaps.html > Hi > > I have an identity column in a table. > > the values were auto-incrementing. However I noticed a gap > and found out that this gap occured when the server > restarted. > > So, a recycling of the server can cause this? > how to avoid this? > > thanks |
|
#3
|
| You can avoid it by setting the identity_gap attribute for the table to 1 sp_chgattribute "table_name", "identity_gap", set_number Note that the smaller the identity gap, the more of a performance impact there is. Set to 1, ASE has to flush a write to the object's OAM page for every insert. -bret Sherlock, Kevin wrote: > Identity gaps are well documented in both Sybase documentation > http://infocenter.sybase.com/help/to...g/sqlug313.htm > > and also at Rob's site: http://www.sypron.nl/idgaps.html > > > >> Hi >> >> I have an identity column in a table. >> >> the values were auto-incrementing. However I noticed a gap >> and found out that this gap occured when the server >> restarted. >> >> So, a recycling of the server can cause this? >> how to avoid this? >> >> thanks > > |
|
#4
|
| > Hi > > I have an identity column in a table. > > the values were auto-incrementing. However I noticed a gap > and found out that this gap occured when the server > restarted. > > So, a recycling of the server can cause this? > how to avoid this? A clean reboot, no. A sudden shutdown, like for a power cut, yes. |
![]() |
| Thread Tools | |
| Display Modes | |