January 8, 2009 at 3:39 pm
HI,
I have 2 databases with the following status in sysdatabases (4194320, 4194328). Where I can find the definition of these status?
Thanks,
January 8, 2009 at 4:14 pm
The BOL article on sysdatabases.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 8, 2009 at 5:04 pm
see the thread here:http://www.sqlservercentral.com/Forums/Topic326235-5-2.aspxit's got a complete explanation on the flags., as well as a code snippet to plug in your status and get the results.
Lowell
January 8, 2009 at 11:43 pm
In BOL; I do not found status value like 4194320, 4194328.
What is the status of the database?
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
January 9, 2009 at 12:13 am
It goes like this..
4194320 = 4194304 + 16
4194304 = autoshrink
16 = torn page detection
4194328 = 4194304 + 16 + 8
4194304 = autoshrink
16 = torn page detection
8 = trunc. log on chkpt
August 20, 2012 at 12:44 am
I use the bitwise and operator (&) to pull the status column apart for inspection.
For example:
SELECT
name
FROM
master..sysdatabases
WHERE
name NOT IN ('tempdb')
AND
status & 512 <> 512
512 means the database is offline. This query returns a list of database names where the database is online.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply