Requirement is that I need to clean up my database in which my application has extensively tested on, and now I will have to clean up the data and have a database which will be ready to go live. By clean up, I mean the metadata of the tables, users will stay but their data will have to cleaned. What is the fastest and the best method to go about with? Truncate? Any help would be appreciated.
Unless you have a storage snapshot, restore point or backup of the database before the testing started,
TRUNCATE is a way to go. You may need to disable FK constraints for that. Another way is to run
CONTENT=METADATA_ONLY, drop the schema, and import the metadata back.