troubleshooting Question

T-SQL Cleanup script

Avatar of Easwaran Paramasivam
Easwaran ParamasivamFlag for India asked on
Microsoft SQL Server 2005Microsoft SQL Server 2008
7 Comments1 Solution449 ViewsLast Modified:
I'm looking for script which deletes ALL the Schemas, Keys (Forgine keys), Constraints, Tables, Views, Triggers and so on. Finally I would like to achieve the database same as Newly created. I dont have permission to drop existing database and create new database.

Hence I no need to check EXIST of an object, If exist DELETE kind of operation for each of my object.

Please help me out.

Thanks.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros