Fork me on GitHub

The 'PRIMARY' filegroup is full

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Could not allocate space for object 'dbo.SORT temporary run storage:  141008258465792' in database 'tempdb' 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.

错误描述

消息 1105,级别 17,状态 2,第 1 行
无法为数据库 'tempdb' 中的对象 'dbo.SORT temporary run storage:  140737503494144' 分配空间,因为 'PRIMARY' 文件组已满。请删除不需要的文件、删除文件组中的对象、将其他文件添加到文件组或为文件组中的现有文件启用自动增长,以便增加可用磁盘空间。
消息 9002,级别 17,状态 4,第 1 行
数据库 'tempdb' 的事务日志已满。若要查明无法重用日志中的空间的原因,请参阅 sys.databases 中的 log_reuse_wait_desc 列。

解决方法

查看tempdb当前大小 

exec sp_helpdb tempdb  
--对tempdb进行收缩  
use tempdb   
go   
dbcc shrinkfile(tempdev, 1024)   
use tempdb   
go   
dbcc shrinkfile(templog, 512)

尝试将tempdb的文件初始值设置:
数据文件:10G
日志文件: 10G
自动增长的10%设置为10M

Refer:

http://sqlserver2000.databases.aspfaq.com/why-is-tempdb-full-and-how-can-i-prevent-this-from-happening.html

http://hi.baidu.com/miss_nnn/item/57dbd6e6e15390a8c00d753c

http://hillstone.blog.hexun.com/82591934_d.html

posted @ 2013-02-05 15:32  花儿笑弯了腰  阅读(4067)  评论(0编辑  收藏  举报