sys.databases database_scoped_configurations (Transact-sql)sys.database_scoped_configurations (Transact-SQL)

適用於: 是SQL Server 2016 與更新版本 是Azure SQL Database 否Azure Synapse Analytics (SQL DW) 否平行處理資料倉儲 APPLIES TO: yesSQL Server 2016 and later yesAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

針對每個設定包含一個資料列。Contains one row per configuration.

資料行名稱Column name 資料類型Data type 描述Description
configuration_idconfiguration_id intint 設定選項的識別碼。ID of the configuration option.
namename Nvarchar (60)nvarchar(60) 設定選項的名稱。The name of the configuration option. 如需可能設定的詳細資訊,請參閱ALTER DATABASE 範圍設定 (transact-sql)For information about the possible configurations, see ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL).
valuevalue sqlvariantsqlvariant 針對主要複本的這個設定選項所設定的值。The value set for this configuration option for the primary replica.
value_for_secondaryvalue_for_secondary sqlvariantsqlvariant 次要複本的這個設定選項所設定的值。The value set for this configuration option for the secondary replicas.
is_value_defaultis_value_default bitbit 指定值是否設定為預設值。Specifies whether the value set is the default value.

權限Permissions

需要 public 角色的成員資格。Requires membership in the public role.

備註Remarks

當傳回 Null 做為value_for_secondary的值時,這表示次要複本設定為 [主要]。When NULL is returned as the value for value_for_secondary, this means that the secondary is set to PRIMARY.

資料庫範圍組態設定會伴隨著資料庫。Database scoped configuration settings will be carried over with the database. 這意謂著還原或附加指定的資料庫時,現有的組態設定會持續存留。This means that when a given database is restored or attached, the existing configuration settings remain.

另請參閱See Also

ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL)ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL)