Re: Write query to find Recovery Model...

From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 06/09/04


Date: Wed, 9 Jun 2004 12:05:39 -0500

I didn't even think of master..sysdatabases. I went right for the unsupported & undocumented sp_MSforeachdb. Your solution is much better than mine. Still, either will work and both show techniques that are helpful.

-- 
Keith
"Hari Prasad" <hari_prasad_k@hotmail.com> wrote in message news:OOnGANkTEHA.164@TK2MSFTNGP12.phx.gbl...
> Hi,
> 
> Execute the below statement from query Analyzer:-
> 
> select Name,convert(sysname,DatabasePropertyEx(name,'Recovery'))  as
> Recovery from master..sysdatabases
> 
> or you can use the below procedure
> 
> sp_helpdb
> 
> Thanks
> Hari
> MCDBA
> 
> 
> "Brett Davis" <bdavis123@cox.net> wrote in message
> news:#vSuBIkTEHA.3988@TK2MSFTNGP10.phx.gbl...
> > Is there a query that i can write to find out the recovery models for all
> of
> > my system and user databases on my server?  There has to be a better way
> > then manually going through the databases one by one through Enterprise
> > Manager.
> >
> > I am using SQL Server 2000.
> >
> > Please advise...
> >
> > Cheers!
> > Brett
> >
> >
> 
> 


Relevant Pages

  • Re: EVA defragmentation.
    ... Have you ever tested your SAN using OS formatting of 64kb blocks? ... It might be a performance gain as SQL Server does IO in 8 extents of 8kb. ... > detach the user databases and then back them up. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Restore msdb and master db from files.
    ... applied service pack and attached the user databases. ... Install SQl server in same directory as old and apply the same service ... Stop SQL server and SQL Agent ...
    (microsoft.public.sqlserver.server)
  • Re: How to backup EM configuration?
    ... Do BACKUP DATABASE all system and user databases. ... After re-installing SQL Server perform RESTORE DATABASE command system and ... In my laptop, I have SQL Server ...
    (microsoft.public.sqlserver.programming)
  • Re: database log truncated, transaction log backup job failed
    ... When I had All user databases or all databases checked, ... sense to put msdb in full recovery mode I don't know, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: dts & transaction logging
    ... "Allan Mitchell" wrote: ... Because the DB is SQL Server 7 did you mean to specify these options select into/bulkcopy and trunc. ... Recovery models came in for SQL Server 2000 IIRC. ... Was this hint already available for the SQL7 bulk insert DTS task? ...
    (microsoft.public.sqlserver.dts)