Hello.

Im using external Assemblies with SQL Anywhere (current SQL-A 12 and SQL-A 16). Most things works fine. But now i'm searching for a way to tell SQL Anywhere server to keep the Assembly loaded. I've made a debug version with a static field to test when this field is set first time. I think this is the time the assembly is loaded by the dbextclr16*. But the log messag appears if there is some time between calls or sometimes if there are more than one connection executing a function from assembly there are two loads in my log.

So, is there an option or a parameter on SQL-A start or database start to load assembly on first run of a function and holds it till database is unloaded or STOP ENV. is called?

asked 05 Feb, 05:42

sveni2211's gravatar image

sveni2211
111
accept rate: 0%


The CLR process (dbextclr17.exe) will remain active until you shut down the server or execute a STOP EXTERNAL ENVIRONMENT CLR statement on every connection using the CLR.

By default, there is one CLR instance per database running on the server.

Each additional database that is started and that makes a CLR external environment call will cause a new process to start unless you have used the -sclr command-line option when starting the server. The -sclr command-line option or the SingleCLRInstanceVersion database server option can be used to request that one CLR external environment be used for all databases running on the database server. This option must be specified before starting the CLR external environment on any database.

Each connection gets its own CLR execution thread. There is no way to share one assembly across multiple connections. This is by design. This thread remains active until you execute a STOP EXTERNAL ENVIRONMENT CLR statement or disconnect.

permanent link

answered 06 Feb, 12:38

JBSchueler's gravatar image

JBSchueler
2.5k21245
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×23
×18

question asked: 05 Feb, 05:42

question was seen: 55 times

last updated: 06 Feb, 12:38