identity column in a table

This is a discussion on identity column in a table within the sybase forums in Other Databases category; 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...

Go Back   Database Forum > Other Databases > sybase

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-21-2008, 11:42 AM
Default identity column in a table

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
Reply With Quote
  #2  
Old 08-21-2008, 11:59 AM
Default Re: identity column in a table

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


wrote in message news:48ad7ecd.ab4.1681692777-at-sybase.com...
> 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



Reply With Quote
  #3  
Old 08-21-2008, 01:16 PM
Default Re: identity column in a table

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
>
>
> wrote in message news:48ad7ecd.ab4.1681692777-at-sybase.com...
>> 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

>
>

Reply With Quote
  #4  
Old 08-26-2008, 04:45 AM
Default Re: identity column in a table

wrote in message news:48ad7ecd.ab4.1681692777-at-sybase.com...
> 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.


Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 08:14 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.