Tip of the Day : How to Determine the Recovery Model of a Database

Welcome to SQL Server Helper !!!

This site is intended for those who are beginning to use SQL Server as part of their day-to-day activities.  You will find in this site a collection of useful functions, triggers, stored procedures and tips and tricks related to SQL Server.

Should you have any comments or questions regarding this site or if you want to ask SQL Server-related questions, e-mail us here.

We hope we are able to help and we are glad to help!!!

SQL Server Tip of the Day - February 27, 2025

How to Determine the Recovery Model of a Database

To determine the recovery model for a database, run the following statement:

SELECT DATABASEPROPERTYEX('AdventureWorks', 'Recovery')

Values returned by this statement will be FULL for full recovery model, BULK_LOGGED for bulk logged model and SIMPLE for simple recovery model.  A returned value of NULL means the database name is not a valid database.

In SQL Server, there are 3 recovery models available, namely simple, full and bulk-logged.  Simple recovery model minimally logs most transactions, logging only the information required to ensure database consistency after a system crash or after restoring a data backup.  Full recover model fully logs all transactions and retains all the transaction log records until after they are backed up.  Bulk-logged recovery model minimally logs most bulk operations, such as index creation and bulk loads, while fully logging other transactions.

SQL Server 2012

SQL Server 2008

User-Defined Functions

Date Functions

A collection of useful user-defined functions that deal with dates.

String Functions

A collection of useful user-defined functions that deal with strings (varchar/char/nvarchar/nchar).

Tree Functions

A collection of useful user-defined functions that deal with tree or hierarchical design structures.

Table-Valued Functions

A collection of useful table-valued user-defined functions that can be used to join with other tables.

SQL Server Built-in Functions

A reference to all built-in functions available within SQL Server grouped into categories.

Tips and Tricks

A collection of useful SQL Server-related tips and tricks:

SQL Server Error Messages

A list of SQL Server error messages and for certain error messages, discusses ways on how to solve the error or work around them:

Frequently Asked Questions