Assemblies in SQL Server keep unloading and loading again periodically

Val K

SQL Server keeps loading and unloading my Assemblies, marking them as unsafe. Any ideas why it would do that.

I am attaching the log file down below.

enter image description here

Solomon Rutzky

The Assemblies are being unloaded due to the exact reason stated in the log: memory pressure. There is nothing specific you can do to prevent that (i.e. no option to disable this behavior). The most you can do is reduce the chances of it happening by adding more memory and/or reducing the memory consumption of your queries and/or SQLCLR objects.

The above suggestions are not meaning that there is anything currently inefficient in either your queries or .NET code, just that if you need more memory, you either need to add more or use less of it. And if you are currently using as little as possible, then you pretty much need to add more memory.

Without seeing your .NET code, it is not possible to determine if there are any areas that could be improved. However, it is more likely that the issue is outside of your SQLCLR code. You need to determine how much memory you have and where it is being used. Try looking through this Question on DBA.StackExchange:

SQL Server 2012 memory consumption outside the buffer pool

Also, SQL Server is not marking the Assembly as UNSAFE. That is simply how you have the Assembly set. You might try altering the Assembly to instead be EXTERNAL_ACCESS if it really is only doing file system access operations.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What is the purpose of ASSEMBLIES in SQL Server?

From Dev

Javascript Controller Loading/unloading

From Dev

How to update SQL Server 2008 table periodically

From Dev

Loading/unloading external JS dynamically

From Dev

Loading Dependent Assemblies Manually

From Dev

After Unloading AppDomain all assemblies are released EXCEPT ONE

From Dev

Static methods loading/unloading and memory area in java?

From Dev

setCenter position resetting when loading/unloading subviews

From Dev

Loading and unloading ISO files in Windows 8

From Dev

Dynamic Streaming, Loading, Unloading and Sharing of Game Assets

From Dev

Loading symbols for dynamically compiled assemblies

From Dev

C# Loading assemblies dynamically

From Dev

Loading Assemblies with referenced dll's

From Dev

Loading symbols for dynamically compiled assemblies

From Dev

Sql server union but keep order

From Dev

Sql server union but keep order

From Dev

Checking server response Periodically

From Dev

Tor's stem module (python) loading but not unloading config

From Dev

.Net 4.6 website not loading Reference Assemblies correctly

From Dev

asp.net dynamically loading assemblies

From Dev

C# loading assemblies dynamically is very slow

From Dev

Can't add System.IO.Compression to trusted assemblies in SQL Server

From Dev

Can't add System.IO.Compression to trusted assemblies in SQL Server

From Dev

Layers from SQL Server not loading in geoserver

From Dev

Loading XML in SQL Server returns nulls

From Dev

Fail loading driver (SQL Server, JBoss, Maven)

From Dev

Loading XML in SQL Server returns nulls

From Dev

Keep a computed ranking updated in SQL-Server

From Dev

GridView loading images again when onclick again

Related Related

HotTag

Archive