To get the list of all Data Base in your SQL Server use below Query:
- SELECT [NAME],DATABASE_ID,CREATE_DATE
- FROM [SYS].[DATABASES]

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

Image 2.
In this blog you will learn how to 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:


DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · SQL ServerBasics of SQL ServerDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.