How to retrieve rows that as been deleted from the result of a DM view

  • Hi can someone tell me how to retrieve the result of  
    select *
    FROM sys.dm_exec_sessions

    From a previous backup if someone has delete some of the rows?

    Need to know in which database are we getting the result?

    Thanks,

    Stanley

  • Stanley Pagenel - Wednesday, January 30, 2019 8:23 AM

    Hi can someone tell me how to retrieve the result of  
    select *
    FROM sys.dm_exec_sessions

    From a previous backup if someone has delete some of the rows?

    Need to know in which database are we getting the result?

    Thanks,

    Stanley

    The information on that view is dynamic, hence the prefix dm which stands for dynamic management. It shows information about all active user connections and internal tasks, this is not backed up.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • But you could create a table and write the values from the DMV into it... Then you could look at it over time. Not sure it's worth doing, but that's how you could do it.

  • Thanks for the info Luis and Piet 🙂

  • No one deletes rows from this DMV. The system manages this. This is a view, not a table of data. The data you want won't be in a backup.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply