• The only thing I ever saw was a "best guess" script. It was matching the tables by finding columns with the same name and IIRC data types.

    Now that will only work if the schema is perfectly named based on a business rule. However since the FKs are not created then you'll most likely find that you are out of luck in the department.

    What I'd do is start a trace and read the object definitions of all the views / table functions and sps, etc.

    Pick out the joins one at a time and start scripting the fks in a test db.

    Any way you approach this, this is a monumental task for a system with 100 tables. Better set aside a few weeks to do this (I've never done that without having to clean the data, ddl design and code, hence MONUMENTAL task).