Rebuilding an entire Microsoft SQL Server Database
Use SSMS to generate scripts for the entire database DDL.



Use the script to create a new, empty database.

Use BCP to export the data from all tables.  Use BCP to import that data into the new database.

MAKE SURE YOU BACKUP THE ORIGINAL DATABASE before DROPing it (if you in fact intend to drop it at all).  MAKE SURE YOU TEST RESTORE THE BACKUP.