Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Making an AppDomain containing SQL CLR Assembly persist in memory


Making an AppDomain containing SQL CLR Assembly persist in memory

Author
Message
chris.king
chris.king
SSC-Addicted
SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)SSC-Addicted (437 reputation)

Group: General Forum Members
Points: 437 Visits: 325
Hi There,

I hope this is in the right board, the SQL CLR section seems to be under SQL Server 2005.

I have a CLR Assembly that contains methods to encrypt and decrypt a table of fields using AES.

We see a large performance hit on the first run of these methods whilst the CLR is loaded into memory. This takes between 15 and 20 seconds. Subsequent calls take < 1 second until the Assembly is unloaded.

I have done some reading around AppDomains and it seems that the AppDomain is held in memory 'to improve performance' until such time as SQL Server deems that 'memory pressure' requires it to be unloaded.

We will be hitting these methods quite often but not consistently enough to prevent the CLR from unloading.

Is there anyway to adjust the server settings or assembly options to make them more persistent?

TIA,

Chris
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search