今天早上,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. [资料分享]7天搞定Node.js微信公众号开发

  2. Android 单元测试(junit、mockito、robolectric)

    1.运用JUnit4 进行单元测试 首先在工程的 src 文件夹内创建 test 和 test/java 文件夹. 打开工程的 build.gradle(Module:app)文件,添加JUnit4依 ...

  3. leetcode 199 :Binary Tree Right Side View

    // 我的代码 package Leetcode; /** * 199. Binary Tree Right Side View * address: https://leetcode.com/pro ...

  4. Thisgood

    this is good test print 'haha'

  5. Linux下添加apache虚拟主机

    一切在确保apache被正确安装的前提下 设置虚拟主机 创建虚拟目录 现在,让我们继续安装虚拟主机.虚拟主机命名为local.gis. 创建一个公用的文件夹来存放这虚拟主机的数据. 首先,让我们为lo ...

  6. [BZOJ4196][NOI2015]软件包管理器

    4196: [Noi2015]软件包管理器 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 1040  Solved: 603[Submit][Stat ...

  7. 如何在Windows上从源码编译Chromium (CEF3) 加入mp3支持

    一.什么是CEF CEF即Chromium Embeded Framework,由谷歌的开源浏览器项目Chromium扩展而来,可方便地嵌入其它程序中以得到浏览器功能. CEF包括CEF1和CEF3两 ...

  8. java分享第十七天-01(封装操作xml类)

    做自动化测试的人,都应该对XPATH很熟悉了,但是在用JAVA解析XML时,我们通常是一层层的遍历进去,这样的代码的局限性很大,也不方便,于是我们结合一下XPATH,来解决这个问题.所需要的JAR包: ...

  9. USER STORIES AND USE CASES - DON’T USE BOTH

    We’re in Orlando for a working session as part of the Core Team building BABOK V3 and over dinner th ...

  10. const 使用一二

    Primer C++ 练习题4.20: int i = -1; const int ic = i; 对于这个,一开始认为,ic 作为const 类型变量,定义时应该给其赋常值,而此处给的是变量i,因此 ...