Home All Groups Group Topic Archive Search About
Author
3 Aug 2006 3:18 PM
David
Hello,

How can I find the type of recovery set to a database from the system tables?

Thanks in advance

Author
3 Aug 2006 3:25 PM
Omnibuzz
try this..
select DATABASEPROPERTYEX('<dbname>','recovery')

Hope this helps.
--
-Omnibuzz (The SQL GC)

http://omnibuzz-sql.blogspot.com/
Author
3 Aug 2006 3:31 PM
David
I was wondering about the system table name where this value is stored.
Thanks for your response though ...

Show quote
"Omnibuzz" wrote:

> try this..
> select DATABASEPROPERTYEX('<dbname>','recovery')
>
> Hope this helps.
> --
> -Omnibuzz (The SQL GC)
>
> http://omnibuzz-sql.blogspot.com/
>
>
Author
3 Aug 2006 4:27 PM
Kalen Delaney
What version are you running?
In SQL 2005 you can run this:

select name, recovery_model_desc from sys.databases

--
HTH
Kalen Delaney, SQL Server MVP


Show quote
"David" <Da***@discussions.microsoft.com> wrote in message
news:458A1E14-B894-49F1-B276-E16B6C2AA330@microsoft.com...
>I was wondering about the system table name where this value is stored.
> Thanks for your response though ...
>
> "Omnibuzz" wrote:
>
>> try this..
>> select DATABASEPROPERTYEX('<dbname>','recovery')
>>
>> Hope this helps.
>> --
>> -Omnibuzz (The SQL GC)
>>
>> http://omnibuzz-sql.blogspot.com/
>>
>>
Author
3 Aug 2006 4:32 PM
David
Thanks for your response. I am using SQL Server 2000

Show quote
"Kalen Delaney" wrote:

> What version are you running?
> In SQL 2005 you can run this:
>
> select name, recovery_model_desc from sys.databases
>
> --
> HTH
> Kalen Delaney, SQL Server MVP
>
>
> "David" <Da***@discussions.microsoft.com> wrote in message
> news:458A1E14-B894-49F1-B276-E16B6C2AA330@microsoft.com...
> >I was wondering about the system table name where this value is stored.
> > Thanks for your response though ...
> >
> > "Omnibuzz" wrote:
> >
> >> try this..
> >> select DATABASEPROPERTYEX('<dbname>','recovery')
> >>
> >> Hope this helps.
> >> --
> >> -Omnibuzz (The SQL GC)
> >>
> >> http://omnibuzz-sql.blogspot.com/
> >>
> >>
>
>
>
Author
3 Aug 2006 5:30 PM
Kalen Delaney
In SQL 2000, the recovery model is encoded in the bitstring in
sysdatabases.status. If you know how to do bit arithmetic, you can determine
which databases have the 4 bit on, and those are the databases in SIMPLE
mode. A database with the 4 bit off and the 8 bit on is in BULK_LOGGED. A
database with neither bit on is in FULL.

It's much simpler to use the function Omnibuzz supplied:

select name, databasepropertyex(name, 'recovery')
from sysdatabases

--
HTH
Kalen Delaney, SQL Server MVP


Show quote
"David" <Da***@discussions.microsoft.com> wrote in message
news:1CCFF311-2ADD-4235-B591-C6068D8C7A87@microsoft.com...
> Thanks for your response. I am using SQL Server 2000
>
> "Kalen Delaney" wrote:
>
>> What version are you running?
>> In SQL 2005 you can run this:
>>
>> select name, recovery_model_desc from sys.databases
>>
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>>
>>
>> "David" <Da***@discussions.microsoft.com> wrote in message
>> news:458A1E14-B894-49F1-B276-E16B6C2AA330@microsoft.com...
>> >I was wondering about the system table name where this value is stored.
>> > Thanks for your response though ...
>> >
>> > "Omnibuzz" wrote:
>> >
>> >> try this..
>> >> select DATABASEPROPERTYEX('<dbname>','recovery')
>> >>
>> >> Hope this helps.
>> >> --
>> >> -Omnibuzz (The SQL GC)
>> >>
>> >> http://omnibuzz-sql.blogspot.com/
>> >>
>> >>
>>
>>
>>

AddThis Social Bookmark Button