Actually it almost doubled in a few hours.
I am hosting relatively small database in sql server 2008. By hosting I mean I have an account at hosting provider. Last time I checked (call it hour zero) my DB was about 90MB big according to hosting data about disk space used. At the same time I did a backup and got backup file 93MB big.
Today I did some work with DB. Added few hundred record in a couple of tables. Nothing big, no blob fields nothing like that. Al this data shoud amount for less tha 0.1% of DB size. Right now, 7 hours after hour zero I did another backup and I noticed that now my DB occupies 160MB. Meaning it almost doubled in size. But the new backup file is actually smaller than the one at hour zero. It is 81MB.
I assume that SQL Server reserves space in increments and it can reserve empty space for later use. But to double the size of DB in a few hours is a bit to much. In the past it has grown incrementaly pretty much correlated with the amount of actual data stored in DB.
I did run some transaction on DB, but all executed OK so I think none of them was left hanging.
I also regularly run elaborate query which tells me how many rows, hom much used space and how much total space every table needs. Nothing unusual there. Another guess is that transaction log, which I admit do not know much about also takes disk space quota and I suspect this has grown out of proportions. Just to chek I have restored the 81MB backup file, which holds the 160Mb big database. I did shrink database on that restored database and it more than halved to 77MB. There are people who strongly advise against shrinking database, so I do not do that on production DB.
Can someone shed some light on what is going on or what should I keep my eye on?
EDIT: Just checked.
- Database files size: 131648 KB
- LOG size:32448 KB
So, I guess my file size has grown. But why?
SET STATISTICS TIME ON exec sp_MSforeachdb 'use [?]; EXEC sp_helpfile'
- Growth for DB: 1024KB
- Growth for log: 10%
BradC suggested I run a query, so I did and got:
db_name type logical_name TotalMB UsedMB FreeMB MaxSizeMB GrowthRate MyDb ROWS MyDB 128.6 73.4 55.2 1000.0 1MB MyDB LOG MyDB_log 31.7 3.2 28.5 NULL 10%