How to generate scripts in the order of object dependency?
From Toad menu, go to:
Database -> Export -> Generate Schema Script, on the "Script Options" tab, select "Sort for Creation". The script will then be ordered by referential integrity so that it will succeed during the run.
Note: This Toad option is only available in the commercial version of Toad with the optional Quest DBA Module.