今天早上,Dev跟我说,执行query statement时出现一个error,detail info是:

“The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'”

错误信息提示:由于活动事务太长,使得 tempdb 的 transaction log file 空间用尽。

一般情况下,由于tempdb 的 Recovery Mode是 simple,日志文件会自动截断和重用,如果活动事务太长,或短时间内事务日志太多,导致事务日志不能及时截断和重用,会出现log file 空间不足的问题。检查tempdb的日志file的设置:最大值,自动增长和Disk 剩余可用空间,保证 tempdb的 log file 有足够的Disk空间。

如果不是日志File设置的问题,那可能是tempdb的数据文件(mdf 或ndf)空间不足。查看Sql server的ErrorLog,发现错误信息:

"Could not allocate space for object 'dbo.TempTable_xxxx' in database 'db_yyyy' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup."

Workaround

为tempdb 增加 File 或增加现有file的最大值,建议将 tempdb 的 files 存放在不同的Disk上,并且 files 的数量接近于或等于 CPU 数量,这样能够减少 PageLatch 和 PageIOLatch 等待。

参考文档:

Sql Server Error Messages : The transaction log for database ‘tempdb’ is full due to ‘ACTIVE_TRANSACTION’

The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'的更多相关文章

  1. Replication:The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'

    今天早上,Dev跟我说,执行query statement时出现一个error,detail info是: “The transaction log for database 'tempdb' is ...

  2. The transaction log for database 'xxxx' is full due to 'ACTIVE_TRANSACTION'

    今天查看Job的History,发现Job 运行失败,错误信息是:“The transaction log for database 'xxxx' is full due to 'ACTIVE_TRA ...

  3. The transaction log for database 'XXX' is full due to 'ACTIVE_TRANSACTION'.

    Msg 9002, Level 17, State 4, Line 4The transaction log for database 'Test' is full due to 'ACTIVE_TR ...

  4. SQLSERVER事务日志已满 the transaction log for database 'xx' is full

    解决办法:清除日志 USE [master] GO ALTER DATABASE DNName SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE D ...

  5. DB2 “The transaction log for the database is full” 存在的问题及解决方案

    DB2在执行一个大的insert/update操作的时候报"The transaction log for the database is full.. "错误,查了一下文档是DB ...

  6. SQL Server Transaction Log Truncate && Shrink

    目录 什么是事务日志 事务日志的组成 事务日志大小维护方法 Truncate Shrink 索引碎片 总结 什么是事务日志 Transaction log   是对数据库管理系统执行的一系列动作的记录 ...

  7. 测试用的数据库Transaction Log太大, 用于缩减它的脚本

    记在这里, 备用. select name, recovery_model_desc from sys.databases where name = 'WSS_Content_1000' USE WS ...

  8. what can we do if just only want to truncate transaction log without backup ?

    n some circumstances, we just want to truncate transaction log without backup and refuce change data ...

  9. Error: 9001, Severity: 21, State: 5 The log for database 'xxxx' is not available

    昨天下午5点多收到几封告警邮件,我还没有来得及看,GLE那边的同事就电话过来,说数据库出现告警了.让我赶紧看看,案例具体信息如下所示: 告警邮件内容: DATE/TIME: 2015/1/23 17: ...

随机推荐

  1. HDU4787 GRE Words Revenge(AC自动机 分块 合并)

    题目 Source http://acm.hdu.edu.cn/showproblem.php?pid=4787 Description Now Coach Pang is preparing for ...

  2. SOAPUI使用教程-REST功能测试

    当创造了SoapUI功能测试用例,常见的情况是,你调用一些REST资源和验证其响应检查返回正确的结果.这可以容易地实现: 添加一个REST请求到新的test step或现有的TestCase 添加断言 ...

  3. Django 1.7 throws django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet

    在程序中要添加django.setup() 整个程序如下所示 import os import django def populate(): python_cat = add_cat('Python' ...

  4. 试用avalon2.0

    一直从事后端开发,对于前端的html+css+js,不熟不熟的.前面写了一个比较复杂的操作界面,我只能说,误工费时.花了一周研究avalonjs2,大神的确就是大神,解决了我很多的问题, 请参考htt ...

  5. [RxJava^Android]项目经验分享 --- 失败重试

    简单介绍一下业务逻辑:获取字符串,如果获取失败进行10次重试,超出10次未成功视为失败. 模拟获取字符串场景 代码块 class MsgTool { int count; String getMsg( ...

  6. 我听说 C...

    我听说在 c 语言的世界里,goto 和异常处理都是声名狼藉的东西,而我认为它们在一起就能化解各自的问题.

  7. Salesforce学习笔记(一)

    Force平台简介 一.Force平台应用程序的优点1.以数据为中心的应用程序(一个对象就是一个数据库表) 由于该平台以数据库为中心,它让你能够编写以数据为中心的应用程序.以数据为中心的应用程序是基于 ...

  8. Webform 上传图片加水印

    界面: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx ...

  9. Maven打包 报 Unable to locate the Javac Compiler in: C:\Program Files\Java\jre1.8.0_73\..\lib\tools.jar

    无法找到javac 编译环境 右键项目 --> properties -->Java Build Path -->选中JRE 点击右侧 Edit 编辑 --> 把你设置的JRE ...

  10. git中https和SSH

    1.在git中clone项目有两种方式:HTTPS和SSH,它们的区别如下: HTTPS:不管是谁,拿到url随便clone,但是在push的时候需要验证用户名和密码: SSH:clone的项目你必须 ...