Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting SEED value for a existing column

0 views
Skip to first unread message

Soura

unread,
Nov 26, 2004, 10:01:05 AM11/26/04
to
hi,

I need to set a new SEED value to an existing identity column through Query.
I used the following
DBCC CHECKIDENT (jobs, RESEED, 30)
but Enterprise Manager still shows the old SEED value.
Can u help me?

Thanks
Soura


Paul Ibison

unread,
Nov 28, 2004, 4:04:42 PM11/28/04
to
Soura,
can you explain a little more about your replication scenario, and why this
reseeding is necessary. You may have stumbled across something I have seen
once before - note that according to BOL, DBCC CHECKIDENT is not supported
for identity columns created with the NFR flag. In every case I have tried,
contrary to BOL it does indeed work, but in the early days I had a column
where it didn't work, and unfortunately I didn't document it, so further
info on your situation would be welcome. Also, please do an insert yust to
confirm that the reseeding hasn't taken place.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)


SouRa

unread,
Nov 29, 2004, 5:41:03 AM11/29/04
to
hi,
Actually, In order to avoid the insertion conflict, I set even values for
identity column
in publisher and Odd value for the Subscriber(max of that column as seed).
So I need to set SEED values for each and every identity columns through
Enterprise
Manager. For that, I am searching a easy way to set SEED (through Query).
I have used the following,

DBCC CHECKIDENT (jobs, RESEED, 30)

the seed value is changed but the Enterprise Manager still shows the old SEED
value.
For example, i checked the seed with
DBCC CHECKIDENT (jobs, NORESEED)
it shows 20 as seed and I reset the seed from 20 to 30 by Query


DBCC CHECKIDENT (jobs, RESEED, 30)

Now
DBCC CHECKIDENT (jobs, NORESEED)
returns 30 as seed but E.M still shows 20 as Seed

Thanks,
Soura

Paul Ibison

unread,
Nov 29, 2004, 6:18:27 AM11/29/04
to
When you define the identity columns you could select the
seed at this stage - for a manual algorithm like this, I
set the seed and increment in the table creation script.
However, can you do an insert just to check if the value
displayed in EM is incorrect - if so then there's no need
ot do anything.
0 new messages