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 |
joni
Yak Posting Veteran
50 Posts |
Posted - 2007-01-09 : 13:25:25
|
Hi Gurus,I need to know any informations about my database like size, free space, etc... Where can I find this informations?Thanks,Joni |
|
Kristen
Test
22859 Posts |
|
joni
Yak Posting Veteran
50 Posts |
Posted - 2007-01-09 : 13:39:57
|
Thanks Kristen..... |
 |
|
thecoffeeguy
Yak Posting Veteran
98 Posts |
Posted - 2007-01-09 : 13:55:43
|
quote: Originally posted by Kristen http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61762and maybe:http://www.databasejournal.com/scripts/print.php/1450801Kristen
This is going to sound incredibaly newbish (but I am!)...but if I wanted to run the second script for example, looks like I need to change a few things? That right?or do I just select the DB and let her rip?Thanks. |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-01-09 : 14:21:58
|
"looks like I need to change a few things?"Don't think so.Make sure you are in the right database, then just execute the scriptIt creates a Temporary TableCursor's round all the Table namesFor each table inserts into Temp Table the Size info (from the system stored procedure sp_SpaceUsed)and then it outputs the data from the Temp Table twice - first resultset sorted by Size, second by Table NameI used to use the second one (well, a variation of it) until MVJ wrote his (the first one), and now I use a variation of that instead (I've added an ORDER BY parameter (for any of: 'ROWS' 'TOTAL SIZE' 'DATA SIZE' 'INDEX SIZE' 'UNUSED SIZE' 'ROW AVERAGE' 'DATA AVERAGE' 'INDEX AVERAGE' 'UNUSED AVERAGE' 'DATA PERCENT' 'INDEX PERCENT' 'UNUSED PERCENT' 'NAME')Kristen |
 |
|
|
|
|