• 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