Microsoft® SQL Server™ 上的每個數(shù)據(jù)庫在表中占一行。最初安裝 SQL Server 時,sysdatabases 包含 master、model、msdb、mssqlweb 和 tempdb 數(shù)據(jù)庫的項。該表只存儲在 master 數(shù)據(jù)庫中。
列名 | 數(shù)據(jù)類型 | 描述 |
---|---|---|
name | sysname | 數(shù)據(jù)庫的名稱。 |
dbid | smallint | 數(shù)據(jù)庫 ID。 |
sid | varbinary(85) | 數(shù)據(jù)庫創(chuàng)建者的系統(tǒng) ID。 |
mode | smallint | 用于創(chuàng)建數(shù)據(jù)庫時在內(nèi)部鎖定該數(shù)據(jù)庫。 |
status | int | 狀態(tài)位,其中某些狀態(tài)位可由用戶使用 sp_dboption(read only、dbo use only、single user 等)進行設(shè)置: 1 = autoclose;使用 sp_dboption 設(shè)置。 可以同時打開多個位。 |
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ù)庫的兼容級別。有關(guān)更多信息,請參見 sp_dbcmptlevel。 |
filename | nvarchar(260) | 數(shù)據(jù)庫主文件的操作系統(tǒng)路徑和名稱。 |
version | smallint | 創(chuàng)建數(shù)據(jù)庫時使用的 SQL Server 代碼內(nèi)部版本號。僅供 SQL Server 工具在內(nèi)部用于升級處理。 |