唯一的果果
2017-08-18 01:50
采纳率: 60%
浏览 3.7k

为什么sql server备份成功了没有bak文件

![图片说明图片说明图片说明

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • 道素 2017-08-21 15:54
    已采纳

    用下面语句查看下历史,如果没有历史就没成功,如果有,会显示对应备份文件的位置和文件名

     SELECT 
        CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server, 
        msdb.dbo.backupset.database_name, 
        msdb.dbo.backupset.backup_start_date, 
        msdb.dbo.backupset.backup_finish_date, 
        msdb.dbo.backupset.expiration_date, 
        CASE msdb..backupset.type 
        WHEN 'D' THEN 'Database' 
        WHEN 'L' THEN 'Log' 
    END AS backup_type, 
    msdb.dbo.backupset.backup_size, 
    msdb.dbo.backupmediafamily.logical_device_name, 
    msdb.dbo.backupmediafamily.physical_device_name, 
    msdb.dbo.backupset.name AS backupset_name, 
    msdb.dbo.backupset.description 
    FROM msdb.dbo.backupmediafamily 
    INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id 
    WHERE (CONVERT(datetime, msdb.dbo.backupset.backup_start_date, 102) >= GETDATE() - 7) 
    ORDER BY 
    msdb.dbo.backupset.database_name, 
    msdb.dbo.backupset.backup_finish_date 
    
    评论
    解决 无用
    打赏 举报
  • 查看更多回答(3条)

相关推荐 更多相似问题