I want to use the schema of my prototype database to be the starting point of many new databases that may develop independently of the original over time. Unfortunately when creating this database I saved the SQL Script for each object in a separate file, so I don't know what order I would need to execute them in order for the dependencies to work out right. The Generate Sql Script command doesn't seem to pay any attention to that either. Is there a relatively painless way to copy, or script the creation of, a database with all of the objects and constraints and whatnot in tact?
The best way is to detach the database and then simply copy the .mdf and .ldf files and reattach the new ones. If your database cannot be freed for detaching I find the best way is to use a script with a series of select into statements that write all data and tables into a new db (use the system tables to get your full list). Then script out all constraints, keys, triggers etc and impose this on the new db - it should work without a hassle, although if you are using EM to create this script you have to take out the lines that re-create the actual tables manually or you lose all your data.