Hi,
I have been assigned to research a database. I am trying to find out whether
the database is currently being used by some process/user. Is there a way to
find when a particular table/ object was last used/updated/inserted? This
would help me in finding out what tables are not being used at all. Thanks i
n
advance."sharman" <sharman@.discussions.microsoft.com> wrote in message
news:5AB6D4A8-177F-4B1E-8B7A-2CA212F5302B@.microsoft.com...
> Hi,
> I have been assigned to research a database. I am trying to find out
> whether
> the database is currently being used by some process/user. Is there a way
> to
> find when a particular table/ object was last used/updated/inserted? This
> would help me in finding out what tables are not being used at all. Thanks
> in
> advance.
Not by default.
Generally you need to setup a profiler to watch that object.
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com|||Hi "sharman"!
try to look at sys.dm_db_index_usage_stats dynamic view:
each row of that view refers to an index or an heap table (Index_id = 0 is
for heaps, 1 for clustered index and 2-249 for non-clustered indexes). thera
are interesting columns for you: look at the Books on-line for details!
Gilberto
"sharman" wrote:
> Hi,
> I have been assigned to research a database. I am trying to find out wheth
er
> the database is currently being used by some process/user. Is there a way
to
> find when a particular table/ object was last used/updated/inserted? This
> would help me in finding out what tables are not being used at all. Thanks
in
> advance.
No comments:
Post a Comment