To get a summary of the amount of storage space used by a database, execute sp_spaceused in the database:
sp_spaceused
database_name database_size ------------------------------ ------------- pubs2 2.0 MB reserved data index_size unused ------------- ------------- --------------- -------- 1720 KB 536 KB 344 KB 840 KB
Table 6-2 describes the columns in the report.
The sum of the values in the unused, index_size, and data columns should equal the figure in the reserved column. Subtract reserved from database_size to get the amount of unreserved space. This space is available for new or existing objects that grow beyond the space that has been reserved for them.
By running sp_spaceused regularly, you can monitor the amount of database space available. For example, if the reserved value is close to the database_size value, you are running out of space for new objects. If the unused value is also small, you are running out of space for additional data as well.
Copyright © 2005. Sybase Inc. All rights reserved. |