这篇文章主要介绍了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 [Comp免费主机域名ressed_Backup_Size]
,bs.compressed_backup_size/bs.backup_size AS Compress免费主机域名ed_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如何实现查看备份日志脚本”这篇文章对大家有帮助,同时也希望大家多多支持云技术,关注云技术行业资讯频道,更多相关知识等着你来学习!
相关推荐: 怎么使用PostgreSQL的插件postgresql_anonymizer
本篇内容主要讲解“怎么使用PostgreSQL的插件postgresql_anonymizer”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么使用PostgreSQL的插件postgresql_anonymize…