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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Table access issue !!!

Author  Topic 

lemondash
Posting Yak Master

159 Posts

Posted - 2007-05-10 : 05:49:16
Morning/Afternoon Hello all,
Have little question to ask; well that's the world’s biggest bluff.
I'm currently looking after a highly used database, but i know that it is full of tables that are not being used (Need deleting) as it’s taking up so much space that can be freed up; basically these tables have been left behind by developers. I did go ahead and think about just randomly deleting them but then i thought that some of these might still be used.
So here's the question is there a way that when a table is access as in an update, select, delete that i can record it in a table along with the date it was accessed (and even what type of access it was I know this is pushing it) and then query that table at a later date so i can tell what are the true tables being access and then hopefully go ahead and delete the correct ones and not make a fool of myself.
Any help or ideas on this would be a great help for me. I am still quite new Sql Server.
Hope you can help

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2007-05-10 : 06:14:38
Well.. first have a look on the queries which are cached..


Select * From Master..syscacheobjects where db_name(dbid) = db_name()


do logging this information for a week.. and then you will be aware, of
the columns which are used frequently and then you can go ahead with deletetion..

but still this things are very much recommandable.. dont you have any documents stating the purpose of the tables etc...??



Chirag

http://chirikworld.blogspot.com/
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-05-10 : 06:28:55
I believe C2 auditing (a SQL Server option) may help. I've never tried it before, but I understand it's a little resource hungry.

Can anyone expand?

Drew

"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-10 : 10:17:40
Lumigent has tool for that.
Go to Top of Page
   

- Advertisement -