Technical FAQs

Ask a Question

How to obtain information about all databases in an instance of SQL Server

Any problem that requires getting information in regards to databases in an instance.  Finding the recovery model is one such example.

Product Line
SQL Server (all versions).

Any software with SQL Server as database engine.

Obtainnig information about all databases in an instance.

In SSMS either run sys.databases system view under Master database or run the following query:

     use master
     select * from sys.databases

Below is just a few columns returned by above query:
  • name
  • compatibility_level
  • user_access
  • is_read_only
  • state
  • recovery_model
Was this helpful?
What can we do to improve the information ?