Link to home
Start Free TrialLog in
Avatar of jamesh1031
jamesh1031Flag for United States of America

asked on

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
Avatar of Sirees
Sirees

Avatar of Aneesh
Hi jamesh1031,

Run
sp_spaceused @updateusage = 'TRUE'

and again check sp_spaceused

remember 1MB = 1024 KB


Aneesh R!
Avatar of jamesh1031

ASKER

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.
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
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you.
You're welcome.

 James