Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 calculate database size Rate Topic Display Mode Topic Options
Author
 Message
 Posted Friday, September 27, 2013 1:29 PM
 Valued Member Group: General Forum Members Last Login: Wednesday, May 6, 2015 10:25 AM Points: 62, Visits: 451
 Friends,how can i calculate database size with this information:Processed 8192240 pages for database 'DBOLTP', file 'rm' on file 1. ??(8192240 *8) = 65537920 (bytes) / 1024 / 1024 = 62MB?Thanks...
Post #1499571
 Posted Saturday, September 28, 2013 12:22 PM
 SSC-Addicted Group: General Forum Members Last Login: Today @ 7:23 AM Points: 440, Visits: 813
 Are you looking too deep into a simple problem? Would this not provide the answer you need?`select name, size from sys.master_files;`
Post #1499707
 Posted Sunday, September 29, 2013 4:27 PM
 SSC-Forever Group: General Forum Members Last Login: Today @ 7:14 AM Points: 42,072, Visits: 39,455
 LOVER OF SQL (9/27/2013)Friends,how can i calculate database size with this information:Processed 8192240 pages for database 'DBOLTP', file 'rm' on file 1. ??(8192240 *8) = 65537920 (bytes) / 1024 / 1024 = 62MB?Thanks...Any size given in pages can be converted to binary (1024^3) MB just by dividing by 128. --Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column." Helpful Links:How to post code problemsHow to post performance problems
Post #1499790
 Posted Sunday, September 29, 2013 4:32 PM
 SSC-Forever Group: General Forum Members Last Login: Saturday, December 3, 2016 5:18 AM Points: 45,619, Visits: 44,147
 That won't allow you to calculate the size of the database files. It will allow you to calculate the total size of the allocated extents in the database. If you want the size of the files, query sys.database_files. Gail ShawMicrosoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild: Discussions on DB performance with occasional diversions into recoverabilityWe walk in the dark places no others will enterWe stand on the bridge and no one may pass
Post #1499791
 Posted Monday, October 7, 2013 11:59 AM
 Forum Newbie Group: General Forum Members Last Login: Tuesday, November 5, 2013 10:40 AM Points: 3, Visits: 38
 Each time I have been asked to return the size of the databases for the systems I manage, I tend to use this query. It returns the size for all databases found in master.`USE mastergoexec sp_helpdb `Here is the relevant Microsoft Article on it.
Post #1502288
 Posted Wednesday, October 9, 2013 12:18 AM
 SSC-Addicted Group: General Forum Members Last Login: Today @ 7:23 AM Points: 440, Visits: 813
 saso_yns (10/8/2013)نقل عفش لدول الخليجنقل عفش بين مدن المملكةنقل عفش الى دول الخليجahhhhh......Everything seems so much clearer now....
Post #1502923
 Posted Monday, October 14, 2013 5:18 AM
 SSC Rookie Group: General Forum Members Last Login: Tuesday, March 4, 2014 8:34 AM Points: 43, Visits: 178
 Execute `EXEC sp_spaceused` towards the database, the reserved size shows the exact size of the database (Even the backup size for the database)
Post #1504404

 Permissions