Osolage says: When I upgraded one of my databases to MSSQL2K5 compatibility mode, I noticed that many of my insert statements on tables with identity columns started generating primary key violations. I realized that I needed to run DBCC CHECKIDENT on all of those tables to fix the problem. I found this script, which lists all of the tables, in a database, that have identity columns. Then a copy/paste and regex search/replace generated a script for me to run the DBCC CHECKIDENT for each table listed. After running the DBCC CHECKIDENT, the problem went away. |
View the Top Clips from December 12, 2007
Embed This Clip In Your Site...
|
|
|
|