DBUSAGE

Database space usage

Comments

Log file space metrics are shown under an artificial LOG filegroup for each database.

ROWID

(db_name)

Columns

Name Data Type Description
database_id long Database ID
db_name string(260) Database name
status string(124) Database state, including (but not limited to):
  • ONLINE
  • RESTORING
  • RECOVERING
  • RECOVERY_PENDING
  • SUSPECT
  • EMERGENCY
  • OFFLINE
  • COPYING
  • OFFLINE_SECONDARY
user_access string(36) User access setting (MULTI_USER, RESTRICTED_USER, SINGLE_USER)
log_reuse_wait string(68) Reuse of transaction log space is waiting on this, as of last checkpoint, if applicable
is_read_only string(4) Whether database is marked read-only
snapshot_count long Number of database snapshots that have this database as the source
is_snapshot string(4) Whether this is a database snapshot
snapshot_source_db_id long Source database, if this is a database snapshot
mirroring_role string(36) Mirror role of this database (MIRROR, PRINCIPAL), if applicable
is_auto_shrink string(4) Whether auto shrink is enabled on the database; this is often problematic
is_auto_close string(4) Whether auto close is enabled on the database
create_date time Time when the database was created or renamed; tempdb is recreated on each startup
data_used_pct double % of total usable space (database + OS) that is used by (data) filegroups in the database
data_filegroup_count long Number of (data) filegroups in the database (excludes log files)
data_file_count long Total number of files over all (data) filegroups in the database
data_notonline_file_count long Total number of files that are not online, over all (data) filegroups in the database
data_readonly_file_count long Total number of files that are marked read-only, over all (data) filegroups in the database
data_suspect_file_count long Total number of files with suspect pages, over all (data) filegroups in the database
data_suspect_pages long Number of suspect pages in the database
data_has_storage string(4) Whether an extent has been allocated yet in every file in every (data) filegroup in the database
data_is_sparse string(4) Whether any file in any (data) filegroup of the database is a sparse file (i.e. for snapshots)
data_used_space double Amount of space used by (data) filegroups in the database, in bytes
data_max_free_space double Maximum unused space, in bytes, in total over all OS volumes holding files from (data) filegroups in the database
data_min_free_space double Minimum unused space, in bytes, in total over all OS volumes holding files from (data) filegroups in the database
data_max_total_space double Maximum allocatable size for the database, in bytes, in total over all OS volumes holding files from (data) filegroups in the database
data_min_total_space double Minimum allocatable size for the database, in bytes, in total over all OS volumes holding files from (data) filegroups in the database
data_db_used double Amount of space (database) used by (data) filegroups in the database, in bytes
data_db_free double Unused space (database) for (data) filegroups in the database, in bytes
data_db_unusable double Amount of unusable space (database) for (data) filegroups in the database, in bytes
data_db_total double Total allocated size (database) over all (data) filegroups in the database, in bytes
data_os_used double Amount of space (OS) used by (data) filegroups in the database, in bytes
data_max_os_free double Maximum unused space (OS), in bytes, in total over all OS volumes holding files from (data) filegroups in the database; if OS free space is too small for next (grown) file extent for a file, then that will be shown under os_unusable, and the value considered here, for that file on that volume, will be 0
data_min_os_free double Minimum unused space (OS), in bytes, in total over all OS volumes holding files from (data) filegroups in the database; if OS free space is too small for next (grown) file extent for a file, then that will be shown under os_unusable, and the value considered here, for that file on that volume, will be 0
data_max_os_unusable double Maximum amount of unusable space (OS), in bytes, in total over all OS volumes holding files from (data) filegroups in the database; for example, OS free space that is too small for next (grown) file extent
data_min_os_unusable double Minimum amount of unusable space (OS), in bytes, in total over all OS volumes holding files from (data) filegroups in the database; for example, OS free space that is too small for next (grown) file extent
data_max_os_total double Maximum allocatable size (OS), in bytes, in total over all OS volumes holding files from (data) filegroups in the database
data_min_os_total double Minimum allocatable size (OS), in bytes, in total over all OS volumes holding files from (data) filegroups in the database
data_is_growth_unlimited string(4) Whether any file in any (data) filegroup in the database has growth unlimited
data_max_size double Total maximum size, in bytes, imposed on the database over all data files; 0 = On all data files, no growth allowed or unlimited growth (subject to OS space); the meaning of this value will be ambiguous if the database has a mix of unlmited growth and limited growth data files
data_db_used_pct double % of total usable space (database) that is used by (data) filegroups in the database
log_used_pct double % of total usable space (database + OS) that is used by the log files in the database
log_file_count long Total number of log files in the database
log_notonline_file_count long Total number of log files in the database that are not online
log_readonly_file_count long Total number of log files in the database that are marked read-only
log_used_space double Amount of space used by log files in the database, in bytes
log_max_free_space double Maximum unused space, in bytes, in total over all OS volumes holding log files in the database
log_min_free_space double Minimum unused space, in bytes, in total over all OS volumes holding log files in the database
log_max_total_space double Maximum allocatable size for the database, in bytes, in total over all OS volumes holding log files in the database
log_min_total_space double Minimum allocatable size for the database, in bytes, in total over all OS volumes holding log files in the database
log_db_used double Amount of space (database) used by log files in the database, in bytes
log_db_free double Unused space (database) for log files in the database, in bytes
log_db_unusable double Amount of unusable space (database) for log files in the database, in bytes
log_db_total double Total allocated size (database) for log files in the database, in bytes
log_os_used double Amount of space (OS) used by log files in the database, in bytes
log_max_os_free double Maximum unused space (OS), in bytes, in total over all OS volumes holding log files in the database; if OS free space is too small for next (grown) file extent for a file, then that will be shown under os_unusable, and the value considered here, for that file on that volume, will be 0
log_min_os_free double Minimum unused space (OS), in bytes, in total over all OS volumes holding log files in the database; if OS free space is too small for next (grown) file extent for a file, then that will be shown under os_unusable, and the value considered here, for that file on that volume, will be 0
log_max_os_unusable double Maximum amount of unusable space (OS), in bytes, in total over all OS volumes holding log files in the database; for example, OS free space that is too small for next (grown) file extent
log_min_os_unusable double Minimum amount of unusable space (OS), in bytes, in total over all OS volumes holding log files in the database; for example, OS free space that is too small for next (grown) file extent
log_max_os_total double Maximum allocatable size (OS), in bytes, in total over all OS volumes holding log files in the database
log_min_os_total double Minimum allocatable size (OS), in bytes, in total over all OS volumes holding log files in the database
log_is_growth_unlimited string(4) Whether any log file in the database has growth unlimited
log_max_size double Total maximum size, in bytes, imposed on the database over all log files; 0 = On all log files, no growth allowed or unlimited growth (subject to OS space); the meaning of this value will be ambiguous if the database has a mix of unlmited growth and limited growth log files
log_db_used_pct double % of total usable space (database) that is used by log files in the database
MERGESTATUS long Internal-use merge status; created by Surveillance
DATA_DB_USED_RATE double Additional amount of space (database), in bytes, used by (data) filegroups in the database per second, in interval
DATA_DB_USED_RATE_AVG double Average additional amount of space (database), in bytes, used by (data) filegroups in the database per second, since collection started
DATA_DB_USED_MB double Amount of space (database) used by (data) filegroups in the database, in megabytes
DATA_OS_USED_MB double Amount of space (OS) used by (data) filegroups in the database, in megabytes
DATA_MAX_FREE_MB double Maximum unused space, in megabytes, in total over all OS volumes holding files from (data) filegroups in the database
DATA_DB_USED_DELTA double Delta amount of space (database) used by (data) filegroups in the database, in bytes
DATA_DB_USED_DELTA_AVG double Average of delta amount of space (database), in bytes, used by (data) filegroups in the database, since collection started
LOG_DB_USED_RATE double Additional amount of space (database), in bytes, used by log files in the database per second, in interval
LOG_DB_USED_RATE_AVG double Average additional amount of space (database), in bytes, used by log files in the database per second, since collection started
LOG_DB_USED_MB double Amount of space (database) used by log files in the database, in megabytes
LOG_OS_USED_MB double Amount of space (OS) used by log files in the database, in megabytes
LOG_MAX_FREE_MB double Maximum unused space, in megabytes, in total over all OS volumes holding log files in the database
LOG_DB_USED_DELTA double Delta amount of space (database) used by log files in the database, in bytes
LOG_DB_USED_DELTA_AVG double Average of delta amount of space (database), in bytes, used by log files in the database, since collection started

Requirements

Attributes: None
Minimum database version: 9.0