How do I count the number times a table is accessed per day?
Gracias.
LaEsmeralda
There's nothing built-in for this. The only way I can think of is to use a Profiler trace, capturing
the execution plan and add appropriate filter for the table name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:18DBC144-C9EE-4F11-94F9-215D08822DC0@.microsoft.com...
> How do I count the number times a table is accessed per day?
> Gracias.
> LaEsmeralda
|||> There's nothing built-in for this. The only way I can think of is to use a
> Profiler trace, capturing the execution plan and add appropriate filter
> for the table name.
Well, you could schedule a job to take a snapshot of the DMV once a day, and
then calculate the delta from yesterday's snapshot.
Of course the snapshot would be invalidated on any day that the server is
restarted. :-)
Showing posts with label accessed. Show all posts
Showing posts with label accessed. Show all posts
Tuesday, February 14, 2012
Counting Accesses To A Table
How do I count the number times a table is accessed per day?
Gracias.
LaEsmeraldaYou could use a Profiler trace, or perhaps sys.dm_db_index_usage_stats would
be useful. The dynamic management view isn't exactly what you requested but
if it provides the info you need (access to the table is always through
indexes) it might be the easiest way and with the minimum impact on the
server.
HTH,
Paul Ibison|||There's nothing built-in for this. The only way I can think of is to use a P
rofiler trace, capturing
the execution plan and add appropriate filter for the table name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:18DBC144-C9EE-4F11-94F9-215D08822DC0@.microsoft.com...
> How do I count the number times a table is accessed per day?
> Gracias.
> LaEsmeralda|||> There's nothing built-in for this. The only way I can think of is to use a
> Profiler trace, capturing the execution plan and add appropriate filter
> for the table name.
Well, you could schedule a job to take a snapshot of the DMV once a day, and
then calculate the delta from yesterday's snapshot.
Of course the snapshot would be invalidated on any day that the server is
restarted. :-)
Gracias.
LaEsmeraldaYou could use a Profiler trace, or perhaps sys.dm_db_index_usage_stats would
be useful. The dynamic management view isn't exactly what you requested but
if it provides the info you need (access to the table is always through
indexes) it might be the easiest way and with the minimum impact on the
server.
HTH,
Paul Ibison|||There's nothing built-in for this. The only way I can think of is to use a P
rofiler trace, capturing
the execution plan and add appropriate filter for the table name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:18DBC144-C9EE-4F11-94F9-215D08822DC0@.microsoft.com...
> How do I count the number times a table is accessed per day?
> Gracias.
> LaEsmeralda|||> There's nothing built-in for this. The only way I can think of is to use a
> Profiler trace, capturing the execution plan and add appropriate filter
> for the table name.
Well, you could schedule a job to take a snapshot of the DMV once a day, and
then calculate the delta from yesterday's snapshot.
Of course the snapshot would be invalidated on any day that the server is
restarted. :-)
Counting Accesses To A Table
How do I count the number times a table is accessed per day?
Gracias.
LaEsmeraldaYou could use a Profiler trace, or perhaps sys.dm_db_index_usage_stats would
be useful. The dynamic management view isn't exactly what you requested but
if it provides the info you need (access to the table is always through
indexes) it might be the easiest way and with the minimum impact on the
server.
HTH,
Paul Ibison|||There's nothing built-in for this. The only way I can think of is to use a Profiler trace, capturing
the execution plan and add appropriate filter for the table name.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:18DBC144-C9EE-4F11-94F9-215D08822DC0@.microsoft.com...
> How do I count the number times a table is accessed per day?
> Gracias.
> LaEsmeralda|||> There's nothing built-in for this. The only way I can think of is to use a
> Profiler trace, capturing the execution plan and add appropriate filter
> for the table name.
Well, you could schedule a job to take a snapshot of the DMV once a day, and
then calculate the delta from yesterday's snapshot.
Of course the snapshot would be invalidated on any day that the server is
restarted. :-)
Gracias.
LaEsmeraldaYou could use a Profiler trace, or perhaps sys.dm_db_index_usage_stats would
be useful. The dynamic management view isn't exactly what you requested but
if it provides the info you need (access to the table is always through
indexes) it might be the easiest way and with the minimum impact on the
server.
HTH,
Paul Ibison|||There's nothing built-in for this. The only way I can think of is to use a Profiler trace, capturing
the execution plan and add appropriate filter for the table name.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"LaEsmeralda" <LaEsmeralda@.discussions.microsoft.com> wrote in message
news:18DBC144-C9EE-4F11-94F9-215D08822DC0@.microsoft.com...
> How do I count the number times a table is accessed per day?
> Gracias.
> LaEsmeralda|||> There's nothing built-in for this. The only way I can think of is to use a
> Profiler trace, capturing the execution plan and add appropriate filter
> for the table name.
Well, you could schedule a job to take a snapshot of the DMV once a day, and
then calculate the delta from yesterday's snapshot.
Of course the snapshot would be invalidated on any day that the server is
restarted. :-)
Subscribe to:
Posts (Atom)