locked
I want to know from which Host(client IP address) the database was restored? RRS feed

  • Question

  • Today one of the employees restored the db. I want to know who restored db. 

    using the below query I can fetch the time, However I;m not able to get the host or IP address, can you suggest?

    select * from msdb.dbo.restorehistory where destination_database_name='Dev' order by restore_date desc

    Thursday, January 31, 2019 1:49 PM

All replies

  • You can not, SQL Server don't store host/IP addresse, you can get only the user Name from restorehistory.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Proposed as answer by Tom Phillips Thursday, January 31, 2019 2:15 PM
    Thursday, January 31, 2019 2:03 PM
  • Hi PPKR,

    If you don't start a trace in advance, there is no way you can find these information. The restore history does not contain the host or IP address of the user who performed the restore.

    Best Regards,
    Puzzle
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, February 1, 2019 6:07 AM