This script will show the detail of the every database of the sql server. It will show the space occupied by database.
sp_helpdb
It will show the all detail of the all databases in server.
If you want to see the specific database detail then you need to specify the database name also. query is given below:
sp_helpdb DatabaseName