Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
franco
Constraint Violating Yak Guru
255 Posts |
Posted - 2002-09-26 : 04:35:49
|
| I need to know the meaning of the status bit in sysdatabases because BOL only reports some of them.For SQL 7.0 SP1 I have some database with a status bit equal to 0 (zero) and equal to 12.For SQL 2000 SP2 I have some database with a status bit equal to 0 (zero),24,20 and 1073741840.So I would really appreciate if someone can explain the meaning of these status bits.Thank you very much.Franco |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-09-26 : 06:39:56
|
| Have you looked in Inside SQL Server?Things like this are usually held in master..spt_valuesfor v7 sp2DATABASE STATUS 0 D NULL NULL 0autoclose 1 D NULL NULL 0select into/bulkcopy 4 D NULL NULL 0trunc. log on chkpt. 8 D NULL NULL 0torn page detection 16 D NULL NULL 0loading 32 D NULL NULL 0pre recovery 64 D NULL NULL 0recovering 128 D NULL NULL 0not recovered 256 D NULL NULL 0offline 512 D 0 1 0read only 1024 D NULL NULL 0dbo use only 2048 D NULL NULL 0single user 4096 D NULL NULL 0pending upgrade 16384 D NULL NULL 0emergency mode 32768 D NULL NULL 0missing files 262144 D NULL NULL 0autoshrink 4194304 D NULL NULL 0ALL SETTABLE OPTIONS 4218397 D NULL NULL 0cleanly shutdown 1073741824 D NULL NULL 0==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-09-26 : 08:28:53
|
| It's in BOL, look at the sysdatabases table, it decodes the status and status2 fields.HTHJasper Smith |
 |
|
|
|
|
|