Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jtwork
Yak Posting Veteran
82 Posts |
Posted - 2008-04-16 : 04:29:25
|
| Can i find out when a table was last accessed?The purpose of this is to create a list of tables that could potentially be deleted. I would then prefix them with a d and the auto delete them after x number of days? or move them to a deletions database?Just trying to automate a bit of house keeping in the active databases. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-16 : 05:10:45
|
| If you have audit columns in your table like date modified just have a look at maximun value from them. |
 |
|
|
jtwork
Yak Posting Veteran
82 Posts |
Posted - 2008-04-16 : 05:18:13
|
| i dont have those and they would only be any good if something had been modified or inserted or deleted. What if the last thing to access the table was a simple select query this wouldnt show. To be honest i dont think im going to get exactly what im after. |
 |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-04-16 : 05:27:09
|
| you could do it with profiler i guess? though not retrospectively of courseEm |
 |
|
|
|
|
|