Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Bex
Aged Yak Warrior
580 Posts |
Posted - 2009-11-16 : 04:58:58
|
I want to get the file sizes for a database. I know I use SELECT * FROM sys.database_files, however, the file size in in 8KB pages. How do I translate this into file size in KB or MB???E.g. File has been allocated 1000MB, in sys.database_files, this value equals 128000?ThanksHearty head pats |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-11-16 : 05:06:32
|
A page has 8192 bytes (8096 bytes data, 96 bytes header).Btw. you can get fileinformation via sp_helpfile. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-16 : 05:11:18
|
SELECT size/128. as size_in_mb,* FROM sys.database_filesMadhivananFailing to plan is Planning to fail |
 |
|
Bex
Aged Yak Warrior
580 Posts |
Posted - 2009-11-16 : 05:15:34
|
Thank you both, especially for your prompt replieshave a good day!Hearty head pats |
 |
|
|
|
|