简体   繁体   English

程序集xyz已存在于数据库中

[英]Assembly xyz already exists in database

I have restored a database on another server. 我已经在另一台服务器上还原了数据库。 This database has SQL function that use .NET assemblies, which were installed on the previous server. 该数据库具有使用.NET程序集的SQL函数,该程序已安装在以前的服务器上。

What is the easiest way to reinstall there assemblies? 在那里重新安装程序集的最简单方法是什么?

If i just do 如果我只是做

CREATE ASSEMBLY SQLHelpers

I get an error saying: Assembly SQLHelpers already exists in database 我收到一条错误消息: 程序集SQLHelpers已存在于数据库中

When i first try to remove by using 当我第一次尝试通过使用删除

DROP ASSEMBLY SQLHelpers

I get: DROP ASSEMBLY failed because 'SQLHelpers' is referenced by object 我得到: DROP ASSEMBLY失败,因为对象引用了“ SQLHelpers”

I could alter all code in all functions, so that it looks like this assembly is not being used anymore, but isn't there a more simple way to update / reinstall / force install this thing? 我可以更改所有功能中的所有代码,以便看起来不再使用此程序集,但是没有更简单的方法来更新/重新安装/强制安装该程序吗?

To update an existing assembly you can use alter assembly SQLHelpers from ... 要更新现有程序集,您可以使用alter assembly SQLHelpers from ...

ALTER ASSEMBLY (Transact-SQL) ALTER ASSEMBLY(Transact-SQL)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM