Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to View backup Log script in sqlserver

2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces sqlserver how to view the backup log script, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Sqlserver View backup Log script

-

SELECT CONVERT (CHAR (100), Serverproperty ('Servername')) AS ServerName

, bs.database_name AS Database_Name

, bs.recovery_model AS Recovery_Model

, bs.is_damaged AS Is_Damaged

, bs.backup_start_date AS Backup_Start_Date

, bs.backup_finish_date AS Backup_Finish_Date

, bs.expiration_date AS Expiration_Date

, CASE bs.type

WHEN 'D'THEN 'Database'

WHEN'L 'THEN 'Log'

END AS Backup_Type

, bs.backup_size/1024/1024 AS [Backup_Size (MB)]

, bs.compressed_backup_size/1024/1024 AS [Compressed_Backup_Size]

, bs.compressed_backup_size/bs.backup_size AS Compressed_Rate

, bf.logical_device_name

, bf.physical_device_name

, bs.name AS Backupset_Name

, bs.description

FROM msdb.dbo.backupmediafamily bf

INNER JOIN msdb.dbo.backupset bs

ON bf.media_set_id = bs.media_set_id

ORDER BY bs.database_name

Bs.backup_finish_date

Thank you for reading this article carefully. I hope the article "how to view the backup log script in sqlserver" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report