Query database backup history

Source: Internet
Author: User

There are a lot of methods to back up the SQL database, but no one has mentioned the method to query the database backup history. I have published the command to query the backup history in SQL2000, if you are interested or have already done so, you may leave a message to discuss it.

 

 

-- After the backup is successful, records will be added to the backupmediafamily, backupset, backupfile, backupmediaset, restorefile, restorefilegroup, and restorehistory tables of the MSDB database.

-- Query backup history

Use MSDB

Select F. *, B. database_name, B. backup_finish_date from backupmediafamily F, backupset B where B. media_set_id = f. media_set_id

And B. database_name = 'database name'

Order by backup_finish_date

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.