Sometimes Microsoft SQL Server throws an error referring to sys.databases, suggesting we check the information in the specified column.
To see what exactly the server doesn't like, open Microsoft SQL Management Studio, click the "Database Engine Query" button and enter the following query:
SELECT * FROM sys.databases;
Then click "Execute".
In the output you'll see columns with the state and rows — one row per attached database. If you need to pull out a specific column from a specific database, you can specify them in the SELECT conditions. For example, let's pull out the "log_reuse_wait_desc" column from the "mybase" database:
SELECT name,log_reuse_wait_desc FROM sys.databases WHERE name='mybase';
Applies to: Microsoft SQL Server 2005, 2008
Comments