How can I tell when a SQL Server database was last restored?
Take a look at these other history reports for backup and restore: Script to retrieve SQL Server database backup history; last week, most recent and no backups….The possible types include the following:
- D – Database.
- F – File.
- G – Filegroup.
- I – Differential.
- L – Log.
- V – Verifyonly.
- R – Revert.
How can I tell when a SQL database was created?
2. Using Property Settings
- In the Object Explorer in SQL Server Management Studio, go to the database and expand it.
- Under the Tables folder select the table name.
- Right click and select Properties from the menu.
- You will see the created date of the table in the General section under Description.
How to check the last database restore date?
Check last database restore date/time using SQL Server. 29 January 2013by Adam Rush. Use one of the following scripts. The first script is quick and simple: SELECT *FROM MSDB..RestoreHistory WITH (nolock)WHERE destination_database_name = DB_NAME()ORDER BY restore_date DESC. The second script also shows the backup file used during the restore:
When do I need to do a database restore?
However, there are times when your users may question whether the restore was done using the correct backup file. In this tip I will show you how you can identify the file (s) that was used for the restore, when the backup actually occured and when the database was restored.
Where to find restore history in SQL Server?
In this tip, we will look at some of the system tables that capture restore history information and how you can query these system tables to answer this question. The restore history information is readily available inside the msdb, making the solution as easy as a few lines of T-SQL.
How to calculate the duration of a database restore?
In addition to using the default trace as Aaron outlines, if you have ERRORLOGs available from around the time the restore was started and completed, you can calculate the duration another way with some tom foolery. For me, my errorlogs were much older than my default trace files, so this approach provided much more historic information for me.