To know the size of data base attached in management studio

CREATE TABLE #DatabaseInfo (name varchar(100),
db_size varchar(255),
owner varchar(20),
… dbid smallint,
created smalldatetime,
status varchar(250),
compatibility_level varchar(250))

INSERT INTO #DatabaseInfo
exec SP_HELPDB

SELECT *
FROM #DatabaseInfo

drop table #DatabaseInfo

Advertisements
This entry was posted in SQL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s