Could not allocate space for object because the PRIMARY filegroup is full

SQL Server DBA Diaries

Could not allocate space for object because the PRIMARY filegroup is full

Today my team woke me up with a Good Morning call. Here is the conversation

Team:  Pradeep, Primary Filegroup is full

Me: Ok, add one more data file (acting to be be fully awake and in control of things)

Team: No, we were adding space to Primary File Group and it fails saying it is full !

Me: Ok, I am logging in. (Nice excuse to wake up fully and realize where I am !)

Ok, my day had already started. Caught some more sleep while the laptop was still warming up. This incident was quite interesting.

The DBA was trying to add a new data file on the PRIMARY filegroup on an instance running SQL Server 2000. This database was running out of space and lot of email communication and a lot of justification, business agreed to “provide” some space for this database. The PRIMARY filegroup had ~ 1GB free space before adding space. It had 6 data files. Looks like the instance did not like the number 7. Whenever the DBA issued the ALTER DATABASE command, it said

*********************

Sever: Msg 1105, Level 17, State 2, Line 1
Could not allocate space for object ‘SYSTEM table id: 8)’ in database ‘databasename’ because the ‘PRIMARY’ filegroup is full.

*********************

select object_name(8) told me that the object 8 was sysfiles1. One would feel, the primary file group has 1 GB of free space available and it is failing to insert one row into sysfiles1 table? The answer is yes, it failed to insert a single row because of insufficient space in the data file.

The system objects are always located on the first file in the PRIMARY filegroup. I looked at the first file of the PRIMARY filegroup and its size was 73 MB! The used space for this datafile The next setting I looked at was the Auto Growth. It was set to 10 MB and the MAXSIZE for that file was  set at 80 MB. From this perspective as well it has 7 more MB to grow. Then where is the catch? The drive on which this file was located had only 2 MB free space ! I wish to meet the person who did this setting at least once in my lifetime.

Here is how it lead to the resolution. The data file was completely filled out and needed to auto grow to insert a single row. But the size on disk was 2 MB and data file would grow 10 MB at a time. We had 2 options to resolve this. Either increase the current size of the data file by 1 MB or reduce the auto grow setting to 1 MB. I chose the first option for no obvious reasons and increased the allocated size for that data file to 74 MB.

After this issued the ALTER DATABASE command and we were able to add the new data file to the database.



-- Read more: http://www.sqldbadiaries.com/2010/08/19/could-not-allocate-space-for-object-because-the-primary-filegroup-is-full/#ixzz2WclHgGVI
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值