表中的行数只有 601 条记录。查看数据库,我看不到任何问题:初始大小设置为 4Gb,自动增长设置为 1Mb(然后我将其设置为 10%),但这没有任何区别。
Could not allocate space for object 'dbo.Fatawa'.'PK_table' in database 'database' 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.
最佳答案
错误消息告诉您主文件组 (FG) 已满。在 SQL Server Management Studio (SSMS) 中,右键单击数据库和选择属性。
在文件表中,找到主数据文件 (*.mdf) 并记下位置(驱动器、路径、文件)。
转到 Windows 资源管理器,单击我的电脑图标,注意驱动器。每个驱动器都有可用的总空间和数量。
问题:
驱动器上还有剩余空间吗?如果没有,那是你的问题。
解决方案:
如果数据文件中还有剩余空间,则缩小文件。如果没有,请创建辅助数据文件。将一些表移至数据文件。移动完成后缩小主数据文件。
这是来自 Microsoft 的 Roberto Stefanetti 脚本。它将把表和索引从一个 FG 移动到另一个 FG。
http://gallery.technet.microsoft.com/scriptcenter/c1da9334-2885-468c-a374-775da60f256f
关于sql-server - 无法为对象 dbo.table 分配空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19114680/