on ‎2013 Dec 19 5:55 AM
made some library and want to use it as CLR assembly in MSSQL. The point is that my lib have the reference to 'iAnywhere.Data.SQLAnywhere' lib which I cannot install. The error is:
Assembly 'iAnywhere.Data.SQLAnywhere' could not be installed because existing policy would keep it from being used.
I have implemented the recommendations and now my SQL looks like:
USE DB_ControlGOALTER DATABASE DB_Control SET TRUSTWORTHY ON WITH ROLLBACK IMMEDIATE GO ALTER DATABASE DB_Control SET TRUSTWORTHY ON GO exec sp_configure 'show advanced options', 1; GO RECONFIGURE; GO exec sp_configure 'clr enabled', 1; GO RECONFIGURE; GO IF EXISTS ( SELECT 1 FROM sys.assemblies a WHERE a.name = 'ClrSqlMediator' ) EXEC sp_executesql N'DROP ASSEMBLY ClrSqlMediator' GO CREATE ASSEMBLY [iAnywhere.Data.SQLAnywhere] AUTHORIZATION sa FROM '~\\Debug\\iAnywhere.Data.SQLAnywhere.dll' WITH PERMISSION_SET = UNSAFE GO CREATE ASSEMBLY ClrSqlMediator AUTHORIZATION sa FROM '~\\Debug\\SQLMediator.dll' WITH PERMISSION_SET = UNSAFE GO
Does anybody know how to fix this?
Request clarification before answering.
Maybe this is the obstacle: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework\\OnlyUseLatestCLR is it set to 1?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.