MSDB database is used by SQL Server Agent for scheduling alerts and jobs and by other features such as Service Broker and Database Mail. Again SQL Server is using MSDB for storing the history of backup, restore, log-shipping details and more…
You can query the MSDB as below to get the details about the SQL Server restore history.
SELECT TOP 10 * FROM restorehistory WITH (nolock)WHERE (destination_database_name = 'Database Name')ORDER BY restore_date DESC All Databases SELECT TOP 10 * FROM restorehistory WITH (nolock)ORDER BY restore_date DESC
Thanks Jugal,
I am able to find the restore history now….please again do me a favor.. i want to find who and when delete operation is performed….can we find the same for truncate??
You can’t fine for delete and truncate. You have to setup auditing, or C2 trace setup or you can checkout default trace if deleted recently.
I am using CDC for delete…but i am not able to find the user who deleted the record..how can we find??