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 @   花儿笑弯了腰  阅读(4125)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述
点击右上角即可分享
微信分享提示