SELECT db.name AS database_name,
sps.name AS owner,
db.create_date,
db.compatibility_level,
db.recovery_model_desc
FROM sys.databases db INNER JOIN sys.server_principals sps
ON db.owner_sid = sps.sid
How to Retrive DB informations in sql server
This blog shows on how to Retrive DB informations in sql server.


Join the conversation! Your thoughts help the community grow.