February 26, 2004 at 7:36 am
I've looked, apperently not hard enough, but not found how to query (in T-SQL) to determine the current recovery model?
Once you understand the BITs, all the pieces come together
February 26, 2004 at 7:40 am
select DATABASEPROPERTYEX( yourdb , 'Recovery')
February 26, 2004 at 7:43 am
Thanks Allen, this works perfect for me.
BTW, is the setting in a System table anywhere?
Once you understand the BITs, all the pieces come together
February 26, 2004 at 8:03 am
I am not aware of that. Sorry.
February 26, 2004 at 9:39 am
Try
ALTER DATABASE YourDB SET RECOVERY SIMPLE
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
February 26, 2004 at 10:08 am
on sysdatabases the RECOVERY MODEL is a combination of the status Field
values 4 and 8 !!!
* Noel
February 26, 2004 at 11:04 am
Thanks Noel...
select
Case Status & (4+8)
When 0 Then 'FULL'
When 4 Then 'BULK_LOGGED'
When 8 Then 'SIMPLE'
End as RecoveryModel,
*
from Master..SysDatabases
Once you understand the BITs, all the pieces come together
June 21, 2004 at 3:35 pm
I'm working on a procedure that collects all this data into one location so I have to use your select statements.
Just wanted to mention that I've come up with a couple of databases that return a 12 and are SIMPLE recovery models. I've gotten it to work by adding another case, but I'm wondering if you have any ideas?
Thanks.
----------------
Jim P.
A little bit of this and a little byte of that can become bloatware.
----------------
Jim P.
A little bit of this and a little byte of that can cause bloatware.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply