Categories Tags

Programmatically Determine Database Recovery Model

Today I ran into an issue where the Object Explorer wasn't responding when I tried to get the properties of a database, but I was curious what the recovery model of my database was. Instead of waiting until the process which was blocking access to the database properties, I queried the database itself to see what the recovery model was.  The query to do so was fairly straightforward:

SELECT DATABASEPROPERTYEX(DB_NAME(), 'RECOVERY')

Posted in sql-server

Tags: