Click here to Skip to main content
12,072,403 members (60,763 online)
Click here to Skip to main content
Articles » Database » Database » General » Downloads

Stats

2.9K views
3 bookmarked
Posted

How to empty SQL Server 2005 database using cursor & sys.objects (Deleting All Tables, stored procedures, views & UDF’s)

, 30 Sep 2011 CPOL
1) You cann't drop any object in schemas other than dbo, so you MUST use sys.schemas system view properly.2) You cann't drop tables even in dbo schema if they are referenced by other ones, not dropped so far. Drop all FKs before tables.dva
No downloads associated with this content

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

VDmitrovsky
Russian Federation Russian Federation
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.160208.1 | Last Updated 30 Sep 2011
Article Copyright 2010 by VDmitrovsky
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid