I have a table that stores every email we get in a day... about 5,000.
CREATE TABLE [dbo].[tbEmailMessage] (
[EmailMessageID] [int] IDENTITY (1, 1) NOT NULL ,
[SendDate] [dtDatetime] NOT NULL ,
[SendTime] [dtDatetime] NOT NULL ,
[SenderName] [dtString] NOT NULL ,
[SenderEmail] [dtString] NOT NULL ,
[Message] [text] ,
[RawMessage] [text] ,
[Timestamp] [timestamp] NOT NULL ,
CONSTRAINT [PK_EmailMessage] PRIMARY KEY CLUSTERED
(
[EmailMessageID]
) WITH FILLFACTOR = 90 ON [EMAIL_DATA]
) ON [EMAIL_DATA] TEXTIMAGE_ON [EMAIL_DATA]
GO
Currently, this filegroup is 10G. The "RawMessage" column stores any attachments that came with the email, while the "Message" column stores only the body of the email. Space is becoming an issue and we want to drop the "RawMessage" column. I successfully issued the following command:
alter table tbEmailMessage drop column RawMessage
I expected the TaskPad view in Enterprise Manager to show me that we had freed at least 5 G, but that wasn't the case. I tried to shrink the one datafile that makes up the filegroup, but there was no decrease in size.
Can someone give me the poop on getting SQL to release that space that I'm not using anymore? BOL is light in this department.
thanks,
greg