Search
Active

13
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Suggestion
ID: 490420
Opened: 9/17/2009 7:35:17 AM
Access Restriction: Public
0
Workaround(s)
One of the issues that we often find in mature databases is old code. Often people are unwilling to remove objects at a point in time because of the possibility that they might be used in the future. However this becomes an issue in keeping track of items.

It would be good for users to be able to somehow manage these objects that might need to be pruned from the system.
Details (expand)
Product Language
English

Category

SQL Engine
Proposed Solution
What I would suggest is the ability for users to mark objects (tables or code objects) as deprecated. If any of these objects is then accessed, a note is included in the error log or an event raised.

I also would suggest that there be an instance, database, and/or object level retention period for deprecated objects, similar to the collation granularity, that would allow the instacne to remove these objects after xx time. Perhaps an automatic backup of the object (script and BCP out) could be performed as well.
Benefits
Improved Administration
Improved Security
Improved Performance
Other Benefits
 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Adam_Machanic on 9/17/2009 at 9:47 AM
That's a very cool idea! Although it could just as easily be hand-rolled using SQL Audit.
Posted by Microsoft on 9/21/2009 at 2:08 PM
Hello,

This is indeed an interesting idea, and it dovetails nicely with some thoughts we've been having around managing the surface area of database apps. No promises for this release, but it is definitely something we will consider.

Thanks,
-Isaac
Posted by TimMitchell on 10/8/2009 at 8:24 AM
Good idea. This would be a useful addition to the SQL Server feature set.
Posted by Dave Poole on 10/8/2009 at 12:57 PM
This would be a Godsend. Being able to say once and for all that a DB object was no-longer used would be invaluable.

Some of our legacy databases have thousands of objects and no-one is willing to trawl through the millions of lines of legacy spaghetti code to identify whether or not they are used. Short of running a trace over an extended period of time (not feasible in our production systems) it is virtually impossible to deprecate anything.