7. Advanced Server-Configuration Properties
The advanced server-configuration properties, as shown in Table 6, enable you to set advanced SQL Server configuration options.
Table 6 Advanced Server-Configuration Properties
The Advanced tab of Management Studio's Server Properties page (see Figure 6) is used to view or modify the advanced server settings.
FILESTREAM Access Level
SQL Server 2008 introduced a new
feature called FILESTREAM that enables you to store structured data in
the database and associated unstructured (that is, BLOB) data such as
text documents, images, and videos directly in the NTFS file system. By
default, FILESTREAM is not enabled. Before you can start using
FILESTREAM, you must enable FILESTREAM. You can enable FILESTREAM
during the SQL Server 2011 installation in the Database Engine
Configuration page of the setup. You can also enable the FILESTREAM
feature after the installation using the SQL Server Configuration
Manager as follows:
- Open SQL Server Configuration Manager from Start ? Programs ?
Microsoft SQL Server 2012 ? Configuration Tools ? SQL Server
Configuration Manager.
- Under SQL Server Configuration Manager, click SQL Server Services.
- Right-click the SQL Server service (on the right side) on which you want to enable FILESTREAM and select Properties.
- Click the FILESTREAM tab (see Figure 7) and select the Enabled FILESTREAM for Transact-SQL Access check box.
- If you want to read and write FILESTREAM data from Windows, select
the Enable FILESTREAM for File I/O Access check box. Enter the name of
the Windows share in which the FILESTREAM data will be stored in the
Windows Share Name box.
- If you want to allow remote clients to access the FILESTREAM data
stored on this share, select the Allow Remote Clients to Have Streaming
Access to the FILESTREAM Data check box.
- Click Apply.
After enabling FILESTREAM during setup or by
using SQL Server Configuration Manager, the next step is to configure
it in SQL Server using the FILESTREAM_access_level configuration option. Following are the possible FILESTREAM access settings:
- 0: Disables FILESTREAM support for this SQL Server instance
- 1: Enables FILESTREAM for Transact-SQL access only
- 2: Enables FILESTREAM for Transact-SQL and Win32 streaming access
The following example configures FILESTREAM for both Transact-SQL and Win32 streaming access.
EXEC sp_configure ‘filestream_access_level', 2;
RECONFIGURE;
Extensible Key Management
The Extensible Key Management (EKM)
feature in SQL Server 2012 enables third-party EKM and hardware
security module vendors to register their devices in SQL Server. This
capability makes it possible for DBAs to use third-party EKM products
along with SQL Server's built-in encryption.
Note
The EKM feature is available only on the
Enterprise, Developer, and Evaluation edition of SQL Server 2012.
Trying to allow this option on other editions can result in an error.
By default, the EKM feature is 0 (OFF) for all editions.
To turn the EKM feature ON in code, do the following:
EXEC sp_configure ‘show advanced options', 1;
RECONFIGURE;
EXEC sp_configure ‘EKM provider enabled', 1;
RECONFIGURE;
Default Full-Text Language
The default language for full-text index columns can be set using the default full-text language configuration option. Linguistic analysis of full-text indexed data is dependent on the language of the data.
Note
The default value for the default full-text language
option is the language of the SQL Server instance. Also, the default
value set by this option applies only when no language is indicated in
the CREATE or ALTER FULLTEXT INDEX statement.
In Management Studio, you can set the default full-text language configuration option by specifying the local identifier (lcid) for the language you want, as listed in the sys.fulltext_languages table in the Default Full-Text Language box on the Server Properties Advanced tab (refer to Figure 6).
The following example sets the default full-text language option to US English using T-SQL code:
EXEC sp_configure ‘show advanced options', 1;
RECONFIGURE;
EXEC sp_configure ‘default full-text language', 1033;
RECONFIGURE;
In this case, the value of 1033
refers to US English. You need to change this value only when you need
to support something other than the default system language.
Default Language
The default language for all newly created logins can be set in Management Studio as well as in code using the default language
configuration option. The default language is used for messages from
the server and formatting dates. It can be overridden by the CREATE LOGIN or ALTER LOGIN statements.
In Management Studio, set the default language
configuration option by selecting the language from the Default
Language drop-down list on the Server Properties Advanced tab (refer to
Figure 6).
From code, you can set the default language configuration option by specifying the unique language id of the language you want, as listed in the sys.syslanguages
table. For example, to set the default language to British English,
first query the sys.syslanguages table to get the language id for
British English. Then use the language id in the code:
EXEC sp_configure ‘default language', 23;
RECONFIGURE;
Note
The language for a session can be changed during the session through the SET LANGUAGE statement.
Two-Digit-Year Cutoff
The two-digit-year cutoff converts a
two-digit year to a four-digit year based on the values supplied. The
default time span for SQL Server is 1950–2049, which represents a
cutoff year of 2049. If the two-digit year falls on or after the first
value (default 50), then it is interpreted as being in the twentieth century. If it falls on or before the second value (default 49), then it is interpreted as being in the twenty-first century. For example, 01/01/69 is interpreted as 01/01/1969, and 01/01/14 is interpreted as 01/01/2014.
In Management Studio, you can set the two digit year cutoff
configuration option by specifying an integer that represents the
cutoff year in the Two Digit Year Cutoff box in the Server Properties
Advanced tab (refer to Figure 6).
The following code sets the two digit year cutoff to 2041:
EXEC sp_configure ‘show advanced options', 1;
RECONFIGURE;
EXEC sp_configure ‘two digit year cutoff', 2041;
RECONFIGURE;
Best Practice
Use four-digit date formats to avoid ambiguity with dates.
To maintain backward compatibility, leave the default setting for the two digit year cutoff configuration option.
Max Text Replication Size
By default, text or image data greater than 65536 bytes (64KB) cannot be added to a replicated column or captured column. The max text repl size
option applies to transactional replication and the Change Data Capture
feature. This option does not apply to snapshot and merge replication.
The maximum size of 65536 bytes is configurable using the max text repl size configuration option.
In Management Studio, you can set the max text repl size
configuration option by specifying maximum size in the Max Text
Replication Size box in the Server Properties Advanced tab (refer to Figure 6).
The following code sets the max text repl size to 131072 (128KB):
EXEC sp_configure ‘max text repl size', 131072;
RECONFIGURE;