Monday, July 23, 2012

List Recovery Model for all databases in SQL Server 2000

Two ways I used to find it. But the best one is the first one listed.




SELECT Name,

DATABASEPROPERTYEX (Name,'RECOVERY') AS [Recovery Model]

FROM master.dbo.sysdatabases

OR


sp_msforeachdb

'use [?] select ''?'' as DatabaseName, DATABASEPROPERTYEX(N''?'', N''RECOVERY'')'


MvM

No comments:

Post a Comment