I recently deleted some data from a table that was not needed and growing to too big a size with this query which provided to me by a support tech...
declare @mdate datetime set @mdate='04/04/2014' delete from CacheDiffResults where CacheID in (select CacheID from ComparisonCache where TimeStamp < @mdate) delete from ComparisonCache where TimeStamp < @mdate delete from CacheDiffResults where CacheID not in (select CacheID from ComparisonCache)
so it deleted all data before 04/04/2014. After I ran this query I saw that I gained back about a Gig of space from this table, then I ran a shrink on the database.
When I looked at the properties of the database the figures didn't add up? I'm no DBA (Networks) but I don't understand why the DB size and space left figures add up to 4G which is the size of SQL express 2005 DB?
Have a look at these screen shots...
As you can see 2569.73MB + 43.96MB != 4G
And what are these figures in the bottom picture? These don't add up to 4G either? Confused. Any help appreciated. TIA!