这篇文章主要介绍了sqlserver如何实现查看备份日志脚本,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
创新互联专业为企业提供玛曲网站建设、玛曲做网站、玛曲网站设计、玛曲网站制作等企业网站建设、网页设计与制作、玛曲企业网站模板建站服务,十载玛曲做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。sqlserver 查看备份日志脚本
----------------------------------------------
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
感谢你能够认真阅读完这篇文章,希望小编分享的“sqlserver如何实现查看备份日志脚本”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联-成都网站建设公司行业资讯频道,更多相关知识等着你来学习!
分享文章:sqlserver如何实现查看备份日志脚本-创新互联
文章起源:http://lswzjz.com/article/dsphgd.html