惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
F
Full Disclosure
N
Netflix TechBlog - Medium
C
Check Point Blog
Recent Announcements
Recent Announcements
MyScale Blog
MyScale Blog
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
H
Help Net Security
F
Fortinet All Blogs
P
Proofpoint News Feed
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Vercel News
Vercel News
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
B
Blog RSS Feed
S
Securelist
Y
Y Combinator Blog
C
Cybersecurity and Infrastructure Security Agency CISA
D
DataBreaches.Net
B
Blog
The Hacker News
The Hacker News
Security Latest
Security Latest
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
Forbes - Security
Forbes - Security
T
The Exploit Database - CXSecurity.com
Latest news
Latest news
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
AWS News Blog
AWS News Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
C
Cisco Blogs

博客园 - Asidy

[转]SQL Server 2005备份集中的数据库备份与现有的数据库不同的解决方法 asp.net中向数据库中插入数据时如何获得当前插入行的主键? css中visibility与display的区别 一个比较纯洁的DIV+CSS下拉菜单 基于.NET平台的Windows编程实战系列课程导航及源码下载 一个用JS写的IP/时间/日期/email的验证函数 [转]同时安装MSSQL2000与MSSQL2005时所遇到的问题及解决方法小记 LINQ编程实战之TreeView动态绑定数据 一个老师的自责、道歉与思考 基于.NET平台的Windows编程实战(九)— 安装与部署 基于.NET平台的Windows编程实战(八)— 数据库管理及其他辅助功能的实现 基于.NET平台的Windows编程实战(七)—— 问卷统计功能的实现 基于.NET平台的Windows编程实战(六)—— 题目管理功能的实现 让别人说话 基于.NET平台的Windows编程实战(五)—— 问卷管理功能的实现 [翻译]在Windows窗体中如何使用透明图片和标签 基于.NET平台的Windows编程实战(四)—— 数据库操作类的编写 基于.NET平台的Windows编程实战(三)—— 项目的创建及主界面的设计 FileStream类/StreamWriter类/StreamReader的使用
[转]禁止在 .NET Framework 中执行用户代码。启用 "clr enabled" 配置选项 - Asidy
Asidy · 2010-03-11 · via 博客园 - Asidy

刚运行.NET程序时出现了如题所示的错误[用的MSSQL2005的数据库],最近几个月太忙了,故转过来一篇,权当时记录一下问题吧,解决问题的内容如下:

出现如下问题

"禁止在 .NET Framework 中执行用户代码。启用 "clr enabled" 配置选项。
"

解决方法:

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

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,所有包含用户程序集的应用程序域将立即被卸载。

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/icefireliu/archive/2008/11/04/3212304.aspx