FILEUSAGE

File space usage

ROWID

(db_name, logical_name)

Columns

Name Data Type Description
database_id long Database ID
file_id long File ID
filegroup_id long Filegroup ID; 0 = Log file
db_name string(260) Database name
logical_name string(260) Logical name of file
fg_name string(260) Filegroup name; LOG = Log file
suspect_pages long Number of suspect pages; sourced from msdb..suspect_pages
has_storage string(4) Whether an extent has been allocated yet
status string(124) File state, including (but not limited to):
  • ONLINE
  • RESTORING
  • RECOVERING
  • RECOVERY_PENDING
  • SUSPECT
  • OFFLINE
  • DEFUNCT
  • DB ONLINE
  • DB RESTORING
  • DB RECOVERING
  • DB RECOVERY_PENDING
  • DB SUSPECT
  • DB EMERGENCY
  • DB OFFLINE
  • DB COPYING
  • DB OFFLINE_SECONDARY
  • UNAVAILABLE
used_pct double % of total usable space (database + OS) that is used
is_sparse string(4) Whether this is a sparse file (i.e. for snapshots)
is_read_only string(4) Whether the file is marked read-only
used_space double Amount of space used in the file, in bytes
free_space double Unused space, in bytes
total_space double Total allocatable size for the file, in bytes
db_used double Amount of space (database) used in the file, in bytes
db_free double Unused space (database), in bytes
db_unusable double Amount of unusable space (database), in bytes
db_total double Total allocated size (database) for the file, in bytes
os_used double Amount of space (OS) used in the file, in bytes
os_free double Unused space (OS), in bytes; if OS free space is too small for next (grown) file extent, then that will be shown under os_unusable, and this value will be 0
os_unusable double Amount of unusable space (OS), in bytes; for example, OS free space that is too small for next (grown) file extent
os_total double Total allocatable size (OS) for the file, in bytes
is_growth_unlimited string(4) Whether growth is unlimited (subject to OS space) for the file
os_pct_growth long % growth applied to new file extents, at the OS level; 0 = Not percentage-based growth
os_growth double Absolute growth applied to new file extents, at the OS level, in bytes; 0 = Percentage-based growth
os_next_allocation double Absolute size, in bytes, of next (grown) file extent allocation at OS level; calculated by Surveillance using many factors
max_size double Maximum size, in bytes, imposed on the file; 0 = No growth allowed, -1 = Unlimited growth (subject to OS space)
db_used_pct double % of total usable space (database) that is used
physical_name string(524) Physical name (path) of the file
MERGESTATUS long Internal-use merge status; created by Surveillance
DB_USED_RATE double Additional amount of space (database), in bytes, used in the file per second, in interval
DB_USED_RATE_AVG double Average additional amount of space (database), in bytes, used in the file per second, since collection started
DB_USED_MB double Amount of space (database) used in the file, in megabytes
OS_USED_MB double Amount of space (OS) used in the file, in megabytes
FREE_MB double Unused space, in megabytes
DB_USED_DELTA double Delta amount of space (database) used in the file, in bytes
DB_USED_DELTA_AVG double Average of delta amount of space (database), in bytes, used in the file, since collection started
OS_FREE_MB double Unused space (OS), in megabytes; see os_free for more information
OS_NEXT_ALLOC_MB double Absolute size, in megabytes, of next (grown) file extent allocation at OS level; calculated by Surveillance using many factors

Requirements

Attributes: None
Minimum database version: 9.0