首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

sqlserver2008 执行以下语句失败是什么原因? 多谢

2012-02-07 
sqlserver2008 执行以下语句失败是什么原因?急急谢谢execsp_configureshowadvancedoptions ,1 goreco

sqlserver2008 执行以下语句失败是什么原因?急急 谢谢
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  


打开网页提示:禁止在.net Framework 中执行用户代码。启用‘clr enabled’配置选项。
我查了要执行上面的代码就可以了,但是执行不成功是什么原因??



[解决办法]
消息 15123,级别 16,状态 1,过程 sp_configure,第 51 行
配置选项 'clr enabled ' 不存在,也可能是高级选项。

lz运行的时候是否报这个错误?

SQL code
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
[解决办法]
exec sp_configure 'clr enabled ', '1 '
后面多了个空格


[解决办法]
提示比较明显了吧

默认情况下 ‘clr enabled’配置选项是关闭的


用上面的代码就打开了。
[解决办法]
SQL code
exec sp_configure 'show advanced options ', '1 ';     reconfigure;     go     exec sp_configure 'clr enabled ', '1 '     reconfigure;  go  exec sp_configure 'show advanced options ', '1 ';    reconfigure;   go
[解决办法]
SQL code
  exec sp_configure 'show advanced options', '1 ';     go     reconfigure;     go     exec sp_configure 'clr enabled', '1 '     go     reconfigure;   go    exec sp_configure 'show advanced options', '1 ';     go   /*配置选项 'show advanced options' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。配置选项 'clr enabled' 已从 1 更改为 1。请运行 RECONFIGURE 语句进行安装。配置选项 'show advanced options' 已从 1 更改为 1。请运行 RECONFIGURE 语句进行安装。*/
[解决办法]
探讨
引用:
SQL code
exec sp_configure 'show advanced options', '1 ';
go
reconfigure;
go
exec sp_configure 'clr enabled', '1 '
go
reconfigure;
go
exec sp_configure ……



这不是一样……

[解决办法]
多了空格
[解决办法]
SQL code
exec sp_configure 'show advanced options', '1'exec sp_configure 'clr enabled', '1'     reconfigure with OVERRIDE
[解决办法]
SQL code
exec sp_configure 'show advanced options', '1 ';     go     reconfigure;     go     exec sp_configure 'clr enabled', '1 '     go     reconfigure;   go    exec sp_configure 'show advanced options', '1 ';     go
[解决办法]
SQL code
exec sp_configure 'show advanced options', '1';reconfigure;goexec sp_configure 'clr enabled', '1';reconfigure;goexec sp_configure 'show advanced options', '1';reconfigure; go
[解决办法]
结贴。

热点排行