|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Today @ 9:03 PM
Points: 31,406,
Visits: 13,723
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, March 09, 2012 2:36 AM
Points: 171,
Visits: 442
|
|
I'd love to see (and please let me know if it already exists!) a way to find out when a table was last selected from. We can set up our own logs for statements which affect the data.
With that we could say "lets delete stuff which hasn't been used for a year".
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, April 22, 2013 8:56 AM
Points: 116,
Visits: 120
|
|
We just went live this past Monday with a migration from SQL 2000 to SQL 2008. This migration also included new servers, new OS (Win2008), Failover Clustering, Virtual Servers (Hyper V) and even went to the 64 bit SQL Server edition. With so many changes occuring at one time we were reluctant to "Clean House". We wanted to make sure if something went wrong it was with the new technology and not something we did by cleanning house.
As of today, we had very little problems with the move. Everything is working as planned. I am now planning to take the broom out of the closet and try to get rid of things that are no longer needed.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, November 18, 2010 5:25 AM
Points: 162,
Visits: 694
|
|
Ben Moorhouse (9/17/2009) I'd love to see (and please let me know if it already exists!) a way to find out when a table was last selected from. We can set up our own logs for statements which affect the data.
With that we could say "lets delete stuff which hasn't been used for a year".
There isn't a magical switch, at least not that I'm aware of. But you could create a DDL trigger to capture any changes there, and you could create a trace to capture all of the dml changes to the table. That would get what you want, but it would be a PITA.
As far as Steve's idea of "deprecate that" function, I would love to see that.
A backward approach could be made. All of the procedures we have here include insert statements into a logging table. I guess we could search for rows referencing items from sys.procedures and grab those objects not in the logging table. (Unfortunately, we only keep 45 days worth of data)
Couldn't agree more with the need for housekeeping.
Honor Super Omnia- Jason Miller
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, March 09, 2012 2:36 AM
Points: 171,
Visits: 442
|
|
Apologies Jason - I meant that I knew we could log changes to objects and data. It's the ability to log select statements which would be incredibly helpful to me.
Not just for housekeeping either, but for identifying people who write bad/inefficient code.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, November 18, 2010 5:25 AM
Points: 162,
Visits: 694
|
|
Ben Moorhouse (9/17/2009) Apologies Jason - I meant that I knew we could log changes to objects and data. It's the ability to log select statements which would be incredibly helpful to me.
Not just for housekeeping either, but for identifying people who write bad/inefficient code.
You can capture that as well. We have a trace that runs on our production reporting server to capture every single statement that executes on the machine. Let's just say we had some values changed, and "nobody" did it...
Honor Super Omnia- Jason Miller
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, March 09, 2012 2:36 AM
Points: 171,
Visits: 442
|
|
We currently have a database on a shared server with other departments. We will be moving to our own hardware soon, so that might be something we can do. Thanks for the pointer!
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 1:12 PM
Points: 2,891,
Visits: 5,857
|
|
Jason Miller-476791 (9/17/2009) As far as Steve's idea of "deprecate that" function, I would love to see that.
A backward approach could be made. All of the procedures we have here include insert statements into a logging table. I guess we could search for rows referencing items from sys.procedures and grab those objects not in the logging table. (Unfortunately, we only keep 45 days worth of data)
Couldn't agree more with the need for housekeeping.
I nominate Steve to open a connect item. I'd be very happy to vote for it as I think this is something that would very, very great to have in a future version. -Luke.
To help us help you read this
For better help with performance problems please read this
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, August 04, 2010 10:23 AM
Points: 4,
Visits: 50
|
|
| We just had a major release and I renamed all the old objects with old_. It felt sooooo good. If no errors in a month, they'll go away permanently.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, March 23, 2012 5:58 AM
Points: 8,
Visits: 36
|
|
I do something similar, objects which we believe to be no longer in use we rename for example. tblLoginHistory becomes tblLoginHistory_UNUSED090917
Then if something breaks or someone shouts we can quickly and easily rename it back. If 6months passes and it's still named the same then we take a backup and drop it.
|
|
|
|