hi,
I am maintaining around 180 tables, out of these-125 have identity values
I need set new SEED value and new increment values for these 125 tables
Is there any easier way to do this?
Thanks,
Soura
you can do something like this
SELECT 'DBCC CHECKIDENT ('+TABLE_NAME +',RESEED , 50 )'
FROM INFORMATION_SCHEMA.TABLES
WHERE IDENT_INCR(TABLE_NAME) IS NOT NULL
This will reseed the next identity value to 50.
I'm not sure how to change the increment.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:352CE298-4960-43AB-8C9B-A098FF4CAB6F@.microsoft.com...
> hi,
> I am maintaining around 180 tables, out of these-125 have identity
values
> I need set new SEED value and new increment values for these 125 tables
> Is there any easier way to do this?
> Thanks,
> Soura
Wednesday, March 21, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment