Query to Retrive DB informations in sql server

Karthikanbarasan
Posted by Karthikanbarasan under Sql Server category on | Points: 40 | Views : 1860
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

Comments or Responses

Login to post response