Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Easily delete database objects Expand / Collapse
Posted Friday, April 24, 2009 9:33 PM


Group: General Forum Members
Last Login: Thursday, June 4, 2015 3:59 PM
Points: 14, Visits: 370
Comments posted to this topic are about the item Easily delete database objects
Post #704372
Posted Wednesday, May 26, 2010 3:35 AM


Group: General Forum Members
Last Login: Tuesday, September 20, 2011 4:37 AM
Points: 114, Visits: 78
That's a useful SP!
To give it extra benefit you could add some checking for constraints on the object (e.g. FK on the table to be dropped) and add an option to remove the constraint(s) before dropping the object.

Post #928062
Posted Wednesday, May 26, 2010 9:58 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, September 19, 2015 7:52 PM
Points: 358, Visits: 960
How about being able to wildcard the object name? If not, can anyone tell me how to add that to the SP?

Before everyone jumps on me let me explain... We had someone in our organization create a process that creates "temp" tables. I put "temp" in quotes because what his procs actually do is create tables. If they user doesn't check a certain option in the application, these tables don't get dropped. We often find ourselves having to go through the DB and delete many of these. I had a script for this but I found it kind of kludgey. I really like this SP and would like to modify for this purpose.
Post #928414
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse