您好,登錄后才能下訂單哦!
這篇文章主要介紹了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如何實現查看備份日志腳本”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。