Tuesday , November 13 2018
Home / DataBase / SQL SERVER / View All Databases Information In SqlServer

View All Databases Information In SqlServer

 View All Databases Information In SqlServer:

There are different ways of listing all databases within an instance of SQL Server.

1.Sp_helpdb : Reports information about a specified database or all databases.

Example 1: exec Sp_helpdb

Output:

Sp_helpdb

Example 2: exec Sp_helpdb ‘Construction’

Sp_helpdb-databasename

2. sp_databases  : Reports all databases Names and Sizes

Example: EXEC sp_databases 

Output:

sp_databases

3. [sys].[databases] : Reports all databases details like databaseid,creation date,collation name etc

Example:  SELECT * FROM [sys].[databases]

Output:

databases.png

Thanks for reading this article if you like this article please share with your Friends.

Print Friendly, PDF & Email

Give us your valuable feedback

comments

About Murali

Hello everyone I am Software Developer having 3+ years of Experience in Microsoft Technologies and Others. My skills :- Asp.net, C#,Ado.net, SQL SERVER, web services, windows Service,Windows applications,HTML,CSS, JavaScript,JQuery,AnjularJs

Check Also

sql server backup script

Backup all databases in SQL Instance with one script

Backup: A copy of SQL Server data that can be used to restore and recover the …