Re: Tracing Used Tables
- From: "Shiju Samuel" <Shiju.Samuel@xxxxxxxxx>
- Date: Mon, 27 Jul 2009 23:47:44 -0700
Erland Sommarskog wrote:
Shiju Samuel (Shiju.Samuel@xxxxxxxxx) writes:
I need to trace all the tables which are used in the database. I
found the objects:object:Opened is not getting any trace hit. Now
I am tracing with Locks->LockAquired with all the possible filter
on server side trace is there any other way to do this ? This is
generating a lot of trace data even for ever key locks aquired.
Tracing LockAcquired on a production server is definitely not to
recommend. That will cause an enormous extra load on the box.
Overall, this is no simple task, and even less so on SQL 2000. If your
application does not use stored procedures, but uses ad hoc SQL, you
collect data from master.syscacheobjects.sql and then parse that. If
your application is based to stored procedures, collect which
procedures that are run, and then build a shadow copy of the database
where you load all proceduers after table tables, so that sp_depends
becomes decently correct. (But tables which appears in queries with
temp tables and not elsewhere in the procedures will not be listed in
sysdepends.)
And once you have this data, you may still have tables that are only
used for end-of-the-year reporting and the like, and thus are not used
this time of year...
Thanks Erland - Looks to be an Herculean task considering 22 databases
which I need to retire on the server.
-- Thanks - Shiju
.
- Follow-Ups:
- Re: Tracing Used Tables
- From: Linchi Shea
- Re: Tracing Used Tables
- From: John Bell
- Re: Tracing Used Tables
- References:
- Tracing Used Tables
- From: Shiju Samuel
- Re: Tracing Used Tables
- From: Erland Sommarskog
- Tracing Used Tables
- Prev by Date: Re: Custom Aggregate
- Next by Date: Cant find Report designer
- Previous by thread: Re: Tracing Used Tables
- Next by thread: Re: Tracing Used Tables
- Index(es):
Relevant Pages
|