5 pts.
 Re-applying column constraints
I have a 100+ db that was hacked. The column level constraints/defaults were removed. I'd like to know how I can reapply the constraints/defaults while keeping the data intact. I do have an identical database with no data in it.

Software/Hardware used:
ASKED: September 23, 2008  1:26 PM
UPDATED: September 26, 2008  3:12 PM

Answer Wiki:
If the database was hacked, it is also possible that the data had been altered, but if you have confirmed this didn't happen, reapplying the constraints should be no problem, because all of the data stored in the db was checked/validated by the constraints when it was entered/updated, so I think the only thing that could pose a problem would be having a tool/script that lets you export/generate the constraint creation scripts from your other database. I don't know if such a thing exists for SQL Server, but I hope someone else can help with this.
Last Wiki Answer Submitted:  September 26, 2008  3:12 pm  by  carlosdl   63,580 pts.
All Answer Wiki Contributors:  carlosdl   63,580 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _