RE: SQL table disk size alert

From: linda deng[MS] (lideng@online.microsoft.com)
Date: 08/30/02


From: lideng@online.microsoft.com (linda deng[MS])
Date: Fri, 30 Aug 2002 08:13:44 GMT


Hi Tolga,

There is not a property which can be set to check the size of a table. You
can use the stored procedure sp_spaceused to obtain how much space the
table occupies, or you can query some system tables, for example,
'sysfiles', 'sysfilegroups' and 'sysindexes' to find the space usage of the
database, filegroup and the table. As for monitoring the table space, you
can execute a scheduled job to check the space usage, and fire an alert
when it reaches a threshold.

Here are some suggestions on this issue:
1. To monitor the table space usage. You can execute 'sp_helptext
sp_spaceused' in Master database to find some helpful scripts on how to
query the space usage information from the system tables, then you can
write your own monitor scripts.

2. To run a scheduled job to monitor the space usage.

Sincerely,

Linda Deng
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.