Understanding Database Size sp_spaceused / select name,filename, size from sys files

Can someone explain what I'm looking at here?

Using Windows Explorer: My .mdf file is 4,894,656 Kb
Using Windows Explorer: My log.ldf file is 1,024 kb

Running select name, filename, size from sysfiles I get:

.mdf 611,832 (what is this size? ...mb?)
log.ldf 128 (what is this size?)

Running sp_spaceused

database size 4780.94 mb
unallocated 3656.52 mb
reserved 1150384 kb
data 862776 kb
index size 274608 kb
unused 13000 kb
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
Hi jamesh1031,

sp_spaceused @updateusage = 'TRUE'

and again check sp_spaceused

remember 1MB = 1024 KB

Aneesh R!
jamesh1031Author Commented:
I don't have many permissions...what will @update='TRUE' do?

By the way, I don't think either one of you addressed my question.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Aneesh RetnakaranDatabase AdministratorCommented:
Sometimes, if you drop some indexes, sql server wont update the sysnindexes table, in order to do update the index information in sysindexes table run the above or dbcc updateusage ('urdbdb') WITH COUNT_ROWS
> Running select name, filename, size from sysfiles I get:
 > .mdf 611,832 (what is this size? ...mb?)
 > log.ldf 128 (what is this size?)

 If you look up sysfiles in the SQL help file, it says that size is in 8 KB pages.

 611832 * 8 KB = 4894656 KB
 128 * 8 KB = 1024 KB

 So, those are the same sizes that Windows Explorer gave you, but expressed in units of 8 KB.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jamesh1031Author Commented:
Thank you.
You're welcome.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.