Get list Of All Data Base in a SQL Server

To get the list of all Data Base in your SQL Server use below Query:

  1. SELECT [NAME],DATABASE_ID,CREATE_DATE  
  2. FROM [SYS].[DATABASES]  
result
                                                                           Image 1.

We have 1 inbuilt Stored Procedure to get list of all Data Base in a SQL Server:
  1. EXEC sp_database  
dataabase
                                                                        Image 2.

Ebook Download
View all
Learn
View all