sp_helpdb System Stored Procedure

Reports information about a specified database or all databases.

Syntax

sp_helpdb [dbname]

where

dbname
Specifies the database about which you want information.

Remarks

When dbname is specified, sp_helpdb reports on that database. When no parameter is supplied, sp_helpdb reports on all databases in master.dbo.sysdatabases.

Examples

A.    Help on a Single Database

This example displays the following information about the pubs database:

sp_helpdb pubs
B.    Help on All Databases

This example displays information about all databases on the SQL Server but does not include the device_fragments, size, and usage columns.

sp_helpdb

Permission

Execute permission defaults to the public group.

Tables Used

master.dbo.spt_values, master.dbo.sysdatabases, master.dbo.sysdevices, master.dbo.syslogins, master.dbo.sysusages

See Also

ALTER DATABASE sp_dboption
CREATE DATABASE sp_renamedb
sp_configure