The query linked to, and copied by, @Nelson is inaccurate: it ignores Indexed Views, Full Text Indexes, XML Indexes, etc.
If you want a query that will include everything without executing sp_spaceused
via sp_MSForEachTable
, then I have already posted two variations of it (one here on DBA.StackExchange and the other on StackOverflow) so I won't copy them here:
Per each Table / Indexed View: sp_spaceused - How to measure the size in GB in all the tables in SQLsp_spaceused - How to measure the size in GB in all the tables in SQL
Per each Index: space usage on sys.allocation_units and sp_spaceused