I'm using SQL Server 2008. I would like to know if a specific database has been restored from a device and when did it happened. Is it possible?
Sql-server – Know when a database has been restored
restoresql serversql-server-2008
Related Question
- Sql-server – Information on a Database that was restored with NO RECOVERY
- Sql-server – How to remove triggers from the restored database in SQL Server
- Sql-server – Restore DB from SQL Server 2008 R2 to 2014 Express
- Sql-server – Capture when any database is restored on the server
- Sql-server – Restoring development database from production backup triggered production database to restore as well
- Sql-server – SQL DB After Restore Script execution
Best Answer
In the msdb database, there is a table named restorehistory:
This is a table that people with sufficient privileges can clear out, but if the restore was recent and you don't have a job which clears out this table (or if it hasn't run between then and now), you should be able to see the login which performed the restore.
EDIT
You can also join it to a couple of other tables (if they have relevant data): backupset and backupmediafamily. If there are records there--with the same retention caveats as before--they'll tell you more about the backup file(s) used to restore:
That way, you could also filter on device type or file location.