Database status values in sysdatabases

Status control bits in the sysdatabases table


Decimal                       Hex                             Status

4                                  0×04                            select into/bulkcopy; can be set by user

8                                  0×08                            trunc log on chkpt; can be set by user

16                                0×10                            no chkpt on recovery; can be set by user

32                                0×20                            Database created with for load option, or crashed while loading database, instructs recovery not to proceed

256                              0×100                          Database suspect; not recovered; cannot be opened or used; can be dropped only with dbcc dbrepair

512                              0×200                          ddl in tran; can be set by user

1024                            0×400                          read only; can be set by user

2048                            0×800                          dbo use only; can be set by user

4096                            0×1000                        single user; can be set by user

8192                            0×2000                        allow nulls by default; can be set by user



There is also an undocumented value which is 320, this is very similar to 256 i.e. database suspect, but it allows you to perform certain functions on the db.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Security Code: