T-SQL – Finding Database and Status Information

T-SQL – Finding Database and their Status Information

sp_help is a very handy system stored procedure to get database and their status level information for SQL Server. Following is the simple syntax to use it:

USE
master

EXEC
SP_HELPDB

Note:
The output of sys.databases gives very similar information to sp_helpdb, but sp_helpdb is much more compact and easier to read.

Use below script to get information using sys.databases

USE
master

SELECT
*
FROM
sys.databases;

Go

Advertisements

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