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
Author
Message
Posted Friday, April 24, 2009 9:33 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, June 3, 2014 4:24 PM
Points: 14, Visits: 364
Comments posted to this topic are about the item Easily delete database objects
Post #704372
Posted Wednesday, May 26, 2010 3:35 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

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.

Cheers,
Rob.
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: 2 days ago @ 1:20 AM
Points: 359, Visits: 907
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