Wednesday, July 9, 2008

SQL Server: Lising all the Databses Names and Their Size

Following stored procedure lists all of the data bases names along with their sizes and remarks/

exec sp_databases

Column name Data type Description

DATABASE_NAME

sysname

Name of the database. In the Database Engine, this column represents the database name as stored in the sys.databases catalog view.

DATABASE_SIZE

int

Size of database, in kilobytes.

REMARKS

varchar(254)

For the Database Engine, this field always returns NULL.

No comments: