Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

results of sp_helpdb

Status
Not open for further replies.

IT247

IS-IT--Management
May 26, 2006
88
US
Hello
just getting familiar with a few tsql commands
i did exec sp_helpdb northwind
and i see the "top" result reports db size of 3.63 MB

while the "bottom result" says

northwind size - 2688 KB
northwind_log size - 1024 KB

i don't see how the two agree???

 
There are 1024 Kilobytes in a mega byte.

Select Convert(Decimal(10,2), (2688 + 1024) / 1024.0)

Add the kilobytes. Divide by 1024 to get megabytes, then round to 2 decimal places.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
cool!
but why do u need to add the 1024?
 
If you add the 2 bottom figures it is rounded to the 3.63mb Sounds strange but it is right.

Wayne

Life is a big Roleplaying adventure.

Wayne
 
Add together the size of the database and the size of the log.

Total DB Size = (Size of Database File) + (Size of log file)

Since the sizes for the files were given in KB, you need to convert to MB.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
oh sorry
i forgot the log size
for a second i thought it was a trick conversion
thx to both
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top