sqlserver如何实现查看备份日志脚本
这篇文章主要介绍了sqlserver如何实现查看备份日志脚本,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
创新互联公司是一家专业提供上杭企业网站建设,专注与成都网站制作、成都网站设计、HTML5建站、小程序制作等业务。10年已为上杭众多企业、政府机构等服务。创新互联专业的建站公司优惠进行中。
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://azwzsj.com/article/iipsdh.html