[廚餘回收] 在 SQL Server 中新增大量資料後又刪除的副作用

這天客戶跑來跟我說「資料庫壞了,無法新增資料!」,出現了下面這段錯誤訊息:

Could not allocate space for object 'dbo.XXX'.'PK_XXX' in database 'YYY' 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.

很明顯,這段訊息告訴我們是儲存空間已滿,可是我前幾天才維護過,按照資料增加的速度,不會那麼快才對,來問問看使用者做了什麼事?

...繼續閱讀 »