Created
October 19, 2015 04:07
-
-
Save smarenich/2bed3c419ba137b65366 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table #space | |
( | |
tn varchar(128), | |
rows varchar(128), | |
reserved varchar(128), | |
data varchar(128), | |
indexp varchar(128), | |
unused varchar(128) | |
) | |
insert #space | |
exec sp_msforeachtable 'exec sp_spaceused ''?''' | |
select * from #space order by convert(int, substring(reserved, 1, len(reserved)-3)) desc | |
drop table #space |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment