title: SQL Completely Empty Database
body: <p>I am writing an install script that installs all tables, stored procedures, views, full text indexs, users ect.</p>
  
  <p>It all works fine if the user has all the correct permissions and the script runs from start to finish. However if the script dies somewhere midway through then it cannot just be run again.</p>
  
  <p>To accomplish this I want to basically return the database to a "brand new" state where it has nothing.</p>
  
  <p>I realize how to drop each table/sp/view.. on their own but I am looking for a more general way to reset the database.</p>
  
  <p>I also need to be able to delete Fulltext Catalogs and users.</p>
  
  <p>Thanks for any help.</p>
  
  <p><em>Running SQL Server 2005</em></p>