惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
A
About on SuperTechFans
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
博客园 - Franky
D
Docker
Martin Fowler
Martin Fowler
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Last Week in AI
Last Week in AI
U
Unit 42
F
Fortinet All Blogs
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
P
Proofpoint News Feed
月光博客
月光博客
G
Google Developers Blog

博客园 - 旴江老段

委托和事件的区别 如何开发和维能hold住全场的软件 什么样的软件才能hold住全场 SNOOP 开发WPF的好工具 被遗忘的事物 前台线程和后台线程(Foreground and Background Threads) runtime binding policy AsyncCallback方法和主线程怎么同步呢? Remoting Practice Sample Using Custom Assemblies with Reports 为什么32位的CPU?为什么32位的CPU只能支持4G的内存呢? 学习SSL和certificate的好网页 Wix Upgrade怎么判断是否更新 学WIX的好网站 SELECT @local_variable (Transact-SQL) sql server try catch and transaction的几个要点 使SQL关键字变大写的小工具 Assert.AreEqual .net 异步调用机制
Checking space used in a database
旴江老段 · 2011-04-20 · via 博客园 - 旴江老段

Checking space used in a database

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.

Table 6-2: Columns in sp_spaceused output

Column

Description

database_name

The name of the database being examined.

database_size

The amount of space allocated to the database by create database or alter database.

reserved

The amount of space that has been allocated to all the tables and indexes created in the database. (Space is allocated to database objects inside a database in increments of 1 extent, or 8 pages, at a time.)

dataindex_size

The amount of space used by data and indexes.

unused

The amount of space that has been reserved but not yet used by existing tables and indexes.

The sum of the values in the unusedindex_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.

this article is copied from  http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sag2/html/sag2/sag2200.htm