修正SQL Server事务日志备份/截断的JOB错误
2016-02-04 10:45
513 查看
目录
目录问题描述
问题分析
解决办法
参考资料
问题描述
通过SSMS中的维护计划配置了事务日志(Transaction Log)备份的Job,但测试执行后出现如下报错信息:[code]Date 2/4/2016 8:00:00 AM Log Job History (backup_log.sub) Step ID 1 Server MAXIMO75 Job Name backup_log.sub Step Name sub Duration 00:00:02 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0 Message Executed as user: WORKGROUP\MAXIMO75$. Microsoft (R) SQL Server Execute Package Utility Version 10.50.4000.0 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 8:00:00 AM Progress: 2016-02-04 08:00:01.74 Source: {3EC7849D-C143-4091-99DB-8AADBABF5164} Executing query "DECLARE @Guid UNIQUEIDENTIFIER EXECUTE msdb..sp...".: 100% complete End Progress Progress: 2016-02-04 08:00:01.82 Source: Maintenance Cleanup Task Executing query "EXECUTE master.dbo.xp_delete_file 0,N'D:\backup\lo...".: 100% complete End Progress Error: 2016-02-04 08:00:02.35 Code: 0xC002F210 Source: Back Up Database Task Execute SQL Task Description: Executing the query "BACKUP LOG [maxdb75] TO DISK = N'D:\backup\log\ma..." failed with the following error: "BACKUP LOG cannot be performed because there is no current database backup. BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 8:00:00 AM Finished: 8:00:02 AM Elapsed: 1.531 seconds. The package execution failed. The step failed.
问题分析
仔细查看上述报错信息中的提示:“BACKUP LOG cannot be performed because there is no current database backup. BACKUP LOG is terminating abnormally.”. Possible failure reasons: Problems with the query, “ResultSet” property not set correctly, parameters not set correctly, or connection not established correctly.
即中文如下:
无法执行 BACKUP LOG,因为当前没有数据库备份。 BACKUP LOG 正在异常终止。”。失败的原因可能有: 查询本身有问题、未正确设置 “ResultSet” 属性、未正确设置参数或未正确建立连接。
这是由于此DB库从未执行过数据库完整备份或刚将数据库的日志级别从简单模式切换到完整模式。
见MSDN中(Working with Transaction Log Backups)的描述
Before you can create the first log backup, you must create a full backup
解决办法
执行一次完整的数据备份,然后再执行事务日志备份的Job参考资料
使用事务日志备份(Working with Transaction Log Backups)https://msdn.microsoft.com/zh-cn/library/ms190440.aspx
相关文章推荐
- mysql事务隔离级别
- mysql官方文档阅读笔记 MVCC
- mysql的GTID复制和多源复制
- sql 查询,删除重复的记录
- MySQL redo log及recover过程浅析
- mysql二进制版本安装以及主从服务的搭建
- SQL查询操作处理流程
- redis预编译安装、启动
- java数据库编程——元数据(metadata)+web 与企业应用中的连接管理
- mysql存储过程详解
- MySQL中的存储引擎讲解(InnoDB,MyISAM,Memory等各存储引擎对比)
- Palo:百度面向分析的大规模数据库系统-马如悦(阅读记录)
- sql server 查询表结构
- 安装Mysql最新版本mysql-5.7.10-winx64出现的几个问题解决
- oracle 11gR2 安装提示INS-20802 Oracle Net Congfiguration Assistant失败
- MySQL Connector C
- MySql远程连接
- SQL Server 2008怎么自动备份数据库
- sqlserver 企业版下载地址
- SQL Server 诊断查询-(5)