zoukankan      html  css  js  c++  java
  • 启用"clr enabled"配置选项

    在安装用友时,出现如下错误信息:

    初始化存储过程出错,Microsoft OLE DB Provider for SQL Server

    Execution of .NET Framework code is disabled. Set "clr enabled" configuration option and restart the server.

    解决方法:

    在查询分析其中执行如下代码:

    --在Sql Server中执行这段代码可以开启CLR

    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

    即可启用

    配置选项 'show advanced options' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。
    配置选项 'clr enabled' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。
    配置选项 'show advanced options' 已从 1 更改为 1。请运行 RECONFIGURE 语句进行安装。

    解释:

    sp_configure [ [ @configname = ] 'option_name' 
      [ , [ @configvalue = ] 'value' ] ]

    备注
    使用 sp_configure 可以显示或更改服务器级别的设置。若要更改数据库级别设置,请使用 ALTER DATABASE。若要更改仅影响当前用户会话的设置,请使用 SET 语句。

    更新运行的配置值
    为 option 指定新 value 时,结果集的 config_value 列中将显示该值。该值最初与 run_value 列中的值不同,后者显示当前运行的配置值。若要更新 run_value 列中的运行配置值,系统管理员必须运行 RECONFIGURE 或 RECONFIGURE WITH OVERRIDE。

    RECONFIGURE 和 RECONFIGURE WITH OVERRIDE 对每个配置选项都有效。但是,基本 RECONFIGURE 语句会拒绝处于合理范围之外或可能导致选项冲突的任何选项值。例如,如果 recovery interval 的值大于 60 分钟,或 affinity mask 的值与 affinity I/O mask 的值重叠,则 RECONFIGURE 会生成错误。与此相反,RECONFIGURE WITH OVERRIDE 则接受具有正确数据类型的任何选项值,并使用指定的值强制进行重新配置。

    有些配置选项(例如 affinity mask 和 recovery interval)被指定为高级选项。默认情况下,无法查看和更改这些选项。若要使这些选项可用,请将 Show Advanced Options 配置选项设置为 1。

    使用 clr enabled 选项可以指定 Microsoft SQL Server 是否可以运行用户程序集。clr enabled 选项提供下列值。

    值 说明 
    0
    不允许在 SQL Server 上执行程序集。

    1
    允许在 SQL Server 上执行程序集。

    clr enabled 选项是一个高级选项。如果使用 sp_configure 系统存储过程来更改该设置,则只有在 show advanced options 设置为 1 时才能更改 clr enabled。该设置在运行 sp_configure 后立即生效。不需要重新启动 SQL Server 实例。
    注意: 
    运行 RECONFIGURE 时,clr enabled 选项的运行值将从 1 改为 0,所有包含用户程序集的应用程序域将立即被卸载。

  • 相关阅读:
    warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    Windows10+CLion+OpenCV4.5.2开发环境搭建
    Android解决部分机型WebView播放视频全屏按钮灰色无法点击、点击全屏白屏无法播放等问题
    MediaCodec.configure Picture Width(1080) or Height(2163) invalid, should N*2
    tesseract
    Caer -- a friendly API wrapper for OpenCV
    Integrating OpenCV python tool into one SKlearn MNIST example for supporting prediction
    Integrating Hub with one sklearn mnist example
    What is WSGI (Web Server Gateway Interface)?
    Hub --- 机器学习燃料(数据)的仓库
  • 原文地址:https://www.cnblogs.com/Footprints/p/2917214.html
Copyright © 2011-2022 走看看