• exec sp_helptext 'sp_spaceused'

    It is query sys.dm_db_partition_stats