Topic last updated -- July 2003
Contains one row for each database on Microsoft® SQL Server™. When SQL Server is initially installed, sysdatabases contains entries for the master, model, msdb, mssqlweb, and tempdb databases. This table is stored only in the master database.
|Column name||Data type||Description|
|name||sysname||Name of the database.|
|sid||varbinary(85)||System ID of the database creator.|
|mode||smallint||Used internally for locking a database while it is being created.|
|status||int||Status bits, some of which can be set by the user with ALTER DATABASE (read only, offline, single user, and so on):
1 = autoclose; set with ALTER DATABASE.
Multiple bits can be on at the same time.
|status2||int||16384 = ANSI null default; set with ALTER DATABASE. |
65536 = concat null yields null , set with ALTER DATABASE.
131072 = recursive triggers, set with ALTER DATABASE.
1048576 = default to local cursor, set with ALTER DATABASE.
8388608 = quoted identifier, set with ALTER DATABASE.
33554432 = cursor close on commit, set with ALTER DATABASE.
67108864 = ANSI nulls, set with ALTER DATABASE.
268435456 = ANSI warnings, set with ALTER DATABASE.
536870912 = full text enabled, set with sp_fulltext_database.
|reserved||datetime||Reserved for future use.|
|category||int||Contains a bitmap of information used for replication:
1 = Published.
|cmptlevel||tinyint||Compatibility level for the database. For more information, see sp_dbcmptlevel.|
|filename||nvarchar(260)||Operating-system path and name for the database's primary file.|
|version||smallint||Internal version number of the SQL Server code with which the database was created. For internal use only by SQL Server tools and in upgrade processing.|