Through the interface design is able to manually operate, can not achieve my batch modification thousands of servers.
Because of this a foot would have been executed in bulk.
Environment: Redgate + MSSQL 2008 R2
The following code is used as a minor modification to your business.
Copy Code code as follows:
--Allows system tables to be updated
EXEC sp_configure ' allow updates ', 1
Reconfigure with override
Go
--Suppress identity column tags
Update syscolumns Set colstat = 0 WHERE id = object_id (' tablename ') and Colstat = 1
Go
--Insert the id=8001-8003 line
--Restore identity column tags
Update syscolumns Set Colstat = 1 WHERE id = object_id (' tablename ') and name = ' identity column name '
--Reset the starting value of the identity
DBCC checkident (table name, Reseed, 10003)
--Disable updating of system tables
EXEC sp_configure ' allow updates ', 0
Reconfigure with override
There is a lot of bulk operation Knowledge,
If the index is accurate in bulk check
Is the length of the field consistent
Does the job run the same result
Whether the service starts at the same time
......
All need to be processed in batches.
Refer to my other articles for additional bulk operations.