期間磁盤空間用完的我試圖分區之前一個大表(160Gb的)。它包含IIS logs
的數據,這些數據是通過過去70天生成的。分區方案和功能將表格拆分成相關日期。表分區
每個文件組中有一個文件,一個數據會存入每個文件。
有在桌子上目前沒有聚集索引,有2個左右已經從數據拉日誌的創建時間和ASP會話ID非聚集索引。
我遇到的問題是,當我嘗試分配此表進行分區時,磁盤空間不足。
是否有配料過程的方法?
USE [Diagnostic_MB]
GO
BEGIN TRANSACTION
CREATE CLUSTERED INDEX [ClusteredIndex_on_Scheme70Day_634883295513235207] ON [dbo].[IISLog]
(
[SentUTCDateTime]
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [Scheme70Day]([SentUTCDateTime])
DROP INDEX [ClusteredIndex_on_Scheme70Day_634883295513235207] ON [dbo].[IISLog] WITH (ONLINE = OFF)
CREATE NONCLUSTERED INDEX [ASPSession] ON [dbo].[IISLog]
(
[ASPSessionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = ON, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [Scheme70Day]([SentUTCDateTime])
CREATE NONCLUSTERED INDEX [IX_Time] ON [dbo].[IISLog]
(
[SentUTCDateTime] ASC
)
INCLUDE ([csHost],
[scStatus],
[timeTaken]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = ON, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [Scheme70Day]([SentUTCDateTime])
COMMIT TRANSACTION
這是最終吃掉我所有磁盤空間的代碼。理想情況下,我希望能夠將數據移出主文件組而不是創建副本。這不是一個需要所有的時間一個數據庫,以便offline solutions are also welcome...
爲防萬一你想知道你爲什麼沒有得到迴應,應該在http://dba.stackexchange.com/上提出這個問題。我已投票通過遷移到DBA來「關閉」這個問題,但目前只有2票(需要5個)。 – freefaller