我们的数据库当前为64 Gb,我们的一个应用程序开始因以下错误而失败:
Our database is currently at 64 Gb and one of our apps started to fail with the following error:
System.Data.SqlClient.SqlException:无法为数据库'travelgateway'中的对象'cnv.LoggedUnpreparedSpos'.'PK_LoggedUnpreparedSpos'分配空间,因为'PRIMARY'文件组已满.通过删除不需要的文件,在文件组中删除对象,向文件组添加其他文件或为文件组中的现有文件设置自动增长来创建磁盘空间.
System.Data.SqlClient.SqlException: Could not allocate space for object 'cnv.LoggedUnpreparedSpos'.'PK_LoggedUnpreparedSpos' in database 'travelgateway' 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.
我仔细检查了所有内容:允许单个文件组中的所有文件以合理的增量自动增长(数据文件100 Mb,日志文件10%),超过100 Gb的可用空间可用于数据库tempdb设置为自动增长,并在其驱动器上具有大量可用的HDD空间.
I double-checked everything: all files in a single filegroup are allowed to autogrow with a reasonable increments (100 Mb for a data file, 10% for a log file), more than 100 Gb of free space is available for the database, tempdb is set to autogrow as well with plenty of free HDD space on its drive.
为解决问题,我向文件组添加了第二个文件,该错误消失了.但是我对这整个情况感到不安.
To resolve a problem, I added second file to the filegroup and the error has gone. But I feel uneasy about this whole situation.
这是哪里的问题,伙计们?
Where' the problem here, guys?
推荐答案好的,可以使用了.事实证明,数据库文件所在的NTFS卷被大量碎片化了.停止了SQL Server,对整个事情进行了碎片整理,从那以后一切都很好.
OK, got it working. Turns out that an NTFS volume where the DB files were located got heavily fragmented. Stopped SQL Server, defragmented the whole thing and all it was fine ever since.
更多推荐
“主文件组已满" SQL Server 2008 Standard中没有明显的原因
发布评论