升级后SQl服务器CLR组装出现问题... [英] Problems with SQl server CLR assembly after upgrade...

查看:85
本文介绍了升级后SQl服务器CLR组装出现问题...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我工作的地方,我们有一个刚刚启动的网站.该站点中有一个学校分类程序功能,该功能使用Google Maps API根据最初起作用的邮政编码和搜索距离来查找给定半径内的学校.它是一个存储过程,它引用C#CLR程序集中定义的函数.它存储在32位SQL Server 2005服务器中.从那以后,我们已经升级到64位的SQL Server 2008 R2,并且程序集在升级后停止工作.当调用引用Google Maps的函数时,它始终返回状态代码0,我认为这意味着未发送请求.我昨天将代码放在笔记本电脑上并开始使用它,以及如何使其工作,但是可悲的是,我不确定自己做了什么,所以我创建了一个新数据库,并试图重新创建自己所做的工作这行得通.我知道这是一项设置更改,我不确定是哪一个...我将永远感激任何帮助.

Where I work we have a website that just launched. In the site there is a school sorter function that uses Google Maps API to find schools in a given radius based on the zip code and search distance that worked initially. It is a stored procedure that references a function that defined in a C# CLR assembly. It was stored in a 32 bit SQL Server 2005 server. we have since upgraded to SQL Server 2008 R2 64 bit, and the assembly stopped working after the upgrade. when the function is called that references Google maps it always returns status code 0, which I think means the request is not being sent. I put the code on my laptop yesterday and started playing with it, and some how got it to work, but sadly I am not sure of what I did so I have created a new database and I am trying to recreate what I did to make it work. It was a setting change I know, I am just not sure which one... I would be eternally grateful for any help.

推荐答案

程序集是为32位(x86)平台编译的,因此64位Sql Server无法使用该程序集.
打开包含C#CLR程序集的解决方案,然后用鼠标右键单击该解决方案.选择``配置管理器''.

在这里,您将看到用于编译的平台.在您的情况下,我认为它将显示为x86.将平台更改为x64并重新编译程序集.

从SQL Server删除程序集,然后添加重新编译的程序集.
It sounds to me that the assembly is compiled for 32 bit (x86) platform and therefor cannot be used by the 64bit Sql Server.

Open the solution that contains the C# CLR assembly and right-click with your mouse on the solution. Select ''Configuration Manager''.

Here you''ll see what platform is used to compile. In your case I think it will read x86. Change the platform to x64 and recompile the assembly.

Delete the assembly from SQL Server and add the recompiled assembly.


这篇关于升级后SQl服务器CLR组装出现问题...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆