|
Solution:
The following code is executed in the query analysis:
exec sp_configure'show advanced options', '1';
go
reconfigure;
go
exec sp_configure'clr enabled', '1'
go
reconfigure;
exec sp_configure'show advanced options', '1';
go
To enable
"
The configuration option'show advanced options' has been changed from 0 to 1. Please run the RECONFIGURE statement to install.
The configuration option'clr enabled' has been changed from 0 to 1. Please run the RECONFIGURE statement to install.
The configuration option'show advanced options' has been changed from 1 to 1. Please run the RECONFIGURE statement to install.
"
Explanation:
sp_configure [[@configname =]'option_name'
[, [@configvalue =]'value']]
Remarks
Use sp_configure to display or change server-level settings. To change database level settings, use ALTER DATABASE. To change settings that only affect the current user session, use the SET statement.
Update running configuration values
When you specify a new value for the option, the value will be displayed in the config_value column of the result set. This value is initially different from the value in the run_value column, which shows the current running configuration value. To update the run configuration value in the run_value column, the system administrator must run RECONFIGURE or RECONFIGURE WITH OVERRIDE.
RECONFIGURE and RECONFIGURE WITH OVERRIDE are valid for each configuration option. However, the basic RECONFIGURE statement rejects any option values that are outside of a reasonable range or that might cause option conflicts. For example, if the value of recovery interval is greater than 60 minutes, or the value of affinity mask and the value of affinity I/O mask overlap, RECONFIGURE generates an error. In contrast, RECONFIGURE WITH OVERRIDE accepts any option value with the correct data type and uses the specified value to force a reconfiguration.
Some configuration options (such as affinity mask and recovery interval) are designated as advanced options. By default, these options cannot be viewed and changed. To make these options available, set the Show Advanced Options configuration option to 1.
Use the clr enabled option to specify whether Microsoft SQL Server can run user assemblies. The clr enabled option provides the following values.
Value Description
0
It is not allowed to execute assemblies on SQL Server.
1
Allows the execution of assemblies on SQL Server.
The clr enabled option is an advanced option. If you use the sp_configure system stored procedure to change this setting, you can only change clr enabled when show advanced options is set to 1. This setting takes effect immediately after running sp_configure. There is no need to restart the SQL Server instance.
Note:
When running RECONFIGURE, the operating value of the clr enabled option will be changed from 1 to 0, and all application domains containing user assemblies will be uninstalled immediately. |
|