SQL Script for identify if a table has foreign keys and how to disable-enable them
Posted on 2011-09-23
We have to do change all our tables Master ID codes for security purpose. We have a lot of tables and just finished all the scripts necessary for the change.
We were told that we have to first disable any foreign keys between the tables, then do the actual ID change and finally enable the foreign keys again.
1. Since we have a lot of tables, is there a script we can use to know what tables
have foreign keys?
2. Is there a way via script to disable/enable foreign keys?
3. Finally, based on EE experiences on this type of task at hand, any other consideration
prior performing this task?
Thank you very much!