cancel
Showing results for 
Search instead for 
Did you mean: 

Problem setting up CLR environment for .NET 4.5

Former Member
0 Kudos
2,299

Hi, I was trying to setup CLR environment for .NET 4.5 and having some problems.

I uninstall v4.0 provider and installed v4.5 provider by: SetupVSPackage.exe /i /v 4.5

Then I configured CLR for .NET v4.5 using: ALTER EXTERNAL ENVIRONMENT CLR LOCATION 'dbextclr[VER_MAJOR]_v4.5';

Now if i run a stored procedure that calls an external clr name I get an error: "External environment could not be started, 'external executable' could not be found."

Using Sybase Central 16.0.0.2043. Thanks

Former Member
0 Kudos

That works for me with 16.0.0.2344. Do make sure your dbextclr*.exe and dbclrenv16.dll are all matched by version and build with the database engine/server you are running.

It could be your (relative path) is not matched for some reason. Not to mention the account you are using to run that must have permissions to see that directory.

There were also some changes around builds 2100 that speed up the CLR environment. So you might want to test with the latest EBFs to pick those up. But this does sound like a permissions, presence or location issue. The SysInternals ProcessMonitor utility might be of some use to discovering why/what is failing.

Good luck

Vlad
Product and Topic Expert
Product and Topic Expert
0 Kudos

I would add that relative paths are dangerous in this setting. It might fail you :( I used the absolute type and Process Explorer to capture what SA was trying to load. What I have also noticed, the version I used in my experiments didn't unload the assembly. After you start the CLR, you canno detach your dll even if you stop CLR.

VolkerBarth
Contributor

Would the builtin "sa_external_library_unload" procedure help here?

Vlad
Product and Topic Expert
Product and Topic Expert
0 Kudos

I cannot answer you, I will try it the next time when I experiment again. My assumption, Volker, is that the file was held by dbextclr17.exe, not by dbsrv17.exe

Former Member
0 Kudos

Update: I obtained and installed the latest version of SQL Anywhere (16.0.0.2344). Uninstall v4.0 provider and installed v4.5 provider. Configured CLR for .NET v4.5.

But now every time I try running the external function I get: 'External environment cannot be started, external process terminated on start up.'

The dll was made against .NET v4.5. Any help appreciated, thanks

Former Member
0 Kudos

Never mind, installed .NET v4.5.2 and it worked

View Entire Topic
Former Member
0 Kudos

Works with v16.0.0.2344