Monday, March 26, 2012

getting table last accessed time

is there a possibility to get table last accessed time?
Z.F
Look, SQL Server does not track such kind of operations , however you can
add additional column to the table with GETDATE() DEFAULT.
At the end of the day you could query the table with MAX() of this (new
added) column.
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
news:uqPkscucEHA.2812@.TK2MSFTNGP11.phx.gbl...
> is there a possibility to get table last accessed time?
>
|||Hi Uri,
For SELECT statements your suggestion will not work out. I feel the only
solution is to run the profiler.
Thanks
Hari
MCDBA
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:#og6ifucEHA.1356@.TK2MSFTNGP09.phx.gbl...
> Z.F
> Look, SQL Server does not track such kind of operations , however you can
> add additional column to the table with GETDATE() DEFAULT.
> At the end of the day you could query the table with MAX() of this (new
> added) column.
>
> "z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
> news:uqPkscucEHA.2812@.TK2MSFTNGP11.phx.gbl...
>
|||Hari
Yes , you are right ,did not think about SELECT statements
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:ujdcwvvcEHA.1644@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Hi Uri,
> For SELECT statements your suggestion will not work out. I feel the only
> solution is to run the profiler.
> Thanks
> Hari
> MCDBA
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:#og6ifucEHA.1356@.TK2MSFTNGP09.phx.gbl...
can
>

No comments:

Post a Comment