DATABASEPROPERTYEX

It is used to collect more information about database like its properties.
Like it can be used to check the recovery model, online/offline status, compatibility level, auto shrink, published/subscribed, version etc.,

SELECT name,
DATABASEPROPERTYEX(name, ‘Recovery’),
DATABASEPROPERTYEX(name, ‘Status’)
FROM master.dbo.sysdatabases

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>