配置 default full-text language 服务器配置选项Configure the default full-text language Server Configuration Option

适用对象:是SQL Server 否Azure SQL 数据库 否Azure Synapse Analytics (SQL DW) 否并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database noAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

本主题说明如何使用 SQL Server Management StudioSQL Server Management StudioTransact-SQLTransact-SQLSQL ServerSQL Server 中配置“默认全文语言” 服务器配置选项。This topic describes how to configure the default full-text language server configuration option in SQL ServerSQL Server by using SQL Server Management StudioSQL Server Management Studio or Transact-SQLTransact-SQL. default full-text language 选项指定全文索引的默认语言值。The default full-text language option specifies a default language value for full-text indexes. 语言分析将对全文索引的所有数据执行,并且取决于数据的语言。Linguistic analysis is performed on all data that is full-text indexed and is dependent on the language of the data. 该选项的默认值为服务器的语言。The default value of this option is the language of the server. 对于 SQL ServerSQL Server的本地化版本, SQL ServerSQL Server 安装程序将把 default full-text language 选项设置为服务器的语言(如果存在合适的匹配项)。For a localized version of SQL ServerSQL Server, SQL ServerSQL Server Setup sets the default full-text language option to the language of the server if an appropriate match exists. 对于 SQL ServerSQL Server的非本地化版本, 选项为“英语”。For a non-localized version of SQL ServerSQL Server, the default full-text language option is English.

本主题内容In This Topic

开始之前Before You Begin

限制和局限Limitations and Restrictions

  • 当没有通过 CREATE FULLTEXT INDEX 或 ALTER FULLTEXT INDEX 语句中的 language_term 选项为列指定任何语言时,则在全文索引中使用 default full-text language 选项的值。The value of the default full-text language option is used in a full-text index when no language is specified for a column through the LANGUAGE language_term option in the CREATE FULLTEXT INDEX or ALTER FULLTEXT INDEX statements. 如果不支持默认全文语言,或者语言分析包不可用,则 CREATE 或 ALTER 操作将失败,并且 SQL ServerSQL Server 将返回说明指定语言无效的错误消息。If the default full-text language is not supported or the linguistic analysis package is not available, the CREATE or ALTER operation will fail and SQL ServerSQL Server will return an error message stating that the language specified is not valid.

建议Recommendations

  • 此选项是一个高级选项,仅应由有经验的数据库管理员或认证的 SQL ServerSQL Server 专业人员更改。This option is an advanced option and should be changed only by an experienced database administrator or certified SQL ServerSQL Server professional.

  • “默认全文语言” 选项需要 LCID 值。The default full-text language option requires an LCID value. 有关支持的 LCID 及其相关语言的列表,请参阅 sys.fulltext_languages (Transact-SQL)For a list of supported LCIDs and their related languages, see sys.fulltext_languages (Transact-SQL). 例如,独立的软件供应商还可提供其他语言。Other languages may also be available from independent software vendors, for example. 如果找不到特定区域语言,则全文引擎将自动切换到主要语言。If no specific language dialect is found, the Full-Text Engine will automatically switch to the primary language.

SecuritySecurity

权限Permissions

默认情况下,所有用户都具备不带参数或仅带第一个参数的 sp_configure 的执行权限。Execute permissions on sp_configure with no parameters or with only the first parameter are granted to all users by default. 若要执行带两个参数的 sp_configure 以更改配置选项或运行 RECONFIGURE 语句,则用户必须具备 ALTER SETTINGS 服务器级别的权限。To execute sp_configure with both parameters to change a configuration option or to run the RECONFIGURE statement, a user must be granted the ALTER SETTINGS server-level permission. ALTER SETTINGS 权限由 sysadminserveradmin 固定服务器角色隐式持有。The ALTER SETTINGS permission is implicitly held by the sysadmin and serveradmin fixed server roles.

使用 SQL Server Management StudioUsing SQL Server Management Studio

配置 default full-text language 选项To configure the default full-text language option

  1. 在对象资源管理器中,右键单击服务器并选择 “属性”In Object Explorer, right-click a server and select Properties.

  2. 单击 “高级” 节点。Click the Advanced node.

  3. 在“杂项”下,使用 “默认全文语言” 指定全文索引列的默认语言值。Under Miscellaneous, use Default Full Text Language to specify a default language value for full-text indexed columns.

使用 Transact-SQLUsing Transact-SQL

配置 default full-text language 选项To configure the default full-text language option

  1. 连接到 数据库引擎Database EngineConnect to the 数据库引擎Database Engine.

  2. 在标准菜单栏上,单击 “新建查询”From the Standard bar, click New Query.

  3. 将以下示例复制并粘贴到查询窗口中,然后单击“执行” 。Copy and paste the following example into the query window and click Execute. 此示例说明如何使用 sp_configuredefault full-text 选项的值设置为荷兰语 (1043)。This example shows how to use sp_configure to set the value of the default full-text option to Dutch (1043).

USE AdventureWorks2012 ;  
GO  
EXEC sp_configure 'show advanced options', 1 ;  
GO  
RECONFIGURE  
GO  
EXEC sp_configure 'default full-text language', 1043 ;  
GO  
RECONFIGURE  
GO  
  

有关详细信息,请参阅 服务器配置选项 (SQL Server)版本的组合自动配置的最大工作线程数。For more information, see Server Configuration Options (SQL Server).

跟进:在配置默认全文语言选项之后Follow Up: After you configure the default full-text language option

该设置将立即生效,无需重新启动服务器。The setting takes effect immediately without restarting the server.

另请参阅See Also

sys.fulltext_languages (Transact-SQL) sys.fulltext_languages (Transact-SQL)
RECONFIGURE (Transact-SQL) RECONFIGURE (Transact-SQL)
服务器配置选项 (SQL Server) Server Configuration Options (SQL Server)
sp_configure (Transact-SQL) sp_configure (Transact-SQL)
CREATE FULLTEXT INDEX (Transact-SQL) CREATE FULLTEXT INDEX (Transact-SQL)
ALTER FULLTEXT INDEX (Transact-SQL)ALTER FULLTEXT INDEX (Transact-SQL)