Microsoft KB Archive/268784

= INF: SQL Enterprise Manager Rounds Database Size =

Article ID: 268784

Article Last Modified on 11/14/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q268784



SUMMARY
The properties pane for a database in the SQL Enterprise Manager (SEM) displays the database size rounded to whole megabytes. For example, if the database size is actually 1.5 MB, it displays as 2 MB.



MORE INFORMATION
This behavior is by design. SQL Distributed Management Objects (DMO) returns an integer, not a floating-point value. Consider the following example: CREATE DATABASE test ON ( NAME = test_dat, FILENAME = 'c:\mssql7\data\test.mdf',  SIZE = 1693 KB  ) LOG ON ( NAME = test_log, FILENAME = 'c:\mssql7\data\test.ldf',  SIZE = 1135 KB ) When the preceding statements are run Query Analyzer returns:

The CREATE DATABASE process is allocating 1.69 MB on disk 'test2_dat'. The CREATE DATABASE process is allocating 1.13 MB on disk 'test2_log'. However, the SQL Enterprise Manager returns whole database sizes, rounded off to the closest integer value.

Use the SQL Query Analyzer to get more accurate fractional database sizes.

The database size returned is an accurate floating-point number when you use the following in SQL Query Analyzer: sp_helpdb 'DB_NAME'

-or-

use 'DB_NAME' sp_spaceused

Additional query words: database sizes, SQL Enterprise Manager

Keywords: kbinfo kbpending KB268784

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.