Showing posts with label identity. Show all posts
Showing posts with label identity. Show all posts

Friday, March 30, 2012

Increase Identity value

How do I increase the current Identity value of an existing Identity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want to increase it to, Returns: 99999
Thanks,
http://www.aspfaq.com/5007
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:C5A7066B-D4E3-48C3-B1E2-54B7E8DC4A14@.microsoft.com...
> How do I increase the current Identity value of an existing Identity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want to increase it to, Returns: 99999
> Thanks,

Increase Identity value

How do I increase the current Identity value of an existing Identity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want to increase it to, Returns: 99999
Thanks,
http://www.aspfaq.com/2237
For more information, please see DBCC CHECKIDENT in Books Online.
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:4BE94FEA-4CCF-4EA1-AE9E-F5A5B8057EAC@.microsoft.com...
> How do I increase the current Identity value of an existing Identity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want to increase it to, Returns: 99999
> Thanks,
>

Increase Identity value

How do I increase the current Identity value of an existing Identity column?
SELECT IDENT_CURRENT('Quote')
Returns: 16332
I want to increase it to, Returns: 99999
Thanks,http://www.aspfaq.com/2237
For more information, please see DBCC CHECKIDENT in Books Online.
http://www.aspfaq.com/
(Reverse address to reply.)
"KenL" <KenL@.discussions.microsoft.com> wrote in message
news:4BE94FEA-4CCF-4EA1-AE9E-F5A5B8057EAC@.microsoft.com...
> How do I increase the current Identity value of an existing Identity
column?
> SELECT IDENT_CURRENT('Quote')
> Returns: 16332
> I want to increase it to, Returns: 99999
> Thanks,
>

Monday, March 19, 2012

Incorrect Identity Range

I'm trying to replicate a contacts table that has about
80000 records in it. When I set an identity range of 1000
but when the publication is created it keeps setting the
next identity range to start at 49000. This creates an
error that means that data cannot be entered either at the
publishing end or the subscribing end.
I did previously have this table replicating to two
subscribers and this is when the error first occurred. I
removed the subscriptions and then the publication and
tried to clean up any meta data that may have remained. I
then redid the publication but had the same problem.
is the datatype for the identity column int or smallint, or something else
altogether?
What happens if you script out your publication and make the changes to the
underlying script and deploy it?
Also do the underlying tables have any check constraints remaining on them
for the identity column? These are not removed when you recreate a nosync
subscription.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Mburns" <anonymous@.discussions.microsoft.com> wrote in message
news:814f01c484dc$23bfcb20$a401280a@.phx.gbl...
> I'm trying to replicate a contacts table that has about
> 80000 records in it. When I set an identity range of 1000
> but when the publication is created it keeps setting the
> next identity range to start at 49000. This creates an
> error that means that data cannot be entered either at the
> publishing end or the subscribing end.
> I did previously have this table replicating to two
> subscribers and this is when the error first occurred. I
> removed the subscriptions and then the publication and
> tried to clean up any meta data that may have remained. I
> then redid the publication but had the same problem.
|||Thanks for your reply Hilary. My answers to your questions:
The datatype for the identity column is int.
I haven't tried scripting it. I did look for a script but
I couldn't see where to define the starting identity
range. Could you point me somewhere?
I couldn't find any constraints in the underlying tables.
I am replicating this table by itself (own publication) as
it is so large and replicating the other tables from this
db in a separate publication. Is this a problem?
Thanks
>--Original Message--
>is the datatype for the identity column int or smallint,
or something else
>altogether?
>What happens if you script out your publication and make
the changes to the
>underlying script and deploy it?
>Also do the underlying tables have any check constraints
remaining on them
>for the identity column? These are not removed when you
recreate a nosync
>subscription.
>--
>Hilary Cotter
>Looking for a book on SQL Server replication?
>http://www.nwsu.com/0974973602.html
>
>"Mburns" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:814f01c484dc$23bfcb20$a401280a@.phx.gbl...
1000[vbcol=seagreen]
the[vbcol=seagreen]
I
>
>.
>