Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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 Thanks

asked 20 Jan '17, 11:00

NickArx's gravatar image

accept rate: 33%

edited 20 Jan '17, 11:20

That works for me with 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

(20 Jan '17, 15:27) Nick Elson S...
Replies hidden

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.

(27 Jan '17, 03:58) Vlad
Replies hidden

Would the builtin "sa_external_library_unload" procedure help here?

(27 Jan '17, 04:26) Volker Barth

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

(28 Jan '17, 03:11) Vlad

Update: I obtained and installed the latest version of SQL Anywhere ( 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

(28 Feb '17, 17:15) NickArx

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

(28 Feb '17, 17:31) NickArx
showing 2 of 6 show all flat view

Works with v16.0.0.2344

permanent link

answered 28 Feb '17, 17:58

NickArx's gravatar image

accept rate: 33%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Jan '17, 11:00

question was seen: 2,048 times

last updated: 28 Feb '17, 17:58