Technical FAQs

Ask a Question

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

Issue
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).

Environment
Any software with SQL Server as database engine.

Cause
Obtainnig information about all databases in an instance.

Resolution
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 ?