Gurus
I have a small database which has sever identity gap problems. I have read many articles about fixing the problem. Since I don't have sa right, so most of the scripts I can not use. This is what I proposed to do. Giving a identity column in table A, drop all the indexes, constraints and triggers in table A, also drop its FK table's trigger (if any), so when I do updates, the triggers will not fire. I am thinking about store the indexes, constraints and trigger information in temp tables, after I drop them and fix the identity values, create them back to the database sequentially. Do you agree with my approach? do you have any scripts(stored procedures, no perl, c scripts please) that can share with me regarding generate codes for recreation for indexes, constraints and triggers for a table (entire database maybe)? Thanks in advance.
Kevin
I have a small database which has sever identity gap problems. I have read many articles about fixing the problem. Since I don't have sa right, so most of the scripts I can not use. This is what I proposed to do. Giving a identity column in table A, drop all the indexes, constraints and triggers in table A, also drop its FK table's trigger (if any), so when I do updates, the triggers will not fire. I am thinking about store the indexes, constraints and trigger information in temp tables, after I drop them and fix the identity values, create them back to the database sequentially. Do you agree with my approach? do you have any scripts(stored procedures, no perl, c scripts please) that can share with me regarding generate codes for recreation for indexes, constraints and triggers for a table (entire database maybe)? Thanks in advance.
Kevin