今天早上,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. Shell scripts to Create a local dir base on the time.

    #!/bin/bash DATETIME=`date +%Y%m%d%H%M%S` echo "datetime = $DATETIME" mkdir $DATETIME # cd ...

  2. 常用CSS缩写语法总结

    使用缩写可以帮助减少你CSS文件的大小,更加容易阅读.css缩写的主要规则如下: 颜色 16进制的色彩值,如果每两位的值相同,可以缩写一半,例如:#000000可以缩写为#000;#336699可以缩 ...

  3. XVII Open Cup named after E.V. Pankratiev. GP of SPb

    A. Array Factory 将下标按前缀和排序,然后双指针,维护最大的右边界即可. #include<cstdio> #include<algorithm> using ...

  4. Yii框架CURD方法

    在YII框架中,CURD有2种方式: 1.AR模式:2. DAO模式 AR模式下 查全部   MODEL  $model->find()->asArray()->all()查单 个  ...

  5. python列表副本

    a=[1,2,3] b=[4,5,6] a=a+b #创建含a和b的副本的新列表 a [1, 2, 3, 4, 5, 6] b [4, 5, 6] c=a+b #创建含a和b的副本的新列表c [1, ...

  6. python,django安装

    环境:win7 64位 软件:python3.4.3,jdango1.8,PyDev,pymysql0.7 一:安装python 1.安装好python好后,配置环境变量,可以参考其它的博客,本博客只 ...

  7. jade模板引擎

    最近用jade写了点东西,觉得挺有趣的,是一个有意思的模板引擎. 比如说,像这样的结构的html <span> <i class="icon-edit">& ...

  8. problem-eclipse创建maven项目报错

    Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of ...

  9. iOS开发UI高级手势识别器

    ####手势识别器 UIGestureRecognizer类 ·UITapGestureRecognizer(轻击) ·UIPinchGestureRecognizer(捏合) ·UIPanGestu ...

  10. centos 7.2 安装PHP7.1+apache2.4.23

    安装准备:   http://ftp.cuhk.edu.hk/pub/packages/apache.org//httpd/httpd-2.4.23.tar.gz 下载apache http://cn ...