Complete a Server Assessment – Database Information

Below you will find the code get information about the databases on the server.  Simply select the text and copy to the Clipboard.

SELECT CONVERT(VARCHAR(50),a.name) AS ‘Name’
, a.Create_date
, a.compatibility_level
, a.is_auto_create_stats_on AS ‘AutoStatsOn’
, a.is_auto_update_stats_on AS ‘AutoUpdateStatsOn’
, b.name AS ‘DBOwner’
FROM sys.databases a
INNER JOIN sys.syslogins b
ON a.owner_sid = b.sid

This code was written using the Microsoft SQL Server documentation.  If you find that this code was copied from else where, please let me know so I can give proper credit.