SQL SERVER –Different Ways to Find Recovery Model for Database

 This is a very easy method and it gives all the database information in one script.

SELECT name AS [Database Name],
recovery_model_desc AS [Recovery Model] FROM sys.databases
GO

SQL SERVER - Four Different Ways to Find Recovery Model for Database rm3

Method 4

This method provides only one database at a time.

SELECT 'ADVENTUREWORKS' AS [Database Name],
DATABASEPROPERTYEX('ADVENTUREWORKS''RECOVERY')
AS [Recovery Model] GO

SQL SERVER - Four Different Ways to Find Recovery Model for Database rm4

My recommendation

Comments

Popular posts from this blog

CREATE VIEW SQL: Modifying views in SQL Server

Transfer logins and passwords between instances of SQL Server