Question

I try to create SQLCLR proc that access teradata server and I get this error:

System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.

I google about this error and I found that I need to create <dllname>.XmlSerializers.dll and add this to the DB. I did that and still I get same error.

The code work stably with Oracle and SQL Server, but I can't add Teradata.

I'm using Teradata.Client.Provider namespace from the assembly Teradata.Client.Provider.

The server version is 2012.

Was it helpful?

Solution

I found 2 solutions.

  1. I replaced Teradata.Client.Provider with System.Data.Odbc, etc. i use odbc connection and it's fine.
  2. I create exe file that perform the code and my clr code only run the exe file and join to him. The disadvantage in this that i can't use context connection=true in my code.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top