Microsoft® SQL Server™ 上的每個(gè)數(shù)據(jù)庫(kù)在表中占一行。最初安裝 SQL Server 時(shí),sysdatabases 包含 master、model、msdb、mssqlweb 和 tempdb 數(shù)據(jù)庫(kù)的項(xiàng)。該表只存儲(chǔ)在 master 數(shù)據(jù)庫(kù)中。
列名 | 數(shù)據(jù)類型 | 描述 |
---|---|---|
name | sysname | 數(shù)據(jù)庫(kù)的名稱。 |
dbid | smallint | 數(shù)據(jù)庫(kù) ID。 |
sid | varbinary(85) | 數(shù)據(jù)庫(kù)創(chuàng)建者的系統(tǒng) ID。 |
mode | smallint | 用于創(chuàng)建數(shù)據(jù)庫(kù)時(shí)在內(nèi)部鎖定該數(shù)據(jù)庫(kù)。 |
status | int | 狀態(tài)位,其中某些狀態(tài)位可由用戶使用 sp_dboption(read only、dbo use only、single user 等)進(jìn)行設(shè)置: 1 = autoclose;使用 sp_dboption 設(shè)置。 可以同時(shí)打開(kāi)多個(gè)位。 |
status2 | int | 16384 = ANSI null default;使用 sp_dboption 設(shè)置。 65536 = concat null yields null,使用 sp_dboption 設(shè)置。 131072 = recursive triggers,使用 sp_dboption 設(shè)置。 1048576 = default to local cursor,使用 sp_dboption 設(shè)置。 8388608 = quoted identifier,使用 sp_dboption 設(shè)置。 33554432 = cursor close on commit,使用 sp_dboption 設(shè)置。 67108864 = ANSI nulls,使用 sp_dboption 設(shè)置。 268435456 = ANSI warnings,使用 sp_dboption 設(shè)置。 536870912 = full text enabled,使用 sp_fulltext_database 設(shè)置。 |
crdate | datetime | 創(chuàng)建日期。 |
reserved | datetime | 留作以后使用。 |
category | int | 包含用于復(fù)制的信息位圖: 1 = 已發(fā)布。 |
cmptlevel | tinyint | 數(shù)據(jù)庫(kù)的兼容級(jí)別。有關(guān)更多信息,請(qǐng)參見(jiàn) sp_dbcmptlevel。 |
filename | nvarchar(260) | 數(shù)據(jù)庫(kù)主文件的操作系統(tǒng)路徑和名稱。 |
version | smallint | 創(chuàng)建數(shù)據(jù)庫(kù)時(shí)使用的 SQL Server 代碼內(nèi)部版本號(hào)。僅供 SQL Server 工具在內(nèi)部用于升級(jí)處理。 |